1 Reply Latest reply on Aug 14, 2006 5:12 PM by bsheward

    Accessing EJB3 Session Beans from a JAR in a WAR?

      Hi,

      I've created a JAR file, within a WAR file, deployed within an EAR file into JBoss 4.0.4. The JAR file contains JUnit tests which I've hooked into J2EEUnit.

      The problem is that the tests in the JAR file don't seem to be able to find the Session Beans.

      I've tried all sorts of names in an InitialContext.lookup(), the compiler crashed when I tried using @EJB in the JUnit test classes, but I wonder if I need to do something in the WARs web.xml to expose the EJBs in a similar way to with EJB 2.

      Can anyone please point me in the right direction? The O'Reilly book only seems to deal with a separate application, not a web application.

      Thanks and Regards,

      Barry