Verify with the sample application

 

An installation verification program, MQIVP, is supplied with WebSphere MQ base Java. We can use this program to test all the connection modes of WebSphere MQ base Java. The program prompts for a number of choices and other data to determine which connection mode you want to verify. Use the following procedure to verify your installation:

  1. If you are going to run the program in client mode, configure your queue manager as described in Configuring your queue manager to accept client connections.

  2. The user ID associated with the program when it runs must have authority to access certain resources of the queue manager. Grant the following authorities to the user ID:

    • The authority to connect to the queue manager, and the authority to inquire on the attributes of the queue manager object

    • The authority to put messages on the queue SYSTEM.DEFAULT.LOCAL.QUEUE, and the authority to get messages from the queue

    For information about how to grant authorities, see the following books:

    • WebSphere MQ for iSeries System Administration Guide, if the queue manager is running on i5/OS

    • WebSphere MQ System Administration Guide, if the queue manager is running on a UNIX system or Windows

    • WebSphere MQ for z/OS System Setup Guide, if the queue manager is running on z/OS

    If you are going to run the program in client mode, see also WebSphere MQ Clients.

    Perform the remaining steps of this procedure on the system on which you are going to run the program.

  3. Make sure that you have updated your CLASSPATH environment variable according to the instructions in Environment variables.

  4. At a command prompt, enter:
    java -Djava.library.path=library_path MQIVP
    where library_path is the path to the WebSphere MQ Java libraries (see The WebSphere MQ Java libraries).

    The program tries to:

    1. Connect to the queue manager

    2. Open the queue SYSTEM.DEFAULT.LOCAL.QUEUE, put a message on the queue, get a message from the queue, and then close the queue

    3. Disconnect from the queue manager

    4. Return a message if the operations are successful

  5. At the prompt marked (§):

    • To use a TCP/IP connection, enter a WebSphere MQ server host name.

    • To use native connection (bindings mode), leave the field blank. (Do not enter a name.)

Here is an example of the prompts and responses you might see. The actual prompts and your responses depend on your WebSphere MQ network.

Please enter the IP address of the MQ server               : ipaddress(§)
Please enter the port to connect to                        : (1414)(§§)
Please enter the server connection channel name            : channelname(§§)
Please enter the queue manager name                        : qmname
Success: Connected to queue manager.
Success: Opened SYSTEM.DEFAULT.LOCAL.QUEUE
Success: Put a message to SYSTEM.DEFAULT.LOCAL.QUEUE
Success: Got a message from SYSTEM.DEFAULT.LOCAL.QUEUE
Success: Closed SYSTEM.DEFAULT.LOCAL.QUEUE
Success: Disconnected from queue manager


Tests complete -
SUCCESS: This MQ Transport is functioning correctly.
Press Enter to continue ...

  1. On z/OS, leave the field blank at prompt marked (§).

  2. If you choose server connection, you do not see the prompts marked (§§).

  3. On i5/OS, we can issue the command java MQIVP only from QShell. Alternatively, we can run the application by using the CL command RUNJVA CLASS(MQIVP).


uj10410_