users@glassfish.java.net

Re: Resource injection in servlet (JMS)

From: <glassfish_at_javadesktop.org>
Date: Mon, 08 Oct 2007 06:31:07 PDT

> The first way to fix the problem is to use
> "mappedName" instead of "name" in the annotation.

Correct, but not portable

> The second way is to add an entry in sun-web.xml, to
> declare the mapping between the content of the "name"
> field in the annotation and the JNDI name of the
> Queue in Glassfish. (in my case, a mappting between
> "jms/ProcessingQueue" and "jms/ProcessingQueue")

Correct, and portable.

> The Java EE tutorial uses this field in the JMS
> examples.

Indeed, IMO an unfortunate decision :-(

The best explanation of this topic I know can be found here:
https://glassfish.dev.java.net/javaee5/ejb/compdependencies_xmlforum_nov15.pdf

fvu
[Message sent by forum member 'fvu' (fvu)]

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