Extended messaging - handling late responses

If an application uses a sender bean to send a message, it can optionally retrieve a response to the message. The sender bean can either wait for the response or defer retrieval of the response. Sometimes a response is delayed within the messaging infrastructure, and therefore the application cannot receive the response. Extended messaging can retrieve such a response message (referred to as a late-response message) when it does arrive and pass it to a message-driven bean provided by the application to handle late responses. The message-driven bean used to handle the late response is a standard EJB 2.0 message-driven bean or a receiver bean deployed as a message-driven bean. The deployed message-driven bean can then perform its processing on the message.

Late responses should not be considered normal application behaviour.

For extended messaging to handle late responses for an application, the sender bean must be deployed with the Handle late responses option enabled.

Definition of a late response

A late response occurs when the application is no longer able to retrieve responses to messages that it has sent, as follows:

Handling responses

Extended messaging handles responses in the following stages:

  1. Registering an interest in having a late response retrieved when it is available.

    To request the system to handle late responses for a sender bean, you deploy the sender bean with the Handle late responses extension to the deployment Descriptor.

    If selected, the Handle late responses option defines that extended messaging should pass the response, when it becomes available, to the message-driven bean provided by the application to handle late responses. When the sender bean is deployed a specialized listener port is associated with the bean. This listener port is known as a handle late response listener port.

    If the option is not selected, then the system does not handle late responses, and it is the application's responsibility to handle any late responses.

  2. Starting a JMS listener to retrieve the message when it is available, which then drives the message bean to handle the JMS message.

    The listener port must be defined with the following properties:

    • The same JMS destination as specified as the JMS response destination on the output port used by the sender bean.
    • A listener port extension with Handle Late Responses enabled.

    You cannot use a temporary destination for late responses.

  3. If a request is made to handle a late response, the extended messaging service immediately registers a LateResponse message request with the extended message consumer for the given listener port. The message request is registered independently of any transaction context that the sender bean has. A request record (containing the MessageID of the late response) is added to the AsyncMessageLog log. When the message is eventually received, it is passed to the message-driven bean deployed against the specified late response ListenerPort.


Related concepts
Extended messaging - receiving messages
Extended messaging - sending messages
Extended messaging - data mapping
Extended messaging - application usage scenarios



Searchable topic ID:   cmc_ovw06
Last updated: Jun 21, 2007 8:07:48 PM CDT    WebSphere Business Integration Server Foundation, Version 5.0.2
http://publib.boulder.ibm.com/infocenter/wasinfo/index.jsp?topic=/com.ibm.wasee.doc/info/ee/cmm/concepts/cmc_ovw06.html

Library | Support | Terms of Use | Feedback