Chapter 6: WebSphere MQ Middleware

This chapter tells you how to configure WebSphere MQ middleware:

For details of the WebSphere MQ products that need to be installed on each tier, see the Client Tier, Middle Tier and Mainframe Tier chapters.

WebSphere MQ was formerly called MQSeries. It is still referred to by that name in some places in the SOA Express IDE. Also, WebSphere MQ should not be confused with the WebSphere Application Server.

In this chapter, we assume that the middle tier is physically realized by one or more server-class computers. Although it is possible for the mainframe to host a virtual middle tier, that possibility is not considered further.

In this chapter, we assume that you are using WebSphere MQ Distributed Queue Messaging. We do not consider other approaches such as clustering.

Configuration steps in this chapter apply for both CICS and IMS, except for the setting up of the WebSphere MQ CICS adapter.

Also in this chapter, the term server-server configuration refers to the situation in which WebSphere MQ servers are installed both at the middle-tier computer and at the mainframe. The term client-server configuration means that a WebSphere MQ client is installed on the middle tier and a WebSphere MQ server at the mainframe.

SOA Express and WebSphere MQ

Full details about WebSphere MQ can be found in your WebSphere MQ documentation, particularly IBM WebSphere MQ Intercommunication.

WebSphere MQ Objects Required for SOA Express

The main WebSphere MQ objects required for SOA Express are:

For communication in a server-server configuration, matched pairs of sender and receiver message channels are needed, together with their associated transmission queues, at the middle-tier computer and at the mainframe. Because we recommend that you use triggering to ensure these message channels are available, initiation queues are also needed at each end. See Figure 6-1.

WebSphere MQ Server-Server Configuration

Figure 6-1: WebSphere MQ Server-Server Configuration

In contrast, in a client-server configuration, only an MQI server-connection channel is needed and channel triggering is unnecessary. See Figure 6-2.

WebSphere MQ Client-Server Configuration

Figure 6-2: WebSphere MQ Client-Server Configuration

In either case, at the mainframe the CICS task initiator (CKTI) transaction (provided with the WebSphere MQ CICS Adapter) is used to trigger the Micro Focus Message Trigger Monitor (MMTM) transaction whenever there are messages on the application queue. See Figure 6-3.

CICS Task Initiator (CKTI)

Figure 6-3: CICS Task Initiator (CKTI)

Defining WebSphere MQ Objects

We recommend that you adopt an extensible naming scheme to define WebSphere MQ objects for SOA Express. Most objects, including queue managers, channels, transmission queues and the application queue, can be re-used by several SOA Express projects. Other objects, such as the reply-to queues, are usually re-usable but can be given project-specific names if this is deemed desirable.

In all cases you will find it useful to construct names from a set of standard identifiers. For example, the template commands in this chapter use the placeholders MidTier and Mainframe; in your organization, these might be instantiated as DEPLOY1 and MVSHOST. In WebSphere MQ, use of the dot separator in names has no functional significance. Refer to your WebSphere MQ documentation for other rules on naming objects.

The template commands in this chapter are shown as command line WebSphere MQ commands, to ensure cross-platform commonality. With WebSphere MQ for Windows, UNIX and Linux, you can define objects by using the WebSphere MQ Explorer snap-in for the Microsoft Management Console, or the WebSphere MQ Web Administration application. You can also define objects by using an Interactive System Productivity Facility (ISPF) panel interface. For more information, refer to your IBM WebSphere MQ Command Reference.

Server-Server Configuration

This section deals with the situation where WebSphere MQ Server is installed at both the middle-tier computer and the mainframe. This implies separate queue managers, which must be configured to communicate with each other by means of matched pairs of sender and receiver channels.

The discussion makes the following assumptions:

At the Middle-Tier Computer

Here are the WebSphere MQ objects that must be defined at the middle-tier computer, with templates for the corresponding WebSphere MQ commands. Refer to Figure 6-4.

WebSphere MQ Objects at the Middle Tier

Figure 6-4: WebSphere MQ Objects at the Middle Tier

For channel triggering to work, the middle-tier computer's channel initiator must be started as follows:

  1. Enter RUNMQSC to start the WebSphere MQ command interpreter.
  2. Enter START CHINIT INITQ(MidTier.Mainframe.CHINIT.QUEUE).
  3. Enter END to exit.

At the Mainframe

Here are the WebSphere MQ objects that must be defined at the mainframe, with templates for the corresponding WebSphere MQ commands. Refer to Figure 6-5.

WebSphere MQ Objects at the Mainframe

Figure 6-5: WebSphere MQ Objects at the Mainframe

(CICS only) For both MMTM and channel triggering to work, two instances of the CICS task initiator CKTI must be started:

  1. Enter CKQC STARTCKTI MICROFOCUS.CG.INITQ at the CICS command line.
  2. Enter CKQC STARTCKTI Mainframe.MidTier.CHINIT.QUEUE. (Omit this step if you are not using channel triggering.)

We recommend that you put these commands in a startup script to ensure that CKTI is restarted when CICS is restarted.

Client-Server Configuration

This section deals with the situation where a WebSphere MQ Client is installed at the middle-tier computer, rather than a WebSphere MQ server. In this case, the WebSphere MQ client is owned by the queue manager in the WebSphere MQ Server running on the mainframe. There is no concept of a remote queue, as all queues are local to the queue manager at the mainframe. A single bidirectional server-connection (SVRCONN) channel is used instead of pairs of sender and receiver channels, and channel triggering is not required.

