+

Search Tips | Advanced Search

Verifying the sample IT configuration

Run the sample stand-alone JMS application to send and receive messages through IBM MQ , and verify that we have configured IBM MQ correctly for use with the sample application.


Before you begin

Download the sample application package. Click the following link and save the file to the computer on which you are installing IBM MQ: sampleJMSApp.zip, then extract the contents. The package contains a sample JMS application .jar file and batch files for running the application.


About this task

The JMS application comprises a requester client, which sends the initial message, and a responder client, which receives the message and sends a reply. The supplied batch files perform the following actions:

With two command prompt windows, we can see the actions of the requester and responder separately and more clearly.


Procedure

  1. Double-click the runresponder.cmd file. In the command prompt window, labeled Responder window, the responder client starts then waits for a message.
    > Connection factory located in JNDI.
    > Destination located in JNDI.
    > Creating connection to QueueManager.
    > Created connection.
    
    > Waiting for message.
    
  2. Double-click the runrequester.cmd file. In the Requester window, observe the requester messages. In the Responder window, observe the updated responder messages; the message it received (from the requester client) and the reply message that it sent.


Results

In the command prompt window, labeled Requester window, the requester client shows the connection status, the message it sent, then the reply message that it received from the responder client:
> Connection factory located in JNDI.
> Destination located in JNDI.
> Creating connection to QueueManager.
> Connection created.

> Sending stock request for 'BakedBeans'
> Sent Message ID=ID:414d5120514d5f4c33344c3238482020c3cd094d20002b02

> Received Message ID=ID:414d5120514d5f4c33344c3238482020c3cd094d20002902 for 'B
akedBeans - 15 tins in stock'

> Closing connection to QueueManager.
> Closed Connection.
--------------------------------------------------------
In this window, observe the messages sent through IBM MQ:
- The request message sent
- The reply message received
-----
When ready, press any key to close this window
Press any key to continue . . .
In the Responder window, observe the updated responder messages; the message it received (from the requester client) and the reply message that it sent:
> Connection factory located in JNDI.
> Destination located in JNDI.
> Creating connection to QueueManager.
> Created connection.

> Waiting for message.

> Received Message ID=ID:414d5120514d5f4c33344c3238482020c3cd094d20002b02 for 'B
akedBeans'

> Sending Reply Message 'BakedBeans - 15 tins in stock'
> Sent Message ID=ID:414d5120514d5f4c33344c3238482020c3cd094d20002902

> Closing connection to QueueManager.
> Closed connection.
--------------------------------------------------------
In this window, observe the updated responder messages
- The request message received (from the requester)
- The reply message sent
-----
When ready, press any key to close this window
Press any key to continue . . .

The messages shown in the two command windows verify that the requester and responder clients of the sample application can communicate with each other through IBM MQ.


What to do next

You are now ready to start migrating your sample IBM MQ Version 8.0 installation to a later release of IBM MQ using one of the following two migration options: