users@glassfish.java.net

Re: Injection of ref to EJB fails

From: <glassfish_at_javadesktop.org>
Date: Thu, 22 Mar 2007 02:22:43 PST

Hi again Ken,

I think I'm getting closer. I have one of my EJB (AuthnManager) which is exposing its methods through webservices, so I need to use the wsgen tool to generate the artifacts. I could do that from my ant script by including all necessary classes in the classpath. However, when deploying the .ear file to GlassFish, I have another problem: AuthnManager invokes the SessionStore EJB methods. So during deployment, GlassFish runs wsgen itself, and needs to find the SessionStore classes. How should those be packaged with AuthnManager?

What worked was to include the SessionStore classes in a lib directory in the .ear file. However, if I want to package all my EJBs into a single ear file, how should I proceed? The logical structure would be the following:

limbsSessionStoreEJB.jar
limbsMessageBrokerEJB.jar
limbsAuthnEJB.jar
limbsAuthzEJB.jar
limbsBusinessLoggerEJB.jar
lib/limbscomponents.jar
lib/sharedcomponents.jar
META-INF/
META-INF/MANIFEST.MF
META-INF/application.xml

with each EJB.jar's MANIFEST including a Class-Path directive. But for the problem of wsgen described above, it also means that some of the EJB classes need to be in the lib directory, which is kind of messy.

Or should I make sure that each EJB jar file includes all necessary classes (i;e. the Bean class and interface from the EJBs being invoked?)

Thanks for your help, I think I'm almost done :-)

Jean-Noel
[Message sent by forum member 'jncolin' (jncolin)]

http://forums.java.net/jive/thread.jspa?messageID=209385