Version 1

    It may happen that for whatever reason you would like to replace JBoss Messaging with the older JBoss MQ in your JBoss ESB server. This is how I did it.

     

    First I downloaded the latest 4.x JBoss AS release to obtain JBossMQ configuration. Then I just followed these steps:

    • in JBossESB copy all configuration to mq
    • copy jboss-as/client/jbossmq-client.jar to jboss-esb/client/
    • copy jboss-as/server/all/lib/jbossmq.jar to jboss-esb/server/mq/lib/
    • copy jboss-as/server/all/deploy/jms to jboss-esb/server/mq/deploy/
    • copy jboss-as/server/all/deploy-hasingleton/jms to jboss-esb/server/mq/deploy-hasingleton/
    • in jboss-esb/server/mq/conf/jboss-service.xml set mbean jboss.management.local:j2eeType=J2EEDomain,name=Manager atribute JMSService to jboss.mq:service=DestinationManager
    • in jboss-esb/server/mq/conf/login-config.xml configure application-policy called jbossmq according to jboss-as/server/all/conf/login-config.xml
    • delete these files and directories: jboss-esb/server/mq/management, jboss-esb/server/mq/management.esb, jboss-esb/server/mq/jms-ra.rar, jboss-esb/server/mq/jboss-messaging.sar, jboss-esb/server/mq/hajndi-jms-ds.xml
    • now you must reconfigure all JMS queues to be JBoss MQ beans, such a JBoss MQ queue looks like this:

    <mbean code="org.jboss.mq.server.jmx.Queue" name="jboss.esb.destination:service=Queue,name=DeadMessageQueue">
       <depends optional-attribute-name="DestinationManager">
         jboss.mq:service=DestinationManager
       </depends>
    </mbean>

     

    • files affected by the previous change are: jboss-esb/server/mq/jbossesb.esb/jbm-queue-service.xml, jboss-esb/server/mq/jbpm.esb/jbm-queue-service.xml, jboss-esb/server/mq/smooks.esb/jbm-queue-service.xml (please note that smooks.esb uses Topic, so you have to replace the Queue word with Topic)

     

    Please note that the reason to delete management and management.esb is just because it includes other JMS queues that I did not want to reconfigure (since I did not need management).