1 Reply Latest reply on Sep 10, 2002 9:28 AM by francesco milesi

    Cannot bind MDB to jms queue

    francesco milesi Newbie

      Hi everibody.

      I have a problem binding a MDB to a queue. I am using JBoss 3.0.2 and I did the following to setup a MDB listening on a queue.

      1. In ejb-jar.xml I put the following entries:


      plus the transaction attributes and security permission as usual

      2. In JBoss.xml I put:

      <?xml version="1.0" encoding="UTF-8"?>


      <configuration-name>Standard Message Driven Bean</configuration-name>

      3. In jbossmq-destinations-service.xml I added the following entry:

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

      When I start up the server I get this output


      12:26:22,856 INFO [MailQueue] Creating
      12:26:22,856 INFO [MailQueue] Created


      12:26:22,996 INFO [MailQueue] Starting
      12:26:23,027 INFO [MailQueue] Bound to JNDI name: queue/MailQueue
      12:26:23,037 INFO [MailQueue] Started


      12:26:32,399 INFO [EjbModule] Deploying MailerMDB
      12:26:32,999 INFO [JMSContainerInvoker] Creating
      12:26:32,999 INFO [JMSContainerInvoker] Created
      12:26:33,580 INFO [EjbModule] Created
      12:26:33,580 INFO [EjbModule] Starting
      12:26:34,652 WARN [StatelessSessionContainer] No resource manager found for mai
      12:26:34,792 INFO [JMSContainerInvoker] Starting
      12:26:34,802 INFO [DLQHandler] Creating
      12:26:34,972 INFO [DLQHandler] Created
      12:26:34,982 WARN [JMSContainerInvoker] destination not found: queue/MailerMDB
      reason: javax.naming.NameNotFoundException: MailerMDB not bound
      12:26:34,982 WARN [JMSContainerInvoker] creating a new temporary destination: q
      12:26:34,992 INFO [MailerMDB] Creating
      12:26:34,992 INFO [MailerMDB] Created
      12:26:34,992 INFO [MailerMDB] Starting
      12:26:35,002 INFO [MailerMDB] Bound to JNDI name: queue/MailerMDB
      12:26:35,002 INFO [MailerMDB] Started
      12:26:35,122 WARN [SecurityManager] No SecurityMetadadata was available for Mai
      lerMDB adding default security conf

      If I try to send a message to the original queue "queue/MailQueue" from a session I get an error, while if I send it to the temporary queue "queue/MailerMDB" it is all right and MailMDB is waked up.
      So JMS and MDB work correctly, but I do not understand where I am wrong. It am certainly missing something in my configuration, but I do not see what.
      I can see that the deployer looks for a queue that has the name of my MDB and not that of the queue I indicated in jBoss.jar and I configured in jbossmq-destinations-service.xml.
      I did not modify anything else of JMS configuration, that remained as it comes after download.

      Thanks to anybody helping me

      Ciao Francesco

        • 1. Re: Cannot bind MDB to jms queue
          francesco milesi Newbie

          Sorry to bother you all,

          I got it: it was an error in the jBoss.xml.
          The correct one is:

          <?xml version="1.0" encoding="UTF-8"?>

          <configuration-name>Standard Message Driven Bean</configuration-name>

          Ciao Francesco