-
1. Re: Calling EJB running on JBoss 5.1 from app running on JBoss 6.3
lylewang May 24, 2015 9:27 PM (in response to andyfreeman)I guess when you say "JBoss 6.3" you actually mean "JBoss EAP 6.3" ?
EJB technology has been changed a lot between JBoss AS5/EAP5 and JBoss AS7/EAP6.
As you're calling an EJB deployed on EAP 5, you're going to use the client jars from JBoss EAP 5 "$JBOSS_HOME/client". Package these client jars (and dependencies) in your client application (which is deployed on EAP 6), or install them as a custom module in EAP 6. Then you will be looking at some code / setup as described in here: https://developer.jboss.org/wiki/howtouseanapplicationclientinjboss-5
Sorry to say that but to be honest this is not something I would encourage you to do, as this approach is not really officially supported, and you might end up with some unknown issues or not working very well sometimes.
Another option is to use Webservices (JAX-WS/JAX-RPC/JAX-RS), or upgrade your EAP 5 to 6.x
-
2. Re: Calling EJB running on JBoss 5.1 from app running on JBoss 6.3
ehugonnet May 26, 2015 3:00 AM (in response to andyfreeman)The naming service has changed between EAP 6.3 and EAP5. In EAP5, it is using JNP, thus you will have to create your own JNDI context to be able to call the remote EJB using some properties file or setting the env 'by hand' with something like :
java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
java.naming.provider.url=jnp://127.0.0.1:1099
java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces
java.naming.security.principal=admin
java.naming.security.credentials=passw0rd!
-
3. Re: Calling EJB running on JBoss 5.1 from app running on JBoss 6.3
andyfreeman Jun 1, 2015 12:24 PM (in response to lylewang)Thanks for that Lyle, not the answer I wanted but the one I did expect. I had already tried to add a module for the client jars, but as you thought might happen I ended up getting some strange errors and so gave up on this approach. Looks like I'll have to push for an upgrade so they are both using the same version of JBoss.