This topic applies only on the z/OS operating system.

Messaging flow for ASF message-driven beans with WebSphere MQ as the messaging provider

Application Server Facilities (ASF) is used with messaging providers that include the optional ASF extensions to the JMS specification. On z/OS® these extensions are implemented by the WebSphere® MQ messaging provider. From WebSphere Application Server Version 7.0 onwards, JCA is preferred to the older ASF technology.

ASF support for message-driven beans in WebSphere Application Server is known as the message listener service. When you install an ASF message-driven bean application you provide configuration information as a message listener port.

Figure 1. WebSphere MQ connections - Message Listener Service (ASF)
A WebSphere Application Server scaleable server installation contains a control region (CR) and several servant regions (SR). The CR contains a message listener service, and the SR contains an application. Messages flow from WebSphere MQ to the message listener service in the CR, through a zWLM queue in the WebSphere Application Server installation, and then to the application in the SR. Messages also flow from WebSphere MQ directly to the application in the SR and from there back to WebSphere MQ. Outbound communications flow out from the SR.
On z/OS, ASF is used with two different messaging flow patterns.

Listening in the controller

The following figure shows WebSphere MQ ASF messaging flow when the message listener is listening in the controller.

In the z/OS WebSphere Application Server, ASF supports message-driven processing where the message-driven bean listener is in the CR and the work is distributed to the message-driven bean dispatcher in the SRs. Note that for publish-subscribe there is one listener that registers one subscription for the entire server, not separate subscriptions for each SR.

Figure 2. WebSphere MQ ASF - listening in the controller
A WebSphere Application Server scaleable server installation comprises a control region (CR) and several servant regions (SR). The CR contains a WebSphere MQ Java client, which handles messages from WebSphere MQ, and a WebSphere MQ ASF listener for workload classification. Each SR contains a WebSphere MQ Java client, a WebSphere MQ ASF dispatcher, and an EJB container containing a message-driven bean. The installation also has a number of WLM queues. As well as the WebSphere Application Server installation, there is a WebSphere MQ instance containing a WebSphere MQ queue where the messages originate. The text following the figure describes the path a message takes through these items.
Processing is as follows:
  1. When a message arrives on a JMS destination (shown in the figure as a WebSphere MQ queue), the listener receives a copy of the message. The listener does not delete the message from the destination.
  2. The listener determines the transaction class for the message and uses z/OS workload management (WLM) to pass a message token (not the actual message) to an SR. Workload management selects an appropriate SR based on the transaction class.
  3. The dispatcher uses the message token to perform the following actions:
    1. Receive the message
    2. Delete the message from the destination
    3. Pass the message to the onMessage method of the message-driven bean

Listening in the servant

The following figure shows WebSphere MQ ASF messaging flow when the message listener is listening in a servant region.

The figure shows a special form of ASF message-driven bean processing where both the message-driven bean listener and the message-driven bean dispatcher run in the same SR. WebSphere Application Server uses this configuration for non-durable publish-subscribe messaging. Each SR registers its own subscription so that one server, potentially, receives and processes multiple copies of the same publication (that is, one copy of the same publication for each SR).

Figure 3. WebSphere MQ ASF - listening in the servant
A WebSphere Application Server scaleable server installation comprises a control region (CR) and several servant regions (SR). WLM routing takes place in the CR. Each SR contains a WebSphere MQ Java client, a WebSphere MQ MDB listener, a WebSphere MQ MDB dispatcher, and an EJB container containing a message-driven bean. The installation also has a WLM queue. As well as the WebSphere Application Server installation, there is a WebSphere MQ instance containing a WebSphere MQ queue where the messages originate. The text following the figure describes the path a message takes through these items.
Processing is as follows:
  1. When a message arrives at the destination (shown in the figure as a WebSphere MQ queue), the listener receives a copy of the message. The listener does not delete the message from the destination.
  2. The listener calls code in the CR which uses z/OS WLM to pass a message token back to the same SR.
  3. The dispatcher uses the message token to receive the message and pass it to the onMessage method of the message-driven bean. The dispatcher deletes the message from the destination.



Subtopics
[z/OS] Workload management for ASF message-driven beans that use WebSphere MQ as the messaging provider
[z/OS] The message-driven bean throttling mechanism on z/OS
[z/OS] MDB throttle settings for message-driven beans on z/OS
[z/OS] Connection factory settings for ASF message-driven beans that use WebSphere MQ as the messaging provider on z/OS
Related concepts
[z/OS] Message-driven beans and tuning settings on z/OS
Related tasks
[z/OS] Tuning message-driven bean processing on z/OS by using WebSphere MQ as the messaging provider in ASF mode
Related reference
[z/OS] MDB throttle support for z/OS debugging tips
Concept topic    

Terms of Use | Feedback

Last updated: Oct 21, 2010 10:04:34 PM CDT
http://www14.software.ibm.com/webapp/wsbroker/redirect?version=compass&product=was-nd-mp&topic=cprf_tunezmdb_MQ_ASF
File name: cprf_tunezmdb_MQ_ASF.html