geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From James Strachan <jastrac...@mac.com>
Subject Re: using Java 5 for java.util.concurrent & annotations and then generating 1.4 compliant jars?
Date Wed, 04 Jan 2006 06:58:08 GMT
Using Generics, java-util-concurrent & annotations really is a no brainer with retrotranslator;
the only real downside I can see is that it means we'll have 1.4 and 1.5 versions of jars.
I guess in the grand scheme of things its not the end of the world.

I"ll post an update when I've got the maven plugin working nicely.

James
 
On Wednesday, January 04, 2006, at 00:05AM, Dain Sundstrom <dain@iq80.com> wrote:

>I would love to start using Java 5 as soon as possible.  I have been  
>using the backport-util-concurrent package for a while in xbean and  
>the Java 5 interfaces are really nice to use.  Above all other  
>features, I would love to have generics support in geronimo.   
>Generics give me much more data when creating collections in the IoC  
>code.  Right now, the collection creation code I have is very dumb  
>since it must assume that a collection can contain any object.
>
>-dain
>
>On Dec 30, 2005, at 9:59 AM, jastrachan@mac.com wrote:
>
>> First a quick bit of background on why Retrotranslator rocks...
>> http://radio.weblogs.com/0112098/2005/12/29.html#a546
>>
>> Retrotranslator can take any Java 5 bytecode using generics,  
>> annotations, auto-boxing, varargs & java.util.concurrent utilities  
>> and generate regular 1.4 bytecode that runs just fine on Java 1.4.  
>> The 1.4 bytecode uses backport-util-concurrent.jar for the  
>> java.util.concurrent stuff, retrotranslator_runtime.jar for other  
>> new methods added to Java 5 such as new reflection/generics stuff  
>> and asm.jar is currently used to read the annotations. So if you  
>> only use the Java 5 concurrent APIs then the only new dependency  
>> added on 1.4 is backport-util-concurrent.
>>
>> We should be able to create a maven 2 plugin (I've already started)  
>> which uses Java 5 for the build to make a Java 5 binary but also  
>> creates a 1.4 compliant binary.
>> http://svn.mojo.codehaus.org/trunk/mojo/mojo-sandbox/ 
>> retrotranslator-maven-plugin/
>> We should hopefully be able to run tests against both JVMs for each  
>> binary too.
>>
>> Now given that Java 5 concurrent is faster than backport-util- 
>> concurrent.jar & concurrent.jar it would be good for us to use this  
>> by default throughout the Geronimo family of projects. Similarly it  
>> would be extremely useful to start using annotations and generics &  
>> the new for loop can be handy too.
>>
>> So I wonder; should we experiment with 1 module using Java 5 and  
>> creating a 1.4 binary jar? (I'm quite tempted to try this in  
>> ActiveMQ to see how it goes). If we start with just the  
>> java.util.concurrent <-> backport.util.concurrent it'd be fairly  
>> easy to switch back again later if we hit some showstopper.
>>
>> Thoughts?
>>
>> James
>> -------
>> http://radio.weblogs.com/0112098/
>
>
>

Mime
View raw message