I'm having a bear of a time trying to get JMS to work from within a web
application. Here's all the pertinent information. I've created the
following via the console:
Group: Logging (console.jms/Logging/1.0/rar)
Type - Name - Deployed As - State
Connection Factory - LoggingConnectionFactory - Server-wide - running
Queue - LoggingQueue - Server-wide - running
Here's my web.xml file (simplified a little):
----
<?xml version="1.0" encoding="UTF-8"?>
<web-app ...ns... version="2.5">
...other stuff...
<resource-ref>
<res-ref-name>LoggingConnectionFactory</res-ref-name>
<res-type>javax.jms.QueueConnectionFactory</res-type>
<res-auth>Container</res-auth>
<res-sharing-scope>Shareable</res-sharing-scope>
</resource-ref>
<message-destination-ref>
<message-destination-ref-name>LoggingQueue</message-destination-ref-name>
<message-destination-type>javax.jms.Queue</message-destination-type>
<message-destination-usage>Produces</message-destination-usage>
<message-destination-link>LoggingQueue</message-destination-link>
</message-destination-ref>
</web-app>
----
The top of my servlet:
----
...package, imports....
public class TestServlet extends HttpServlet {
@Resource(name = "LoggingConnectionFactory")
private ConnectionFactory factory;
@Resource(name = "LoggingQueue")
private Queue queue;
...etc...
----
All of the above is almost a direct copy of the code from
http://cwiki.apache.org/GMOxDOC21/jms-mdb-jms-and-mdb-sample-application.html.
When trying to deploy, I get the error:
Distribution of module failed. See log for details.
Can not resolve admin object ref
?j2eeType=JCAAdminObject,name=LoggingQueue# in configuration
test/webApp/1.0/car
org.apache.geronimo.common.DeploymentException: Can not resolve admin
object ref ?j2eeType=JCAAdminObject,name=LoggingQueue# in configuration
test/webApp/1.0/car
...etc...
Caused by: org.apache.geronimo.kernel.GBeanNotFoundException: No matches
for referencePatterns: [?j2eeType=JCAAdminObject,name=LoggingQueue#]
...etc...
What am I missing?
P.S. When will the walk-throughs be updated? For example,
jms-mdb-jms-and-mdb-sample-application contains invalid information in the
web.xml snippet and using the code as is doesn't work.
--
View this message in context:
http://www.nabble.com/Accessing-JMS-in-web-app-tp21554281s134p21554281.html
Sent from the Apache Geronimo - Users mailing list archive at Nabble.com.