users@glassfish.java.net

Re: Specification question related to overriding annotations

From: <glassfish_at_javadesktop.org>
Date: Wed, 23 Apr 2008 13:21:47 PDT

Hi, Cheng; I actually have experienced the [i]opposite[/i] of what you suggest here.

That is, the only scenario under which XML-based injection is working is when there is only one EJB in the jar, and all of its inherited and referenced classes are elsewhere (in my case, in the .ear file's lib directory).

So, to be clear, I have ConcreteBean that extends AbstractBean. ConcreteBean is packaged in its own jar file with its own META-INF/ejb-jar.xml file. The injection target specified in there is AbstractBean/entityManager. This works fine.

If I move ConcreteBean into the same jar as AbstractBean, and if I move the <session> element from its ejb-jar.xml into the ejb-jar.xml file that exists in AbstractBean's jar file, then injection does NOT work.

Can you describe what's going on, or why such packaging games are necessary? This is certainly not addressed one way or the other in the specification explicitly.

Thank you,
Laird
[Message sent by forum member 'ljnelson' (ljnelson)]

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