backport175 is porting of the Java 5 annotations (JSR-175) specification to the Java 1.3 and 1.4 platform, making strongly typed annotation available for older JVMs. They are bytecode compatible with Java 5 annotations making them available for use by tools or AOP frameworks.
The project also includedes plugins for IDEA and Eclipse.
Check out Backport175.
-
Backport175 1.0 released: Annotations for Java 1.3 & 1.4 (6 messages)
- Posted by: Floyd Marinescu
- Posted on: June 16 2005 10:28 EDT
Threaded Messages (6)
- Hibernate 3? by Matt Giacomini on June 16 2005 11:21 EDT
- Hibernate 3? by Bill Burke on June 16 2005 11:37 EDT
-
Hibernate 3? by Alex Vasseur on June 16 2005 11:58 EDT
- Hibernate 3? by Emmanuel Bernard on June 16 2005 10:07 EDT
-
Hibernate 3? by Alex Vasseur on June 16 2005 11:58 EDT
- Hibernate 3? by Bill Burke on June 16 2005 11:37 EDT
- Wrong direction by peter jodeleit on June 17 2005 02:49 EDT
- Wrong direction by Alex Vasseur on June 17 2005 04:10 EDT
-
Hibernate 3?[ Go to top ]
- Posted by: Matt Giacomini
- Posted on: June 16 2005 11:21 EDT
- in response to Floyd Marinescu
Does this mean that we can use Hibernate 3 anotations with a 1.4 JVM? -
Hibernate 3?[ Go to top ]
- Posted by: Bill Burke
- Posted on: June 16 2005 11:37 EDT
- in response to Matt Giacomini
Does this mean that we can use Hibernate 3 anotations with a 1.4 JVM?
No, because HB3 annotations would have to use Backport. -
Hibernate 3?[ Go to top ]
- Posted by: Alex Vasseur
- Posted on: June 16 2005 11:58 EDT
- in response to Bill Burke
Bill
It is not exactly that. Backport is not intrusive.
Ones would need to ship java 1.3/1.4 interfaces that mirrors the official Hibernate Java 5 annotations. That 's a fairly straightforward task (Backport does support default values as well f.e.). Let's call it "hb-anno-1.3.jar"
From there ones write its source code of persitent object for 1.3/1.4, thus using doclets style.
The build process for this user would then be:
- compile with regular javac (1.3/1.4)
- use Backport (Ant task / IDE plugin) with the hb-anno-1.3.jar in the classpath to process the Hibernate doclets annotations
the output will then be 1.3/1.4 level .class files that will be understood out of the box by Hibernate.
The question is then - does Hibernate 3 reads the annotation using reflection (thus requiring Java 5) or using some more low level way that works on Java 1.3/1.4? ie is it possible for Hibernate to support its annotation style even on 1.3.
Alex -
Hibernate 3?[ Go to top ]
- Posted by: Emmanuel Bernard
- Posted on: June 16 2005 22:07 EDT
- in response to Alex Vasseur
IMO it makes no sense to use annotations wo Java 5. Here are the 2 *very* good reasons to use annotations:
- implicit contextual informations: Generic collections are a time saver in conjunction with H3 annotations
- Type safety and refactoring
Both of them require Java 5 -
Wrong direction[ Go to top ]
- Posted by: peter jodeleit
- Posted on: June 17 2005 02:49 EDT
- in response to Floyd Marinescu
I think this solution goes the wrong direction. The other direction - develop with jdk 1.5 and port this back to achieve 1.4 or even 1.3 compatibility - i would recommend.
The tool of choice for this is retroweaver. -
Wrong direction[ Go to top ]
- Posted by: Alex Vasseur
- Posted on: June 17 2005 04:10 EDT
- in response to peter jodeleit
The actual direction is not to force the user in some or other way, but have your project / lib / framework provide almost the same feature set on both 1.5 and 1.4 - with implicit and undeniable benefits when using 1.5.
We have done that for more than 2 years f.e. in AspectWerkz by providing a way to write plain java aspect using annotation - this with or without Java 5.
This means that teams that are working with 1.4 (as in real world) can use today annotations. This is not at all new (XDoclet etc). The difference with backport is bytecode compatibility hence this helps tools that consume those annotations (f.e. AOP).
I would never go with retroweaver since it is the best option to use Java 5 features (directly or thru some third parties) that won't be retroweaved at all - hence be stuck in some middle unnamed version 1.4 / 1.5
Simple example: annotations, runtime visible annotations.
Another example: use of JDK concurrent, or new java.lang.reflect calls and so on.
I think the purpose are simply different. We do one thing and one thing well.
Alex