Configure JMS Destination JBoss

Configure JMS Destination JBoss

If you want to use JBoss application server JMS as middleware service to send receive message first you will have to configure queue or topic on server. Below have configuration of JMS on different version on JBoss:

JBoss Application server 7: When you install this application server it creates two folder: domain and standalone.

  • Standalone: When you need only one or want to use only one instance of JBoss application server then you should use this.
  • domain: When you run multiple instances of JBoss application server then you use this folder where you have single point where you can control all configuration.

Please add below JMS Queue OR Topic configuration either standalone.xml or domain.xml:

<subsystem xmlns="urn:jboss:domain:messaging:1.1">
 ...
 <hornetq-server> 
    <jms-destinations>
       <jms-queue name="javahonkQueue">
           <entry name="javahonk/queue"/>
       </jms-queue>
       <jms-topic name="javahonkTopic">
           <entry name="javahonk/topic"/>
       </jms-topic>
    </jms-destinations>
 
 </hornetq-server>
</subsystem>
  • JBoss application server 6: Go to ..\server\default\deploy\hornetq\hornetq-jms.xml and add as below Queue or Topic:

Configure JMS Destination JBoss

  • JBoss application server 5: Go to ..\server\default\deploy and add service.xml with below configuration:
<mbean code="org.jboss.jms.server.destination.QueueService" name="jboss.messaging.destination:service=Queue,name=javahonkQueue" xmbean-dd="xmdesc/Queue-xmbean.xml">
  <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
  <depends>jboss.messaging:service=PostOffice</depends>
</mbean>
 
<mbean code="org.jboss.jms.server.destination.TopicService" name="jboss.messaging.destination:service=Topic,name=javahonkTopic" xmbean-dd="xmdesc/Topic-xmbean.xml">
  <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
  <depends>jboss.messaging:service=PostOffice</depends>
</mbean>
  • For more information please visit JBoss documentation here

Leave a Reply

Your email address will not be published. Required fields are marked *