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, [EMAIL PROTECTED] 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/