users@glassfish.java.net

Re: EntityManager not being injected into abstract EJB?

From: <glassfish_at_javadesktop.org>
Date: Wed, 14 Apr 2010 10:05:18 PDT

> At test time, I have a ConcreteDAO that exends
> AbstractDAO and makes use of the injected em.
>
> However, the test fails when em.persist() is called,
> claiming that injection into AbstractDAO's em has
> failed. So the em is non-null, but the lazy
> initialization of its innards fails.

I've made AbstractDAO concrete to see if that had something to do with it, and that had no effect. So abstractness doesn't seem to be the issue, which is good, since the spec clearly allows injection targets to be abstract.

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

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