users@glassfish.java.net

Re: CDI _at_PersistenceContext not working when DAO/Bean in own Jar (GFv3)

From: Witold Szczerba <pljosh.mail_at_gmail.com>
Date: Sat, 1 May 2010 20:55:56 +0200

2010/5/1 Dominik Dorn <dominik.dorn_at_gmail.com>:
> I will try your suggestion and see if it works then, but I really doubt that.

Did you check the thread I mentioned?
Try this: add one simple @Stateless (EJB) class and inject
EntityManager there. There is no need to use that session bean, but as
far as I can tell, Glassfish does not start JPA module if there is no
at least one EJB using it. Once JPA is started there should be no
problem with CDI accessing persistence context.

Regards,
Witold Szczerba