users@glassfish.java.net

Re: Null _at_PersistenceContext: no errors, no warnings?

From: <glassfish_at_javadesktop.org>
Date: Wed, 21 Jul 2010 07:16:05 PDT

> > 1) Is there a beans.xml in every JAR meant to
> receive
> > the blessings of CDI?
>
> I thought so. Perhaps I need an extra one.

I needed the extra one. It seems to be that if M injects N via CDI, then even if N does not use CDI for its transitive dependency injection (i.e. if N contains, for example, a @PersistenceContext-injected EntityManager, not an @Inject-injected EntityManager) you must have META-INF/beans.xml present in N's jar.

Best,
Laird
[Message sent by forum member 'ljnelson']

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