users@glassfish.java.net

Re: @PersistenceContext ignored in library jar classes?

From: <forums_at_java.net>
Date: Wed, 29 Aug 2012 06:42:49 -0500 (CDT)

[quote=ljnelson]On Tue, Aug 28, 2012 at 10:48 AM, wrote: As a (gross)
workaround, have you tried annotating your library jar with @ManagedBean?
[/quote] I tried it, but it did not change anything. How can it be nobody
noticed this until now? I tried it with gf 3.0 - gf-3.1.2.2 an it's the same.
I have the suspicion I'm doing something wrong. As a workaround for now, I'm
taking the EntityManager from jndi, which means I have to annotate all my
ejbs with @PersistenceContext. argggh. There seems to be no better way... I
even tried "@Produces @PersistenceContext" in my ejb.jar and @Inject this
into my jar, but this does not work (because of class loading) I will compile
a bug report on this.

--
[Message sent by forum member 'bergler']
View Post: http://forums.java.net/node/889633