8 Replies Latest reply on Aug 6, 2003 7:26 AM by Adrian Brock

    MDB on remote queue

    Steven Segers Newbie


      I am trying to connect an MDB to a queue located on another server, using JBoss 3.2. On deployment I get this exception, which is repeated every xx seconds.

      javax.jms.InvalidDestinationException: The destination QUEUE.mqTest1 does not exist !
      at org.jboss.mq.server.ClientConsumer.addSubscription(ClientConsumer.java:135)
      at org.jboss.mq.server.JMSDestinationManager.subscribe(JMSDestinationManager.java:611)
      at org.jboss.mq.server.JMSServerInterceptorSupport.subscribe(JMSServerInterceptorSupport.java:296)
      at org.jboss.mq.security.ServerSecurityInterceptor.subscribe(ServerSecurityInterceptor.java:150)
      at org.jboss.mq.server.TracingInterceptor.subscribe(TracingInterceptor.java:677)
      at org.jboss.mq.server.JMSServerInvoker.subscribe(JMSServerInvoker.java:298)
      at org.jboss.mq.il.jvm.JVMServerIL.subscribe(JVMServerIL.java:315)
      at org.jboss.mq.Connection.addConsumer(Connection.java:1082)
      at org.jboss.mq.SpyConnectionConsumer.(SpyConnectionConsumer.java:73)
      at org.jboss.mq.SpyConnection.createConnectionConsumer(SpyConnection.java:113)
      at org.jboss.ejb.plugins.jms.JMSContainerInvoker.innerCreate(JMSContainerInvoker.java:562)
      at org.jboss.ejb.plugins.jms.JMSContainerInvoker.startService(JMSContainerInvoker.java:579)
      at org.jboss.ejb.plugins.jms.JMSContainerInvoker$ExceptionListenerImpl.onException(JMSContainerInvoker.java:1079)
      at org.jboss.ejb.plugins.jms.JMSContainerInvoker$1.run(JMSContainerInvoker.java:591)

      There does exist a queue names queue/mqTest1 on the remote machine (if I specify another name I get a NameNotFoundException).

      Here are some details about the testapp:
      The mdb:
      <message-driven >
      <display-name>MQTest1 MDB1</display-name>






      Modifications to the 'all' configuration:
      deploy/jms/jms-ds.xml: added:




      in the message-driven-bean invoker-proxy-binding.

      The queue (deployed on burgundy):

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

        • 1. Re: MDB on remote queue
          Wes Gere Newbie

          In jboss.xml, change the destination-jndi-name to just mqTest1 instead of /queue/mqTest1

          • 2. Re: MDB on remote queue
            Wes Gere Newbie

            Also change these values in jms-ds.xml:


            The important part is getting rid of the "java:/" in front, which is only valid for local jndi lookups. The change to UIL2 is for performance - it's a better invocation layer. See jbossmq-service.xml for details. In the unlikely case you must have two-phase commit transactions, you can use the UIL2XAConnectionFactory instead.

            • 3. Re: MDB on remote queue
              Wes Gere Newbie

              Actually, I just was getting this problem on linux, and it was fixed by editing the hosts file (/etc/hosts) on the server. Instead of this:
     vin-linux-01 localhost
              remove the host name from the loopback line, and add a line mapping the hostname to the external ip address:

              Also, One of my above replies is wrong in suggesting removing the "queue/" from the destination-jndi-name in jboss.xml. Leave that the way you had it (although you can remove the leading '/'. I would use "queue/mqTest1"

              • 4. Re: MDB on remote queue
                dharmon Newbie

                Assume MDB on appserver2 wishes to subscribe to a topic on appserver1. Also appserver2 has other MDBs that use topics local to appserver2. Question: what configuration changes do I need to make in order to get ths functioanlity for jboss 3.0.6?

                Based on the steps described in the previous post, my MDB is now receiving messages published to the remote topic on appserver1. However, I have other local topics on appserver2 and by making the following change:

                in the message-driven-bean invoker-proxy-binding.

                all my other topics and queues defined on this 2nd app server are now trying to also use the remote JMS provider and I want it to use the default JMS provider. What configuartion changes will I need to do in order for this to have 1 MDB subscribe to a remote topic and other MDBs subscribe to local topics?

                • 5. Re: MDB on remote queue
                  Adrian Brock Master

                  Don't change it in standardjboss.xml

                  Change it per mdb in a jboss.xml


                  • 6. Re: MDB on remote queue
                    dharmon Newbie

                    Thanks! I'll add a

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

                    to my jboss.xml deployment descriptor specifying the JMS provider I want to use. Thanks again.

                    • 7. Re: MDB on remote queue
                      cuonglam Newbie

                      When I start the remote jboss, I keep getting:

                      javax.jms.JMSSecurityException: Connection not authorized to do durable subscription on topic: aoe_topic

                      How do I set up the security on the remote jboss?
                      Is there any way to turn off the authorization of users (for jbossMQ) ?

                      • 8. Re: MDB on remote queue
                        Adrian Brock Master

                        The security is defined in two files.
                        jbossmq-destinations.xml specifies the roles and
                        privileges for each destination.
                        jbossmq-state.xml defines which users are in which