Queues/Topics are known as administered objects and in jboss they can be deployed through ServiceDotXml files. Let’s name our file, myapp-destination-service.xml. The contents of the file should look like:
<?xml version=”1.0″ encoding=”UTF-8″?>
<server>
<!–My queue, named: myAppQueue –>
<mbean code=”org.jboss.mq.server.jmx.Queue”
name=”jboss.mq.destination:service=Queue,name=myAppQueue“>
<depends optional-attribute-name=”DestinationManager”>jboss.mq:service=DestinationManager</depends>
</mbean>
<!– My topic, named: myAppTopic –>
<mbean code=”org.jboss.mq.server.jmx.Topic”
name=”jboss.mq.destination:service=Topic,name=myAppTopic“>
<depends optional-attribute-name=”DestinationManager”>jboss.mq:service=DestinationManager</depends>
</mbean>
</server>
Place this file in your %JBOSS_HOME%/server/default/deploy directory and start the server.(Note: If you are using the ‘all’ configuration or the ‘minimal’ configuration then you will have to place this file in the %JBOSS_HOME%/server/all/deploy or %JBOSS_HOME%/server/minimal/deploy directory, as appropriate).
The above queue/topic will be bound to the jndi name: queue/myAppQueue and topic/myAppTopic respectively.
Note:
1) The above file is meant for JBoss-3.2.3. Though there might be slight changes to later versions of JBoss, the basic configuration mechanism remains the same.
2) JBoss also comes with preconfigured queues/topics. These configurations can be found in the jbossmq-destinations-service.xml file which is present in %JBOSS_HOME%/server/default/deploy/jms directory
thanks for this info.
I was wondering, if I want more than one Queue, is it enough to add another mbean to the XML? What’s the limit to the number of queues?
Comment by sérgio rebelo — March 5, 2007 @ 3:25 pm
Yes, you just have to add another mbean to the XML if you want more queues. As far as the limit is concerned, there’s no exact number. How many do you want to create?
Comment by jaikiran — March 5, 2007 @ 3:30 pm
Thank you for your super fast reply. At this time I just want to create 2, the limit question was just for reference.
thanks again.
Comment by sérgio rebelo — March 5, 2007 @ 3:35 pm
Would you please show me the way write code for one Servlet file use this queue and topic.
Comment by book — July 26, 2007 @ 8:13 am
i’m eric. joining a couple boards and looking
forward to participating. hehe unless i get
too distracted!
eric
Comment by xztheericzx — November 6, 2007 @ 11:23 pm
Hi,
I’m Gerald.
Just saying hello – I’m new.
Comment by oOgerryOo — December 17, 2007 @ 2:16 am
thanks for this info. Can you post a simple complete java program using Topics to try it?
thanks
cb
Comment by cb — July 19, 2008 @ 2:03 pm
Thanks for the post. It really helped.
Comment by nilesh — May 31, 2009 @ 3:43 pm
This looks cool so far, what’s up people?
If it’s not just all bots here, let me know. I’m looking to network
Oh, and yes I’m a real person LOL.
Peace,
Comment by EmonoNoft — August 14, 2009 @ 10:05 am
http://dfgtertvlfkdgjkljgkjetkjerktjklrejt.com/ – Falling Down Lyrics Selena Gomez Ca Lottery Winning Numbers
Comment by fghgftyuiyuouipombnbvinobin — September 18, 2009 @ 1:15 pm
Hi
I did the same but when I tried to access the queue it is giving exception
javax.naming.NameNotFoundException: myAppQueue not bound
even I tried giving queue/myAppQueue
but no use
Thanks
Nalini
Comment by Nalini — September 22, 2009 @ 1:13 pm