2 Replies Latest reply on Feb 27, 2003 8:12 PM by Kumar Mettu

    Could someone please explain how the queue prefix works

    Bob Wieler Newbie

      Hopefully someone can clearn up my confusion. I am using JBoss 3.0.2 by the way.

      I have defined the queue EMAIL in my jbossmq-destinations-service.xml file with the definition:


      <depends optional-attribute-name="DestinationManager">jboss.mq:service=DestinationManager


      I have also written MDB that is supposed to listen to messages on that queue. The jboss-xml file for it contains:

      <message-driven>
      <ejb-name>EmailMessager</ejb-name>
      <jndi-name>EmailMessager</jndi-name>
      <destination-jndi-name>EMAIL</destination-jndi-name>
      <xa-connection>false</xa-connection>
      </message-driven>

      When JBoss is starting, I receive the messages:

      2003-02-13 17:17:56,239 DEBUG [org.jboss.mq.pm.file.PersistenceManager] restoring destination: QUEUE.EMAIL
      2003-02-13 17:17:56,239 DEBUG [org.jboss.mq.pm.file.PersistenceManager] Restore message count: 0
      2003-02-13 17:17:56,239 DEBUG [org.jboss.mq.pm.file.PersistenceManager] restoring destination: QUEUE.EMAIL
      2003-02-13 17:17:56,240 INFO [org.jboss.mq.server.jmx.Queue.EMAIL] Bound to JNDI name: queue/EMAIL
      2003-02-13 17:17:56,241 INFO [org.jboss.mq.server.jmx.Queue.EMAIL] Started


      This states that it has bound the EMAIL queue to "queue/EMAIL" which is what is expected. When JBoss actually deploys the MDB however, I receive the message:

      2003-02-13 17:21:43,420 WARN [org.jboss.ejb.plugins.jms.JMSContainerInvoker] destination not found: queue/EMAIL reason: javax.naming.NameNotFoundException: EMAIL not bound
      2003-02-13 17:21:43,421 WARN [org.jboss.ejb.plugins.jms.JMSContainerInvoker] creating a new temporary destination: queue/EMAIL
      2003-02-13 17:21:43,423 DEBUG [org.jboss.mq.server.jmx.DestinationManager] Attempting to create destination: jboss.mq.destination:service=Queue,name=EMAIL; type=org.jboss.mq.server.jmx.Queue
      2003-02-13 17:21:43,430 INFO [org.jboss.mq.server.jmx.Queue.EMAIL] Registration is not done -> destroy
      2003-02-13 17:21:43,438 ERROR [org.jboss.ejb.plugins.jms.JMSContainerInvoker] Starting failed
      MBeanException: Exception in MBean operation 'createQueue(,java.lang.String)'
      Cause: javax.management.InstanceAlreadyExistsException: jboss.mq.destination:service=Queue,name=EMAIL already registered.


      This states that it was not able to find the queue named "queue/EMAIL" and when it goes to create a temporary queue by that name, it states that it already exists.

      How is this possible?? It was not able to create a queue by that name because it already exists but can't find it because it doesn't exist.

      I'm confused. Please help.

      Thank you,

      Bob