4 Replies Latest reply on Mar 30, 2004 5:45 PM by adrian.brock

    JBoss 3.2.2 -- MDB listening on wrong Queue

    mring33

      My Env:
      * Win 2000 pro
      * JBoss 3.2.2
      * Sun's Java 1.4.2 SE

      Problem:
      I want my MDB (named DocumentVerifierBean) to listen on a queue called 'Apex/DocVerifierInbox' but instead it is responding to messages on 'DocumentVerifierBean'. Looks like JBoss is automatically creating this second queue and linking the MDB to it, despite my wishes otherwise. I have confirmed that both queues work, as I can send messages to both of them and watch both of their message counts increase (in the JMX console). I have included snippets of my config files below.

      Any ideas? Should I just upgrade or downgrade JBoss versions?

      ejb-jar.xml:

      <message-driven>
       <description><![CDATA[DocumentVerifierBean EJB]]></description>
       <display-name>DocumentVerifierBean</display-name>
       <ejb-name>DocumentVerifierBean</ejb-name>
       <ejb-class>net.transolutions.apex.doc.verifier.DocumentVerifierBean</ejb-class>
       <transaction-type>Container</transaction-type>
       <message-selector></message-selector>
       <acknowledge-mode>AUTO_ACKNOWLEDGE</acknowledge-mode>
       <message-driven-destination>
       <destination-type>javax.jms.Queue</destination-type>
       <subscription-durability>NonDurable</subscription-durability>
       </message-driven-destination>
       </message-driven>


      jboss.xml:
      <message-driven>
       <ejb-name>DocumentVerifierBean</ejb-name>
       <destination-jndi-name>queue/Apex/DocVerifierInbox</destination-jndi-name>
       <configuration-name>Standard Message Driven Bean</configuration-name>
       </message-driven>


      Thank you.

      -Matthew S. Ring

        • 1. Re: JBoss 3.2.2 -- MDB listening on wrong Queue
          genman


          Nothing stands out. This is probably a misconfiguration on your side. You should validate your XML document against the DTD just to make sure JBoss isn't mis-parsing your file.

          JBoss 3.2.3 doesn't have fixes related to anything like this, but it doesn't hurt to upgrade.

          • 2. Re: JBoss 3.2.2 -- MDB listening on wrong Queue
            mring33

            Thanks for the reply.

            Unfortunately, my jboss.xml file validates successfully against the 3.2 DTD.

            I guess I'll have to play around a bit more with it. I'll post again once I find out more.

            -Matt

            • 3. Re: JBoss 3.2.2 -- MDB listening on wrong Queue
              mring33

              As the rest of my project's subsystems are being developed for JBoss 3.2.0, I have retried my MDB on 3.2.0, with the same negative results.

              I've even tried changing the name of the queue (to apex-DVInbox), just in case JBoss didn't like the original name. Here's some log snippets:

              ...
              13:47:01,125 INFO [apex-DVInbox] Creating
              13:47:01,125 INFO [apex-DVInbox] Created
              ...
              13:47:01,484 INFO [apex-DVInbox] Starting
              13:47:01,484 INFO [apex-DVInbox] Bound to JNDI name: queue/apex-DVInbox
              13:47:01,484 INFO [apex-DVInbox] Started
              13:47:01,484 INFO [SecurityManager] Starting
              ...
              13:47:01,765 INFO [MainDeployer] Starting deployment of package: file:/C:/jboss
              -3.2.0/server/default/deploy/ApexDocVerifier.jar/
              13:47:01,781 INFO [EJBDeployer] looking for nested deployments in : file:/C:/jb
              oss-3.2.0/server/default/deploy/ApexDocVerifier.jar/
              13:47:02,031 INFO [EjbModule] Creating
              13:47:02,046 INFO [EjbModule] Deploying DocumentVerifierBean
              13:47:02,125 INFO [MessageDrivenContainer] Creating
              13:47:02,125 INFO [MessageDrivenInstancePool] Creating
              13:47:02,125 INFO [MessageDrivenInstancePool] Created
              13:47:02,125 INFO [JMSContainerInvoker] Creating
              13:47:02,140 INFO [JMSContainerInvoker] Created
              13:47:02,140 INFO [MessageDrivenContainer] Created
              13:47:02,140 INFO [EjbModule] Created
              13:47:02,140 INFO [EjbModule] Starting
              13:47:02,140 INFO [MessageDrivenContainer] Starting
              13:47:02,140 INFO [JMSContainerInvoker] Starting
              13:47:02,140 INFO [DLQHandler] Creating
              13:47:02,203 INFO [DLQHandler] Created
              13:47:02,203 WARN [JMSContainerInvoker] destination not found: queue/DocumentVerifierBean reason: javax.naming.NameNotFoundException: DocumentVerifierBean not bound
              13:47:02,203 WARN [JMSContainerInvoker] creating a new temporary destination: queue/DocumentVerifierBean

              13:47:02,218 INFO [DocumentVerifierBean] Creating
              13:47:02,218 INFO [DocumentVerifierBean] Created
              13:47:02,218 INFO [DocumentVerifierBean] Starting
              13:47:02,218 INFO [DocumentVerifierBean] Bound to JNDI name: queue/DocumentVerifierBean
              ...

              It looks to me that the 'apex-DVInbox' queue is being created and bound before the temporary 'DocumentVerifierBean' queue is created, so that's not the problem.

              Please, does anyone have any more insights?

              I've looked at plenty of examples. My jboss.xml validates. I've even used MDBs in JBoss before (v3.0.x) and I don't remember having this problem.

              Thanks.

              -Matthew S. Ring

              • 4. Re: JBoss 3.2.2 -- MDB listening on wrong Queue

                This was fixed in the 3.2.1
                The MDB no longer assumes all queues are directly in the queue/ namespace

                Regards,
                Adrian