I have built a minimal .ear containing an ejb.jar on top level and a
library.jar in the lib folder of the .ear. The library.jar contains a
META-INF/persistence.xml, both ejb.jar and library.jar contain empty
META-INF/beans.xml. @Injection works fine in both jars. Within the
library.jar I try to inject an EntityManager with
@PersistenceContext(unitName="xxx") EntityManager em; I think at deploy time
this annotation is regarded by glassfish, because an incorrect unitName leads
to an appropriate deployment error. At runtime, alas, the member is allways
null. The same annotation within the ejb.jar works fine. Could this be a bug
in glassfish? I'm using 3.1.2.2 and have tried it even with 3.1.0, same
effect. thank you for your help /roland
--
[Message sent by forum member 'bergler']
View Post: http://forums.java.net/node/889633