5 Replies Latest reply on Apr 21, 2008 11:22 AM by Brad Fach

    configure queue

    Vikrant Ardhawa Newbie

      Can someone please tell me how I configure a queue on jboss app server with JNDI name 'queue/ExA2Queue'

        • 1. Re: configure queue
          Brad Fach Newbie

          For example: (Sorry got cut off)

          E.g.

          <mbean code="org.jboss.jms.server.destination.QueueService"
          name="jboss.messaging.destination:service=Queue,name=routeHandlerAQueue"
          xmbean-dd="xmdesc/Queue-xmbean.xml">
          <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer
          jboss.messaging:service=PostOffice









          • 2. Re: configure queue
            Brad Fach Newbie

            Vikrant1,

            Sorry something went wrong with the post.

            Go to the deploy/jboss-messaging.sar/ directory, there is a file named destinations-service.xml.

            The above code shows how to configure a queue of a specific name.

            Hope this helps,

            • 3. Re: configure queue
              Brad Fach Newbie

              Vikrant1

              I just realized it is not copying in the whole xml. Go to the file i mentioned, and search for testQueue. Copy this xml for the queue, paste and change the name... its that easy :)

              Cheers.

              bfach

              • 4. Re: configure queue
                Vikrant Ardhawa Newbie

                That file is at the following:
                C:\jboss-5.0.0.Beta4\server\all\deploy\messaging\destinations-service.xml
                C:\jboss-5.0.0.Beta4\server\default\deploy\messaging\destinations-service.xml
                which one do I edit? Also there is no testQueue. Both xml files contain the following:

                <?xml version="1.0" encoding="UTF-8" ?>
                - <!-- Messaging Destinations deployment descriptor.
                
                 $Id: destinations-service.xml 64130 2007-07-18 23:21:27Z clebert.suconic@jboss.com $
                
                 -->
                - <server>
                - <!-- The Default Dead Letter Queue. This destination is a dependency of an EJB MDB container.
                
                 -->
                - <mbean code="org.jboss.jms.server.destination.QueueService" name="jboss.messaging.destination:service=Queue,name=DLQ" xmbean-dd="xmdesc/Queue-xmbean.xml">
                 <annotation>@org.jboss.system.deployers.managed.ManagementObjectClass(code=org.jboss.jms.server.destination.QueueServiceMO)</annotation>
                 <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
                 <depends>jboss.messaging:service=PostOffice</depends>
                 </mbean>
                - <!-- The Default Expiry Queue.
                
                 -->
                - <mbean code="org.jboss.jms.server.destination.QueueService" name="jboss.messaging.destination:service=Queue,name=ExpiryQueue" xmbean-dd="xmdesc/Queue-xmbean.xml">
                 <annotation>@org.jboss.system.deployers.managed.ManagementObjectClass(code=org.jboss.jms.server.destination.QueueServiceMO)</annotation>
                 <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
                 <depends>jboss.messaging:service=PostOffice</depends>
                 </mbean>
                 </server>


                The JNDI name of my connection factory is 'QueueConnectionFactory' and the JNDI name of my queue is 'queue/ExA2Queue'. What do I need to edit in the xml

                • 5. Re: configure queue
                  Brad Fach Newbie

                  I assume you are running the dafault server. In this case you would edit the destinations-service.xml under default.

                  The xml snippet is what you need to deploy a queue, copy it and change the following

                  name=DLQ to name= (whatever you want)

                  SO it should look like this if queue name is "yourQueueName"

                  <mbean code="org.jboss.jms.server.destination.QueueService" name="jboss.messaging.destination:service=Queue,name=yourQueueName" xmbean-dd="xmdesc/Queue-xmbean.xml">
                  @org.jboss.system.deployers.managed.ManagementObjectClass(code=org.jboss.jms.server.destination.Queu
                  eServiceMO)
                  <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer
                  jboss.messaging:service=PostOffice
                  </ depends>
                  </ mbean>

                  So just copy the DLQ xml snippet, paste and change the DLQ to you queue name. Restart JBoss, check the JMX Console to see if the queue is there. It should be in the same location as the DLQ queue.

                  bfach