JBoss 5.1.0 添加队列

发布于 2024-08-19 16:00:10 字数 217 浏览 4 评论 0原文

如何将自定义队列添加到 JBoss 5.1.0?

我找到了一种通过管理控制台执行此操作的方法,但由于某种原因它一直失败,而且我需要能够快速轻松地将队列从一台 JBoss 服务器移动到另一台。

所以基本上我想知道是否有一种方法可以在 xml 文件中创建自定义队列并将该文件添加到部署文件夹,就像使用自定义数据源文件 (mydatasource-ds.xml) 一样。

谢谢。

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 you can do with a custom datasource file (mydatasource-ds.xml).

Thank you.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

暖阳 2024-08-26 16:00:10

在实例的 deploy 目录(或 deploy/messaging,如果您愿意)下创建一个以 destinations-service.xml 结尾的文件,例如 my-jms-destinations-service.xml。它应该类似于:

<?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>

根据需要设置 mbean 名称和 JNDI 名称。为其他队列添加更多 mbean 定义,或将它们拆分到多个 *destinstations-service.xml 文件中,以便轻松地彼此独立地部署/取消部署队列。

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.

回眸一遍 2024-08-26 16:00:10

这可能来得有点晚,但我在通过管理控制台创建队列时也遇到了一些错误。

该错误是由于部署文件夹内缺少名为queue 的文件夹造成的。创建队列文件夹后,我可以使用管理控制台创建队列。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文