Installing and testing the resource adapter in JBoss AS 5.1 and 6

After installing the IBM® WebSphere® MQ resource adapter on JBoss® AS 5.1 or 6, you can test the installation of the resource adapter by installing and running the installation verification test (IVT) application.

Before you begin

Important: These instructions are for JBoss AS 5.1 and 6, they are not valid for JBoss AS 7.

For information about installing the resource adapter in JBoss EAP 6.3, see Installing and testing the resource adapter in JBoss EAP 6.3.

This task assumes that you have a running JBoss server and are familiar with standard administration tasks for it. This task also assumes that you have an IBM WebSphere MQ installation on your local system and that you are familiar with standard administration tasks.

If you are using the resource adapter to connect to an IBM WebSphere MQ client and need to perform distributed XA transactions, you must follow the additional steps marked Client XA only. For a description of bindings and client mode connections, see Connection modes for WebSphere MQ classes for JMS.

Procedure

  1. Create a queue manager called ExampleQM, and set it up as described in Preparing and running the sample programs.
    When setting up the queue manager, note the following points:
    • The listener must be started on port 1414.
    • The channel to be used is called SYSTEM.DEF.SVRCONN.
    • The queue used by the IVT application is named TEST.QUEUE.

    The model queue SYSTEM.DEFAULT.MODEL.QUEUE also needs to be granted DSP and PUT authority so this application can create a temporary reply queue.

    If you want to use a different queue manager, different connection details, or a different queue, see Deploying the IVT application on WAS CE with a custom MQ environment.

  2. Obtain the resource adapter file (wmq.jmsra.rar), the IVT application (wmq.jmsra.ivt.ear) and the jboss-jmsra-ds.xml file.
    For the location of these files, see Installation of the WebSphere MQ resource adapter.
  3. Client XA only: Edit the jboss-jmsra-ds.xml file to enable XA Transactions on the connection factory.
    1. Comment out or delete the line within the connection factory definition <local-transaction/>.
    2. Uncomment the line within the connection factory definition <xa-transaction/>.
    3. Save your changes.
  4. Client XA only: (optional) Modify the assembly descriptor of the MDB to require transactions. This forces the MDB in the IVT to participate in an XA transaction, although the IVT application still works without this modification.
    1. Open the wmq.jmsra.ivt.ear file.
    2. Open the WMQ_IVT_MDB.jar file within it.
    3. Edit META-INF/ejb-jar.xml:
      1. Comment out or delete the line within the assembly descriptor:
        
        <trans-attribute>NotSupported</trans-attribute>
      2. Uncomment the line within the assembly descriptor:
        
        <trans-attribute>Required</trans-attribute>
      3. Save your changes and update the file within the WMQ_IVT_MDB.jar file.
      4. Update the wmq.jmsra.ivt.ear file with the modified WMQ_IVT_MDB.jar.
  5. Deploy the resource adapter to your server by copying the wmq.jmsra.rar file into the directory jboss/server/default/deploy.
  6. Create the JMS resources required for the IVT Application by copying the jboss-jmsra-ds.xml file into the directory jboss/server/default/deploy.
  7. Deploy the IVT application by copy the wmq.jmsra.ivt.ear file into the directory jboss/server/default/deploy.
  8. Run the IVT application. For more details, see The installation verification test program for the WebSphere MQ resource adapter. For JBoss, the default URL is http://localhost:8080/WMQ_IVT/.