You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Sylvain Wallez <sy...@anyware-tech.com> on 2003/10/21 16:11:45 UTC
missing mocks for jms blocks ?
Hi team,
Today I did a fresh "build eclipse-project", and found that the JMS
block doesn't compile because there are no javax.jms mock classes.
Am I missing something?
Sylvain
--
Sylvain Wallez Anyware Technologies
http://www.apache.org/~sylvain http://www.anyware-tech.com
{ XML, Java, Cocoon, OpenSource }*{ Training, Consulting, Projects }
Orixo, the opensource XML business alliance - http://www.orixo.com
Re: missing mocks for jms blocks ?
Posted by Christian Haul <ha...@informatik.tu-darmstadt.de>.
Geoff, all,
I'm very sorry I haven't followed up on this issue. It's just that I
have started a new job last thursday and it's currently eating up a lot
time :-| Good news is, I'm working with Cocoon :-)
Geoff Howard wrote:
> So, anyone have an opinion on including the Geronimo jms jar? It's at
> ibiblio for convenience but we can also build it from their cvs. I
> assume there's no license conflict! :)
Looks good. Sampling the CVS through viewcvs reveals only interfaces or
implementations of exceptions. But I haven't checked every file...
I believe it should be safe to include. And it doesn't belong to the
"building on sand" category IMHO.
Would be great if you could do this.
Chris.
--
C h r i s t i a n H a u l
haul@informatik.tu-darmstadt.de
fingerprint: 99B0 1D9D 7919 644A 4837 7D73 FEF9 6856 335A 9E08
Re: missing mocks for jms blocks ?
Posted by Geoff Howard <co...@leverageweb.com>.
Sylvain Wallez wrote:
> Hi team,
>
> Today I did a fresh "build eclipse-project", and found that the JMS
> block doesn't compile because there are no javax.jms mock classes.
>
> Am I missing something?
No, that's why the jms block is disabled by default. When Chris first
committed the jms block there was some question whether the sun jars
for JMS were allowed in cvs. Since then we've resolved that they are
not. We then either had to create mocks or create a parallel Apache
licensed version.
I found such a beast at the geronimo project and asked recently whether
this was OK. I'm wondering more about whether an unreleased jar from a
project in incubation is ok for now. I've not checked into whether
there are concrete classes or abstract classes that actually define
working methods or not which I suppose could influence the decision.
(if there are not, the mocks would be the same). Before I or someone
else goes to the trouble of creating a bunch of mock classes, I thought
it worth pursuing the real deal.
So, anyone have an opinion on including the Geronimo jms jar? It's at
ibiblio for convenience but we can also build it from their cvs. I
assume there's no license conflict! :)
Geoff
Re: missing mocks for jms blocks ?
Posted by Sylvain Wallez <sy...@anyware-tech.com>.
Michael Hartle wrote:
> Sylvain Wallez wrote:
>
>> Go to http://java.sun.com/products/jms/docs.html then click on the
>> "continue" button below "Download the version 1.1 API..." and read
>> section 2 of the licence: "you may not modify, decompile, or reverse
>> engineer Software".
>>
>> Auto-generating mocks from a jar file definitely looks like reverse
>> engineering.
>
>
> Okay, understood - but in this case, simply using the Java Reflection
> API on a class in the java.* or javax.* packages would already be a
> license violation due to the "reverse engineering" aspect, or am I
> mistaken ?
Tough question... Where does reflective programming and reverse
engineering start? I have no answer...
> Hmm... I sent a private query to the Sun Sales staff asking for their
> opinion on this and on the (auto-)generation of mocks of their
> optional Java packages, as it is an interesting question. If
> auto-generation was allowed, such a tool might automate the whole mock
> class generation.
I guess I know the answer: they will cover their ass and answer either
that you cannot or that they don't know but that you should avoid it in
case it violates the licence ;-)
Sylvain
--
Sylvain Wallez Anyware Technologies
http://www.apache.org/~sylvain http://www.anyware-tech.com
{ XML, Java, Cocoon, OpenSource }*{ Training, Consulting, Projects }
Orixo, the opensource XML business alliance - http://www.orixo.com
Re: missing mocks for jms blocks ?
Posted by Michael Hartle <mh...@hartle-klug.com>.
Sylvain Wallez wrote:
> Go to http://java.sun.com/products/jms/docs.html then click on the
> "continue" button below "Download the version 1.1 API..." and read
> section 2 of the licence: "you may not modify, decompile, or reverse
> engineer Software".
>
> Auto-generating mocks from a jar file definitely looks like reverse
> engineering.
Okay, understood - but in this case, simply using the Java Reflection
API on a class in the java.* or javax.* packages would already be a
license violation due to the "reverse engineering" aspect, or am I
mistaken ? Hmm... I sent a private query to the Sun Sales staff asking
for their opinion on this and on the (auto-)generation of mocks of their
optional Java packages, as it is an interesting question. If
auto-generation was allowed, such a tool might automate the whole mock
class generation.
> Sylvain
Best regards,
Michael Hartle
Re: missing mocks for jms blocks ?
Posted by Sylvain Wallez <sy...@anyware-tech.com>.
Michael Hartle wrote:
> Sylvain Wallez wrote:
>
>> Michael Hartle wrote:
>>
>>> Just a question, those mock classes, are they created manually or do
>>> you already use some tool to generate them ?
>>
>>
>> In order to be compliant with the licence, they should
>> _theroretically_ be written by hand from a publicly available
>> information such as the javadoc on java.sun.com...
>
>
> Hmm...do you accidentially have a pointer regarding this license
> limitation imposed by Sun ? Theoretically, a good manual mock
> implementation would not differ from an auto-generated one, or am I
> mistaken ?
Go to http://java.sun.com/products/jms/docs.html then click on the
"continue" button below "Download the version 1.1 API..." and read
section 2 of the licence: "you may not modify, decompile, or reverse
engineer Software".
Auto-generating mocks from a jar file definitely looks like reverse
engineering.
Now you're right that hand-written mocks should not be very different
from those produced by a reflection-based generator. And adding a bit of
method order shuffling would even make it more handwritten ;-)
Sylvain
--
Sylvain Wallez Anyware Technologies
http://www.apache.org/~sylvain http://www.anyware-tech.com
{ XML, Java, Cocoon, OpenSource }*{ Training, Consulting, Projects }
Orixo, the opensource XML business alliance - http://www.orixo.com
Re: missing mocks for jms blocks ?
Posted by Michael Hartle <mh...@hartle-klug.com>.
Sylvain Wallez wrote:
> Michael Hartle wrote:
>
>> Just a question, those mock classes, are they created manually or do
>> you already use some tool to generate them ?
>
> In order to be compliant with the licence, they should
> _theroretically_ be written by hand from a publicly available
> information such as the javadoc on java.sun.com...
Hmm...do you accidentially have a pointer regarding this license
limitation imposed by Sun ? Theoretically, a good manual mock
implementation would not differ from an auto-generated one, or am I
mistaken ?
> Sylvain
Best regards,
Michael Hartle
Re: missing mocks for jms blocks ?
Posted by Geoff Howard <co...@leverageweb.com>.
Sylvain Wallez wrote:
> Michael Hartle wrote:
>
>> Sylvain Wallez wrote:
>>
>>> Carsten Ziegeler wrote:
>>>
>>>> I had the same problem - as the mocks are missing, this block is
>>>> excluded by default, so you don't get build problems using ant.
>>>>
>>> Ah, ok. But it is a bad thing to have code that's not compiled in the
>>> default build...
>>>
>>>> Only with Eclipse you have the problem, I removed by hand the jms
>>>> block from the source list of Eclipse.
>>>>
>>> That's what I did ;-)
>>>
>>> Sylvain
>>>
>> Just a question, those mock classes, are they created manually or do
>> you already use some tool to generate them ?
>
> In order to be compliant with the licence, they should _theroretically_
> be written by hand from a publicly available information such as the
> javadoc on java.sun.com...
Which I presume is what Geronimo did.
Geoff
>> In case of the former, I recently wrote a tool to auto-implement
>> interfaces as stubs with minimal methods to be extended manually -
>> this could probably adapted to generate mock classes that naturally
>> would not require further manual work.
>
>
>
> Sylvain
>
Re: missing mocks for jms blocks ?
Posted by Sylvain Wallez <sy...@anyware-tech.com>.
Michael Hartle wrote:
> Sylvain Wallez wrote:
>
>> Carsten Ziegeler wrote:
>>
>>> I had the same problem - as the mocks are missing, this block is
>>> excluded by default, so you don't get build problems using ant.
>>>
>> Ah, ok. But it is a bad thing to have code that's not compiled in the
>> default build...
>>
>>> Only with Eclipse you have the problem, I removed by hand the jms
>>> block from the source list of Eclipse.
>>>
>> That's what I did ;-)
>>
>> Sylvain
>>
> Just a question, those mock classes, are they created manually or do
> you already use some tool to generate them ?
In order to be compliant with the licence, they should _theroretically_
be written by hand from a publicly available information such as the
javadoc on java.sun.com...
> In case of the former, I recently wrote a tool to auto-implement
> interfaces as stubs with minimal methods to be extended manually -
> this could probably adapted to generate mock classes that naturally
> would not require further manual work.
Sylvain
--
Sylvain Wallez Anyware Technologies
http://www.apache.org/~sylvain http://www.anyware-tech.com
{ XML, Java, Cocoon, OpenSource }*{ Training, Consulting, Projects }
Orixo, the opensource XML business alliance - http://www.orixo.com
Re: missing mocks for jms blocks ?
Posted by Michael Hartle <mh...@hartle-klug.com>.
Sylvain Wallez wrote:
> Carsten Ziegeler wrote:
>
>> I had the same problem - as the mocks are missing, this block is
>> excluded by default, so you don't get build problems using ant.
>>
> Ah, ok. But it is a bad thing to have code that's not compiled in the
> default build...
>
>> Only with Eclipse you have the problem, I removed by hand the jms
>> block from the source list of Eclipse.
>>
> That's what I did ;-)
>
> Sylvain
>
Just a question, those mock classes, are they created manually or do you
already use some tool to generate them ? In case of the former, I
recently wrote a tool to auto-implement interfaces as stubs with minimal
methods to be extended manually - this could probably adapted to
generate mock classes that naturally would not require further manual work.
Best regards,
Michael Hartle
Re: missing mocks for jms blocks ?
Posted by Sylvain Wallez <sy...@anyware-tech.com>.
Carsten Ziegeler wrote:
>I had the same problem - as the mocks are missing, this block is excluded by default, so you don't get build problems using ant.
>
Ah, ok. But it is a bad thing to have code that's not compiled in the
default build...
>Only with Eclipse you have the problem, I removed by hand the jms block from the source list of Eclipse.
>
That's what I did ;-)
Sylvain
--
Sylvain Wallez Anyware Technologies
http://www.apache.org/~sylvain http://www.anyware-tech.com
{ XML, Java, Cocoon, OpenSource }*{ Training, Consulting, Projects }
Orixo, the opensource XML business alliance - http://www.orixo.com
RE: missing mocks for jms blocks ?
Posted by Carsten Ziegeler <cz...@s-und-n.de>.
I had the same problem - as the mocks are missing, this block
is excluded by default, so you don't get build problems
using ant. Only with Eclipse you have the problem, I removed
by hand the jms block from the source list of Eclipse.
But yes, adding mocks is a better way!
Carsten
> -----Original Message-----
> From: Sylvain Wallez [mailto:sylvain.wallez@anyware-tech.com]
> Sent: Tuesday, October 21, 2003 4:12 PM
> To: dev@cocoon.apache.org
> Subject: missing mocks for jms blocks ?
>
>
> Hi team,
>
> Today I did a fresh "build eclipse-project", and found that the JMS
> block doesn't compile because there are no javax.jms mock classes.
>
> Am I missing something?
>
> Sylvain
>
> --
> Sylvain Wallez Anyware Technologies
> http://www.apache.org/~sylvain http://www.anyware-tech.com
> { XML, Java, Cocoon, OpenSource }*{ Training, Consulting, Projects }
> Orixo, the opensource XML business alliance - http://www.orixo.com
>
>