How to configure JMS in Jboss 6?

Ami picture Ami · Dec 31, 2013 · Viewed 12.3k times · Source

I newbie to JMS(java Messaging service). I want to run sample JMS application using jboss 6.

I have tired searching google and got like this. Those link are refer jboss 7.

1.How to configure JMS in jboss 6?

2.Is there Jboss7 have in built-in JMS? or need configure manually?

3.sample Application using Jboss 6?

Answer

Jakub Kubrynski picture Jakub Kubrynski · Jan 4, 2014

In Jboss 7 (and 6 as well) you have bundled HornetQ server. In Jboss 6 it is located in deploy\hornetq.sar. If you want to add destination you can specify it in hornetq-jms.xml file:

<topic name="myTopic">
  <entry name="/topic/myTopic"/>
</topic>
<queue name="myQueue">
  <entry name="/queue/myQueue"/>
</queue>

In Jboss 7 it looks like below:

<subsystem xmlns="urn:jboss:domain:messaging:1.1">
  <hornetq-server>
    <jms-destinations>
      <jms-queue name="myQueue">
        <entry name="queue/myqueue"/>
      </jms-queue>
      <jms-topic name="myTopic">
        <entry name="topic/mytopic"/>
      </jms-topic>
    </jms-destinations>
  </hornetq-server>
</subsystem>

You can find more information in HornetQ documentation