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
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
-
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.
-
Obtain the resource adapter file (wmq.jmsra.rar), the IVT application
(wmq.jmsra.ivt.ear) and the jboss-jmsra-ds.xml file.
- Client XA only: Edit the jboss-jmsra-ds.xml file
to enable XA Transactions on the connection factory.
- Comment out or delete the line within the connection
factory definition
<local-transaction/>
.
- Uncomment the line within the connection factory definition
<xa-transaction/>
.
- Save your changes.
- 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.
-
Open the wmq.jmsra.ivt.ear file.
-
Open the WMQ_IVT_MDB.jar file within it.
-
Edit META-INF/ejb-jar.xml:
- Comment out or delete the line within the assembly
descriptor:
<trans-attribute>NotSupported</trans-attribute>
- Uncomment the line within the assembly descriptor:
<trans-attribute>Required</trans-attribute>
- Save your changes and update the file within the WMQ_IVT_MDB.jar file.
- Update the wmq.jmsra.ivt.ear file with the modified
WMQ_IVT_MDB.jar.
-
Deploy the resource adapter to your server by copying the wmq.jmsra.rar
file into the directory jboss/server/default/deploy.
-
Create the JMS resources required for the IVT Application by copying the
jboss-jmsra-ds.xml file into the directory
jboss/server/default/deploy.
-
Deploy the IVT application by copy the wmq.jmsra.ivt.ear file into the
directory jboss/server/default/deploy.
-
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/.