users@glassfish.java.net

Re: Specification question related to overriding annotations

From: <glassfish_at_javadesktop.org>
Date: Tue, 18 Mar 2008 09:11:19 PST

> You should be able to override, but the association
> between the annotation and the .xml elements is based
> on the component environment name of the dependency.

AHA! Great. This is kind of murky, isn't it? All I see in the javadoc for PersistenceContext is:

"The name by which the entity manager is to be accessed in the environment referencing context, and is not needed when dependency injection is used."

...and, from the spec (16.11.2.1):

"The relevant deployment descriptor entry is located based on the JNDI name used with the annotation (either defaulted or provided explicitly)."

Er, uh, OK. :-) But now that you've spelled it out, yes, this makes sense.

Thanks again.

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

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