The installation verification test program for the WebSphere MQ resource adapter

The IVT program is supplied as an EAR file. To use the program, you must deploy it and define some objects as JCA resources.

The installation verification test (IVT) program is supplied as an enterprise archive (EAR) file called wmq.jmsra.ivt.ear. This file is installed with WebSphere® MQ classes for JMS in the same directory as the WebSphere MQ resource adapter RAR file, wmq.jmsra.rar. For information about where these files are installed, see Installation of the WebSphere MQ resource adapter.

You must deploy the IVT program on your application server. The IVT program includes a servlet and an MDB that tests that a message can be sent to, and received from, a WebSphere MQ queue. Optionally, you can use the IVT program to verify that the WebSphere MQ resource adapter has been correctly configured to support distributed transactions.

Before you can run the IVT program, you must define a ConnectionFactory object, a Queue object and possibly an Activation Specification object as JCA resources, and ensure that your application server creates JMS objects from these definitions and binds them into a JNDI namespace. You can choose the properties of the objects, but the following set of properties is a simple example:
ConnectionFactory object
channel:               SYSTEM.DEF.SVRCONN
hostName:              localhost
port:                  1414
queueManager:          ExampleQM
transportType:         CLIENT
Queue object
baseQueueManagerName:  ExampleQM
baseQueueName:         TEST.QUEUE

By default, the IVT program expects a ConnectionFactory object to be bound in the JNDI namespace with the name jms/ivt/IVTCF and a Queue object to be bound with the name jms/ivt/IVTQueue. You can use different names, but if you do, you must enter the names of the objects on the initial page of the IVT program and modify the EAR file appropriately.

After you have deployed the IVT program, and the application server has created the JMS objects and bound them into the JNDI namespace, you can start the IVT program by entering a URL in the following format into your Web browser:
http://app_server_host:port/WMQ_IVT/
where app_server_host is the IP address or host name of the system on which your application server is running, and port is the number of the TCP port on which the application server is listening. Here is an example:
http://localhost:9080/WMQ_IVT/
Figure 1 shows the initial page of the IVT program.
Figure 1. The initial page of the IVT program
The figure shows the initial page of the IVT program. The page contains a field labeled "Connection Factory", which is initialized to "IVTCF", and a field labeled "Destination", which is initialized to "IVTQueue". Following these fields is a check box labeled "Transactional Test", which has been selected. The check box is followed by a field labeled "Transactional EJB Name", which is initialized to "ejb/ejbs/WMQ_TransactedIVT". At the bottom of the page are two push buttons, one labeled "Run IVT" and the other labeled "Reset Values".
To run the test, click Run IVT. Figure 2 shows the page that is displayed if the IVT is successful.
Figure 2. Page showing the results of a successful IVT
The figure shows a page of the IVT program for a successful test. At the top of the page are two messages: "Using Connection Factory: IVTCF" and "Using Destination: IVTQueue". These messages are followed by a sequence of messages indicating the progress of the IVT. Each message in the sequence has a check mark to the right of it. The messages in the sequence are: "Creating initial context ...", "Looking up MQ Connection Factory ... (Altered JNDI name to java:IVTCF)", "Looking up Destination ...", "Creating connection ...", "Starting connection ...", "Creating session ...", "Creating message consumer ...", "Creating message producer ...", "Creating message ...", Sending message ...", "Receiving message ...", "Closing connection ...", and "Attempting transacted test ... (Altered JNDI name to WMQ_TransactedIVT)". These messages are followed by a further message in bold stating that the IVT completed successfully. At the bottom of the page is a push button labeled "View Message Contents", followed by a link labeled "Re-run Installation Verification Test".
If the IVT fails, a page like that shown in Figure 3 is displayed. To obtain further information about the cause of the failure, click View Stack Trace.
Figure 3. Page showing the results of an IVT that failed
The figure shows a page of the IVT program for a test that failed. At the top of the page are two messages: "Using Connection Factory: java:IVTCF" and "Using Destination: IVTQueue". These messages are followed by a sequence of messages indicating the progress of the IVT. Each message in the sequence has a check mark to the right of it. The messages in the sequence are: "Creating initial context ...", "Looking up MQ Connection Factory ...", "Looking up Destination ...", "Creating connection ...", "Starting connection ...", and "Creating session ...". A final message in the sequence then states "Creating message consumer ... failed to create message consumer!", and this message has a white cross in a red circle to the right of it. Following the sequence of messages is a message in bold stating that the IVT failed. This message is followed by another message, which states "Error received - JMS Exception: javax.jms.JMSException: MQJMS2008: failed to open MQ queue". This message is followed by a push button labeled "View Stack Trace", which is followed by a repeat of the message stating that the IVT failed. At the bottom of the page are two links, one labeled "Retry Installation Verification Test" and the other labeled "Change IVT parameters".

For detailed instructions and information on utility scripts provided to deploy the IVT application on JBoss® and WAS CE application servers see: