users@glassfish.java.net

Re: _at_PersistenceContext ignored in library jar classes?

From: Laird Nelson <ljnelson_at_gmail.com>
Date: Tue, 28 Aug 2012 08:44:50 -0700

On Tue, Aug 28, 2012 at 8:07 AM, <forums_at_java.net> wrote:

> Within the library.jar I try to inject an EntityManager with
> @PersistenceContext(unitName="**xxx") EntityManager em;


You can't do this. You may use @PersistenceContext inside an EJB but not a
library jar.

Best,
Laird

-- 
http://about.me/lairdnelson