3.2.5.2. Migrate Your Application to Use HornetQ as the JMS Provider

JBoss Messaging is no longer included in JBoss Enterprise Application Platform 6. If your application uses JBoss Messaging as the messaging provider, you need to replace the JBoss Messaging code with HornetQ.

Procedure 3.20. Before you start

  1. Shut down the client and server.
  2. Make a backup copy of any JBoss Messaging data. The message data is stored in a database in tables prefixed with JBM_.

Procedure 3.21. Change your provider to HornetQ

  1. Transfer configurations

    Transfer the existing JBoss Messaging configurations to the JBoss Enterprise Application Platform configuration. The following configurations can be found in deployment descriptors located on the JBoss Messaging server:
    • Connection Factories Service Configuration
      This configuration describes the JMS connection factories deployed with the JBoss Messaging server. JBoss Messaging configures connection factories in a file named connection-factories-service.xml which is located in the deployment directory of the application server.
    • Destination Configuration
      This configuration describes JMS queues and topics deployed with JBoss Messaging server. By default, JBoss Messaging configures destinations in a file named destinations-service.xml which is located in the deployment directory of the application server.
    • Message Bridge Service Configuration
      This configuration includes bridge services deployed with JBoss Messaging server. No bridges are deployed by default so the name of the deployment file varies depending on your JBoss Messaging installation.
  2. Modify your application code

    If the application code uses standard JMS, no code changes are required. However, if the application will be connecting to a cluster, you must carefully review the HornetQ documentation on clustering semantics. Clustering is outside the scope of the JMS specification and HornetQ and JBoss Messaging have taken substantially different approaches in their respective implementations of clustering functionality.
    If the application uses features specific to JBoss Messaging, you must modify the code to use the equivalent features available in HornetQ.
    For more information on how to configure messaging with HornetQ, see: Section 3.2.5.3, “Configure Messaging with HornetQ”
  3. Migrate existing messages

    Move any messages in the JBoss Messaging database to the HornetQ journal using a JMS bridge. Instructions for configuring the JMS bridge can be found here: Section 3.2.5.1, “Configure a JMS Bridge to Migrate Existing JMS Messages to JBoss Enterprise Application Platform 6”.