As aaron said you definitely want to use activemq not activemq-
broker. Other than that I don't see what might be wrong. We should
really improve the information supplied when this happens. I wonder
if listing all the modules searched and also the gbeans with the
correct interface that didn't match the name might help.
If this was my app at this point I'd start debugging the geronimo
name resolution logic.... not a very pleasant thought I'm afraid.
Wish I had a better answer, maybe someone else will spot the problem
thanks
david jencks
On Jan 31, 2007, at 12:52 PM, John wrote:
I have seen similar questions posted here which have helped me
along to some extent, but I've hit a dead end.
I am trying to deploy a simple servlet which posts a message to a
JMS queue.
For the sake of simplicity in this message, I am only going to
reference the connection factory, as I assume once I figure out how
to map that resource properly, I can figure out the queue.
The code does this:
ConnectionFactory qConnectionFactory = (ConnectionFactory)
context.lookup("java:comp/env/jms/myConnFactoryRef");
My web.xml has this:
<resource-ref>
<res-ref-name>jms/myConnFactoryRef</res-ref-name>
<res-type>javax.jms.ConnectionFactory</res-type>
<res-auth>Container</res-auth>
</resource-ref>
My FULL geronimo-web.xml is as follows:
<?xml version="1.0" encoding="UTF-8"?>
<dep:environment>
<dep:moduleId>
<dep:groupId>default</dep:groupId>
<dep:artifactId>SimpleMDBWeb</dep:artifactId>
<dep:version>1.0</dep:version>
<dep:type>car</dep:type>
</dep:moduleId>
<dep:dependencies>
<dep:dependency>
<dep:groupId>geronimo</dep:groupId>
<dep:artifactId>activemq-broker</dep:artifactId>
<dep:version>1.1.1</dep:version>
<dep:type>car</dep:type>
</dep:dependency>
</dep:dependencies>
</dep:environment>
<context-root>/SimpleMDBWeb</context-root>
<nam:resource-ref>
<nam:ref-name>jms/myConnFactoryRef</nam:ref-name>
<nam:resource-link>DefaultActiveMQConnectionFactory</
nam:resource-link>
</nam:resource-ref>
<nam:resource-ref>
<nam:ref-name>jms/myQueue</nam:ref-name>
<nam:resource-link>SendReceiveQueue</nam:resource-link>
</nam:resource-ref>
</web-app>
The error I am getting is:
"Unable to resolve resource reference 'jms/myConnFactoryRef' (Could
not find resource 'DefaultActiveMQConnectionFactory'. Perhaps it
has not yet been configured, or your application does not have a
dependency declared for that resource module?)"
It would seem from the error that the resource reference is
properly linked to the resource I want to use, but I am having a
dependency issue. I have tried using "activemq" instead of
"activemq-broker." I have tried using both. I have tried creating
my own JMS resource in Geronimo and referencing that resource as a
dependency instead of, and in addition to activemq and activemq-
broker. No matter what I do, I get the above error.
All the web pages and sample geronimo-web.xml files I have found
seem to support my usage above, but I am obviously still doing
something wrong.
I am using Geronimo 1.1.1.
I would appreciate any pointer in the right direction.
Thanks!
John
Now that's room service! Choose from over 150,000 hotels
in 45,000 destinations on Yahoo! Travel to find your fit.