Use the JMS postcard application to verify a server-to-server installation

 

To verify that the communication between two machines, the sender of the message and the receiver, are working correctly, and that the WebSphere MQ Java™ messaging support is successfully installed, we can use the JMS Postcard application. Both machines must use TCP/IP.

To use the JMS Postcard application for this type of verification one of the following must be true;

 

Parent topic:

Verifying the installation using the JMS Postcard application

 

On the sender machine

  1. Log on as a user in group mqm.

  2. Change directory to /usr/mqm/java/bin

  3. If you have not already run setjmsenv as described in Set environment variables using setjmsenv do so now.

  4. Run the postcard shell script.
    ./postcard
    If there are no queue managers on your machine, you are invited to run the Default Configuration wizard to create a queue manager to use with the JMS Postcard application before signing on to the JMS postcard application.

    If you already have a queue manager on your machine you will go straight to the JMS sign on window (step 6). We can use the JMS Postcard application with existing queue managers, as long as both queue managers belong to the same cluster. If your existing queue manager does not belong to the appropriate cluster refer to the introduction of this topic for information on how to proceed.

  5. Work through the Default Configuration wizard. When you get to the option to join the queue manager to the default cluster, tick the checkbox. On the next screen select yes, make it the repository for the cluster. Once you have completed the wizard you are taken back to the JMS Postcard - Sign On window.

  6. At the JMS Postcard - Sign On window , type in a nickname to use to send messages within the postcard application (for example, user1).

  7. Select the queue manager to use as the mailbox:

    • If the only queue manager on your machine is the default queue manager that you created by running the Default Configuration wizard, this queue manager is used automatically as your mailbox for postcards.

    • If you have created one or more of your own queue managers, but you have not run the Default Configuration wizard, select the appropriate queue manager from the list displayed.

    • If you have run the Default Configuration wizard and you want to use the default queue manager, but there is more than one queue manager on your machine, select the Advanced checkbox, then select Use Default Configuration as mailbox.

    • If you have run the Default Configuration wizard and also created one or more of your own queue managers, and you do not want to use the default queue manager, select the Advanced checkbox, select Choose queue manager as mailbox, then select the appropriate queue manager from the list displayed.

    When your selection is complete, click OK to display your second postcard window.

 

On the receiver machine

  1. Log on as a user in group mqm.

  2. Change directory to /usr/mqm/java/bin

  3. If you have not already run setjmsenv as described in Set environment variables using setjmsenv, do so now.

  4. Run the postcard shell script.
    ./postcard
    If there are no queue managers on your machine, you are invited to run the Default Configuration wizard to create a queue manager to use with the JMS Postcard application before signing on to the JMS postcard application.

    If you already have a queue manager on your machine you will go straight to the JMS Sign On window (step 6). We can use the JMS Postcard application with existing queue managers, as long as both queue managers belong to the same cluster. If your existing queue manager does not belong to the appropriate cluster refer to the introduction of this topic for information on how to proceed.

  5. Work through the Default Configuration wizard:

    1. When you get the option to join the queue manager to the default cluster, tick the checkbox.

    2. In the next window click No another computer has already joined the cluster as a repository. Click Next.

    3. When requested, enter the location of the repository, by typing the machine name of the sender machine. Click Next.

    4. Complete the Default Configuration wizard. Once you have completed the wizard you are taken back to the JMS Postcard Application- Sign On window.

  6. At the JMS Postcard - Sign On window, type in a nickname to use to send messages within the postcard application (for example, user2).

  7. Select the queue manager to use as the mailbox:

    • If the only queue manager on your machine is the default queue manager that you created by running the Default Configuration wizard, this queue manager is used automatically as your mailbox for postcards.

    • If you have created one or more of your own queue managers, but you have not run the Default Configuration wizard, select the appropriate queue manager from the list displayed.

    • If you have run the Default Configuration wizard and you want to use the default queue manager, but there is more than one queue manager on your machine, select the Advanced checkbox, then select Use Default Configuration as mailbox.

    • If you have run the Default Configuration wizard and also created one or more of your own queue managers, and you do not want to use the default queue manager, select the Advanced checkbox, select Choose queue manager as mailbox, then select the appropriate queue manager from the list displayed.

    When your selection is complete, click OK to display your first postcard window.

  8. In one of the postcards (for example, user1), enter the nickname for the other postcard application the To: field and the queue manager it is using in the On: field.

  9. Type a message in the Message: field and click Send.

  10. The Postcards sent and received area of the postcard shows details of the message. In the sending postcard, the message is displayed as sent. In the receiving postcard, the message is displayed as received.

  11. In the sent and received area of the postcard, details of the new message are displayed. The message is displayed as received. When this message arrives, this verifies that WebSphere MQ and the Java messaging support are correctly installed and that your communication link between the two machines is working correctly.

When all installation and verification is complete, you are ready to start using WebSphere MQ (see the WebSphere MQ System Administration Guide).


aq10500_