1 Reply Latest reply on Jan 26, 2003 7:26 AM by Juha Lindfors

    to solve this problem

    JuanManuel Newbie

      Hello. I'd like to solve the following problem. First, I apologize for my english.

      I have 2 J2EE applications (example: application A, application B). And A requieres to obtain EJBs of B, via JNDI.

      Developing J2EE applications, I have built standalones, and my way to access to EJBs via JNDI (example: standalone is C, and J2EE application is D) is deploying D, and C imports the .jar of D placed in other folder, out of JBoss.

      ¿In my case, how to deploy A and B, and how A have to obtain EJBs of B via JNDI?

        • 1. Re: to solve this problem
          Juha Lindfors Master

          Package the remote interfaces of application B and deploy them with application A (there are many ways to do this, it depends which approach you prefer -- you can add the interfaces as part of your application A jar or create a separate jar for them, etc.).

          Then application A should do a normal lookup for an EJB in the java:comp/env namespace and you need to map that lookup string (that you use in your code) to the global JNDI name that beans in application B use. This mapping you can do in jboss.xml (<jndi-name> tag, see the DTD for more info).