JMS « Resource « JSP-Servlet Q&A





2. Resource injection in servlet (JMS)    java.net

The first way to fix the problem is to use "mappedName" instead of "name" in the annotation. 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")