[jboss-user] [EJB 3.0] - Invoke remote EJB3 from JVM 1.4 client

bmaras do-not-reply at jboss.com
Wed Aug 8 04:03:21 EDT 2007


I managed to call remote EJB3 from a JVM 1.4 client.
I would be glad to have some feedback on the way I dit it : is it safe? Should I open a JIRA to publish a patch?

I use JBoss 4.0.3SP1 with EJB3 RC6. A JDK 1.5 is needed for the EJB3.
I need to remotely call some of these EJB from a client that runs on JDK 1.4.

It doesn't work natively, because the jboss-ejb3.jar bundled with EJB3 RC6 is compiled with JDK 1.5. It gives errors on major/minor version.

So I used JBossRetro (http://labs.jboss.com/jbossretro/) to convert this jar in jdk 1.4 compatible format.
That gave me a jar that works in my jdk 1.4 client.

I also needed to create a client jar for my EJBs, compiled with a 1.4 target.
I had to include the EJB interfaces in it, but they don't compile by default because of the annotations @Local and/or @Remote, so I needed to remove these annotations when I compile the client jar.

Thus, I can call my EJB 3 Session Stateless Beans. I need on my client :
- the client jar for my EJBs, compiled as explained above
- the generated jboss-ejb3-client14.jar
- jbossretro-rt.jar
- jboss-backport-concurrent.jar
- javassist.jar

I tested that on JBoss 4.0.3SP1+EJB3 RC6, with Session Stateless Beans only.

I have a patch for the current version of ejb3/build.xml. I could not test the generated jar from this script, because I only use JBoss 4.0.3SP1 that doesn't support the latest version of EJB3 jars.
I generated my jboss-ejb3-client14.jar with another ant script, that does this :
- uncompress the file jboss-ejb3.jar bundled with EJB3 RC6
- delete all files that are not included in jboss-ejb3-client.jar (based on the list of current ejb3/build.xml)
- run jbossretro on the classes, using the jboss 4.0.3SP1 libraries on the classpath
- recompress the jar

Should I create a JIRA for that ?
I would be glad to have some feedback on all that.

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4071870#4071870

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4071870



More information about the jboss-user mailing list