]
Andrew Lovell commented on EJBTHREE-1029:
-----------------------------------------
A one workaround I have found is to deploy a EJB2.1 facade to the EJB3.0 on the server,
this I found I needed to compile with 1.4.2 even though it will end up running on 1.6.x.
Then I use the client jar's from 4.0.x and download and use the 2.0.x jar from
jbossremoting to replace the 1.x.x version that comes with 4.0.x, this seems to work ok on
client jdk1.4.2 -> server jdk1.6.x.
Is there a simpler way to do this?
Invoke remote EJB3 from JVM 1.4 client
--------------------------------------
Key: EJBTHREE-1029
URL:
https://jira.jboss.org/jira/browse/EJBTHREE-1029
Project: EJB 3.0
Issue Type: Patch
Environment: Server : JDK 1.5.0_10, JBoss 4.0.3SP1 + EJB3 jars (RC6), EJB 3
Session Stateless
Client : JDK 1.4.2
Reporter: Boris Maras
Attachments: build-client1.4convert.xml, jboss-ejb3-client14.jar, patch build.xml
ejb3-client1.4.txt
Natively, you cannot use a JVM 1.4 client to call JBoss EJB3. This is because the
jboss-ejb3.jar is compiled with JDK 1.5 : using it in a 1.4 JVM gives errors on
major/minor version.
So I used jbossretro to convert this jar in jdk 1.4 compatible format.
That gave me a jar that works in my jvm 1.4 client (see attached file, to be used with
JBoss 4.0.3SP1 + EJB3 RC6)
In order to use it, you also need to create a client jar for your EJBs, compiled with a
1.4 target. At compile time, you'll probably need to remove some annotations (@Local,
@Remote etc). Thus, you need on the client side :
- the client jar for your EJBs
- 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 attach a patch for the current version of ejb3/build.xml, that generates the
jboss-ejb3-client14.jar for the current version. I could not test this version, because I
only use JBoss 4.0.3SP1, that doesn't support it.
I also attach the jboss-ejb3-client14.jar that works with EJB3 RC6 and JBoss 4.0.3SP1. I
generated it with another ant script (also attached), that does this :
- uncompress the file jboss-ejb3.jar
- 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
This ant script should probably let you convert the jar of other versions of JBoss &
EJB3.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: