geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jastrac...@mac.com
Subject using Java 5 for java.util.concurrent & annotations and then generating 1.4 compliant jars?
Date Fri, 30 Dec 2005 17:59:56 GMT
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