1 Reply Latest reply on Feb 17, 2012 6:06 PM by xinziwu

    How to invoke an EJB deployed on JBoss 5.1 from a JBoss 7.1 client?

    xinziwu Newbie

      I'm currently running a web-based application using JBoss 7.1.0 beta 1b. I need to invoke an EJB hosted on a remote JBoss 5.1 server. Back in the JBoss 5 time, I would use the following code to look up the EJB:


      Properties properties = new Properties();




      InitialContext ctx = new InitialContext(properties);

      String jndiName = "MyEJBService";   

      myEjb = ctx.lookup(jndiName);


      However, the above code does not work for JBoss 7.1. I'm aware of the EJB remote client changes introduced in JBoss 7.1 and have read the article https://docs.jboss.org/author/display/AS71/EJB+invocations+from+a+remote+client+using+JNDI. However, in my case, the actual EJB is still hosted on JBoss 5.1. It's the remote EJB client that lives on JBoss 7.1. Is it even possible to have a JBoss 7.1 remote EJB client to invoke an EJB hosted on JBoss 5.1? Any insights/directions are greatly appreciated!