The discussion assumes that WebSphere MQ is installed and that you have already defined the queue manager.

Here are the WebSphere MQ objects that must defined at the mainframe, with templates for the corresponding WebSphere MQ commands. No objects need be defined at the middle-tier computer. Refer to Figure 6-6.

WebSphere MQ Objects at the Mainframe

Figure 6-6: WebSphere MQ Objects at the Mainframe

For MMTM triggering to work, the CICS task initiator, CKTI, must be started as follows from the CICS command line:

CKQC STARTCKTI MICROFOCUS.CG.INITQ

We recommend that you put this command in a startup script to ensure that CKTI is restarted when CICS is restarted.

Specifying WebSphere MQ Parameters in the SOA Express IDE

The names of some WebSphere MQ objects need to be specified within the SOA Express IDE for each project. In particular, you need to specify the items below (template names shown in brackets, where applicable). It is important to understand that you merely specify the objects in the SOA Express IDE, you do not define them. The objects must be defined with WebSphere MQ commands, as described earlier.

The reply-to queue prefix and the number of reply-to queues together specify the names of the reply-to queue objects. Thus the default values of CG.WS.REPLY and 3 specify queues named CG.WS.REPLY01, CG.WS.REPLY02 and CG.WS.REPLY03.

In the SOA Express IDE, you can save the settings you've entered, as a named configuration. You can load a saved configuration by name, so you don't need to re-enter all the details. You may find this especially useful if you are switching back and forth between using mainframe emulation and using the real mainframe.

How to...

Defining WebSphere MQ Objects for Mainframe Emulation

This section assumes you have read the section Defining WebSphere MQ Objects.

You can set up a mainframe emulation environment at a PC on the client tier using Micro Focus Mainframe Express and IBM WebSphere MQ Server. This enables you to test the eBiz Transactions generated by SOA Express without necessarily affecting your mainframe's operation. Mainframe Express CICS Option includes an emulation of the CICS task initiator, CKTI. For more information, see the section on Mainframe Emulation Environment in the chapter Client Tier. For information on configuring Mainframe Express for use with eBiz or Data Access Transactions, see your User's Guide and the Mainframe Express CICS Option Technical Guide.

Server-Server Configuration

This section assumes that the middle-tier computer and the emulating PC are two different machines.

At the emulating PC, you need to define mostly the same WebSphere MQ objects as you would at the mainframe, with the exception of those items listed below.

All WebSphere MQ queue manager names on a network should be unique. You must, therefore, use a different queue manager name on the Mainframe Express PC to that used on the mainframe. This means that you must also alter the queue manager name in the WebSphere MQ parameters specified within the SOA Express IDE and that the middle-tier components must be regenerated for production.

For IMS, as shown above in the section At the Mainframe in the section Server-Server Configuration in the section Defining WebSphere MQ Objects, the application queue definition does not need the PROCESS, Initiation queue, or triggering parameters.

For CICS, the CKSG transaction supplied by the WebSphere MQ CICS Adapter is not available (and is not emulated by Mainframe Express CICS Option). Therefore, if you want to use channel triggering you need to use a different definition for the transmission queue, and the channel initiation process definition (Mainframe.MidTier.CHINIT.PROCESS) can be omitted. The revised transmission queue definition is:

DEFINE QLOCAL(MidTier_Queue_Manager_Name) +
       USAGE(XMITQ) +
       INITQ(Mainframe.MidTier.CHINIT.QUEUE) +
       TRIGGER TRIGTYPE(FIRST) +
       TRIGDATA(Mainframe.MidTier.TCP)

At the middle-tier computer, you must temporarily redefine the sender channel so that it refers to the DNS name or IP address of the emulating PC rather than the mainframe:

DEFINE CHANNEL(MidTier.Mainframe.TCP) +
       CHLTYPE(SDR) +
       TRPTYPE(TCP) +
       CONNAME('PC_HostName(PortNo)') +
       XMITQ(Mainframe_Queue_Manager_Name)

Client-Server Configuration

If WebSphere MQ is installed on the emulating PC, define exactly the same WebSphere MQ objects at the emulating PC as you would at the mainframe with the exception of the queue manager name. Specify the name of the queue manager running on the emulating PC in the WebSphere MQ parameters in the SOA Express IDE.

You can install the WebSphere MQ Client on both the middle-tier computer and the emulating PC, provided that both clients are owned by the same queue manager - for example, the WebSphere MQ Clients on the middle tier and the emulating PC might be owned by the queue manager running on the mainframe. In this case, refer to the WebSphere MQ Client-Server configuration definitions shown in the previous section and define the same WebSphere MQ objects on the owning queue manager (WebSphere MQ Server) machine. Specify the name of the owning queue manager in the WebSphere MQ parameters in the SOA Express IDE.

In the client-server configuration, no objects need to be defined on the middle tier, but you must temporarily change the WebSphere MQ host name and port parameters (specified within the SOA Express IDE) to refer to the host name and port of the machine running the owning queue manager (either another PC running WebSphere MQ Server or the mainframe).

These changes mean that the middle-tier components must be regenerated for production.


Copyright © 2007 Micro Focus (IP) Ltd. All rights reserved.