2 Replies Latest reply on Jun 9, 2006 7:08 PM by bdecoste

    JNDI Problem in EAR Deployment

      Hello,

      I am running JBoss-4.0.4.GA, using the ejb3 deployer. I deploy my application as an exploded EAR archive (my-app.ear)

      I was expecting to be able to access my components as demonstrated in the EJB3 tutorial:

      Context ctx = new InitialContext();
      MyComponentLocal c = (MyComponentLocal) ctx.lookup("MyComponentBean/local");
      


      However, this always resulted in an error stating that MyComponentBean was not bound. After some investigation, I discovered that the component was not bound to "MyComponentBean/local" as I expected but to "my-app/MyComponentBean/local". In fact, all my components are bound to JNDI names in the "my-app" namespace.

      Is this desired behavior? If so, is there an override that will allow me to bind my components to the root namespace?

      This situation is problematic because I'm testing my components outside of the container and the embedded jboss container binds the components in the root namespace. Help appreciated.

      Thanks,

      Matt Tucker