How to use the script files

Follow these procedures to create the required objects and operate the example scenario, using the supplied script files:
  1. Edit the JavaEnv.bat

    Make sure you have edited the JavaEnv.bat file to set your required working environment.

  2. Create a command-line session

    Create a command-line session, and invoke the JavaEnv.bat to make the settings available in the current environment.

  3. Gather hardware required

    Locate all the hardware on which you will be installing the network topology. Gather the machine names of those machines available to you, and note them down. If you have only one machine available, you can still use the scripts to deploy the example network topology, as you can specify the same hostname for each queue manager.

  4. Create an MQ queue manager

    By default, the scripts assume this is called CENTRAL00QM listening on port 1414 for client channel connections.

  5. Describe the MQ queue manager

    Edit and review the CentralQMDetails.bat file to make sure that its details match those of the MQ queue manager you have just created. All values, except the name of the machine on which the MQ queue manager sits, are defaulted in the script file.

  6. Describe the gateway queue manager

    Edit and review the GatewayQMDetails.bat file to make sure that details of the gateway queue manager are decided on, and available for the other .bat files to use. The default name of the gateway queue manager created by the scripts is GATEWAY00QM. You will need to set the machine name, and port number it will listen on. This port must be available for use. Tip: On Windows® machines, use the command netstat -a to get a list of ports currently in use.

  7. Review the central.tst file

    Read the central.tst file, make sure it won't create any MQ objects you are unhappy with on your MQ queue manager.

  8. Distribute all the scripts to all machines

    Copy all of the scripts to all of the machines on which you will be running MQe queue managers. This step spreads knowledge to all the machines in your network, of the host names, port numbers, and queue manager names that you have decided to use. If any of these files are changed, delete all MQe queue managers and restart from this point in the instructions.

  9. Run the central.tst script on your new MQ queue manger
    The central.tst script is in a format used by the runmqsc sample program supplied with MQ. Pipe the central.tst file into runmqsc to configure your MQ queue manger For example:
    runmqsc CENTRAL00QM < Central.tst
    Use the MQ Explorer to view the resultant MQ objects that are created. Milestone: You have now set up your MQ system.
  10. Run the CreateGatewayQM script

    The CreateGatewayQM script uses the details in the CentralQMDetails and GatewayQMDetails scripts to create a gateway queue manager. The script needs no parameters.

  11. Check for the test message

    The script that creates the queue manager sends a test message to the MQ system. Use the MQ Explorer tool to look at the target queue (BRANCH.SALES.QUEUE by default) to make sure a test message arrived. The body of the test message contains the string ABCD. Milestone: You have now set up your MQe gateway queue manager.

  12. Keep the gateway queue manager running

    During the running of the CreateGatewayQM script, an example server program is invoked to start the gateway queue manager, and keep it running. An AWT application runs, displaying a window on the screen.Do not close this window. All the time this window is active, the MQe gateway queue manager it represents is also active. Closing the window closes the MQe gateway queue manager and breaks the path from the branch queue managers to the MQ queue manager.

  13. Create a branch queue manager
    If your branch queue manager needs to run on a different machine, you may need to edit the JavaEnv.bat file to set up your local environment. Create a command-line session, and call JavaEnv.bat as before to set up your environment. Use the CreateBranchQM script to create a branch queue manager. The syntax of the command is :
    CreateBranchQM.bat branchNumber portListeningOn
    Where:
    branchNumber
    Is a 3-digit number, padded with leading zeros, indicating which branch the queue manager is being created for. For example, 000, 001, 002…
    portListeningOn
    Is a port on which the device branch queue manager listens on for administration requests. For example, 8082, 8083…
    Note: The port must not already be in use
    Hint: On Windows machines, use the netstat -a command to view the list of ports in use.

    During the script, a test message is sent to your MQ system. Use the MQ Explorer to make sure the test message arrived successfully. The body of the test message contains the string ABCD.

    At the end of the script, an example program is used to start the MQe queue manager. An AWT application runs, displaying a window on the screen.

    As with the gateway queue manager, do not close this window until you wish to close the queue manager.
  14. Explore the branch queue manager
    The branch queue manager is set up with a channel manager and listener, on the port you specified when you created it, and the Primary Network connection is HttpTcpipAdapter. As a result, you can use the MQe_Explorer to view the queue managers. Refer to How to use MQe_Explorer to view the configuration. Milestone: You now have a branch queue manager set up.
    Note: An MQe queue manager should be named uniquely. Never create two queue managers with the same name.

    You can now use the MQe_Explorer to view the configuration.


Terms of use | WebSphere software

(c) Copyright IBM Corporation 2004, 2005. All rights reserved.