Hi, I am having trouble finding my JMS destination queue?
The queue that I set up in 'jbossmq-destinations-service.xml' doesn't seem to be listed in the JNDI namespaces. I have searched this forum and others for a possible answer and have implemented all the suggestions that i thought might be relevant.
I've looked at the JNDI Global and java:/ name spaces and the sub-context 'queue' isn't listed in either, although the DestinationManager service has the JNDI name for my queue set correctly as 'queue/queue'.
Below are excerpts from:
jbossmq-destinations-service.xml
the Session Bean class from which i'm performing the look-up
ejb-jar.xml
jboss.xml
i'm using JBoss 3.2.2.RC4 and running the default server.
Files:
jbossmq-destinations-service.xml
===========================
<depends optional-attribute-name="DestinationManager">jboss.mq:service=DestinationManager
queue/queue
Session bean class
================
try
{
InitialContext ic = new InitialContext();
QueueConnectionFactory queueConnectionFactory = (QueueConnectionFactory)ic.lookup("java:comp/env/jms/MyQueueConnection");
queue = (Queue)ic.lookup("("java:comp/env/jms/MyQueue");
}
ejb-jar.xml
==========
<ejb-jar>
...
<enterprise-beans>
...
<session
...
<resource-ref>
<res-ref-name>jms/MyQueue</res-ref-name>
<res-type>javax.jms.Queue</res-type>
<res-auth>Container</res-auth>
<res-sharing-scope>Shareable</res-sharing-scope>
</resource-ref>
</enterprise-beans>
</ejb-jar>
jboss.xml
=========
<enterprise-beans>
...
...
<resource-ref>
<res-ref-name>jms/MyQueue</res-ref-name>
<resource-name>queueref</resource-name>
</resource-ref>
</enterprise-beans>
<resource-managers>
...
<resource-manager>
<res-name>queueref</res-name>
<res-jndi-name>queue/queue</res-jndi-name>
</resource-manager>
</resource-managers>
If someone could tell me what I am doing wrong, I would be very grateful.
There should an INFO message saying it where it was bound
when you boot jboss.
Check the jmx-console as well.
Regards,
Adrian