开发者

JBoss 5.1.0 Adding Queues

How do I add custom queues to JBoss 5.1.0?

I found a way to do it via the Admin Console however for some reason it keeps failing, also I need to be able to quickly and easily move my queues from one JBoss Server to another.

So basically I was wondering if there is a way to create custom queues in an xml file and add that file to the deploy folder much like how 开发者_如何学Goyou can do with a custom datasource file (mydatasource-ds.xml).

Thank you.


Create a file ending with destinations-service.xml under your instance's deploy directory (or deploy/messaging if you like), e.g. my-jms-destinations-service.xml. It should look something like:

<?xml version="1.0" encoding="UTF-8"?>
<!--
  Messaging Destinations deployment descriptor.
-->
<server>

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

</server>

Set the mbean name and JNDI name as required. Add more mbean definitions for additional queues, or split them across multiple *destinstations-service.xml files for easily deploying / undeploying queues independently of each other.


this may come a little late, but I also had a few errors when creating queues through the Admin console.

The error was due to a missing folder named queue inside the deploy folder. After creating the queue folder, I was able to create the queues using the admin console.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