users@glassfish.java.net

Re: Using JAX-WS inside EJB Module to get environment entries

From: <glassfish_at_javadesktop.org>
Date: Mon, 02 Jul 2007 11:22:57 PDT

The key to doing this is to make sure the component environment name for the env-entry declared
by @Resource matches the corresponding env-entry-name for the env-entry in ejb-jar.xml.

All Java EE environment annotations have an attribute called name(). The easiest thing to do is
specify the name() attribute in @Resource and then use that same value for env-entry-name.
That way the appserver knows that the two are associated.

If name() is not specified in @Resource, it will default to
<fully-qualified-declaring-class-name>/<field-name>

It's fine to rely on the default, as long as you then use the default name as the value for
env-entry-name.

 --ken
[Message sent by forum member 'ksak' (ksak)]

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