Configuring JMS in JBoss 5


This is again a small JMS configuration stuff we have to do in JBoss 5. There is considerable difference in doing it in JBoss 5 compared to JBoss 4 and don’t expect our old configuration to work well with JBoss 5 without any change. In JBoss 5 they are using JBoss Messaging in place of JBoss MQ. You can read a detailed post on migrating from JBoss 4 to JBoss 5 here.

This post is about the configuration of a simple queue. We can configure topics also like this. In JBoss 5, the configuration file is in messaging directory with in the deploy directory.

In JBoss 4.x the JMS configuration (in jms/jbossmq-destinations-service.xml) is like this:

<mbean code=""
 <attribute name="JNDIName">queue/MyQueue</attribute>
 <attribute name="RedeliveryDelay">10000</attribute>
 <attribute name="RedeliveryLimit">3</attribute>
 <depends optional-attribute-name="DestinationManager">

In JBoss 5.x we should do this (in messaging/destinations-service.xml):

<mbean code="org.jboss.jms.server.destination.QueueService"
 <depends optional-attribute-name="ServerPeer">
 <attribute name="JNDIName">queue/MyQueue</attribute>
 <attribute name="RedeliveryDelay">10000</attribute>
 <attribute name="MaxDeliveryAttempts">3</attribute>


JBoss Messaging:

Migrating from JBoss 4 to JBoss 5:

You can check this URL also for configuration guidelines (JBoss Messaging 1.4.4):