Use a sequence of channel send or receive exits
A WebSphere MQ base Java application can use a sequence of channel send or receive exits that are run in succession. Two classes are provided for this purpose:
- MQSendExitChain, which implements the MQSendExit interface
- MQReceiveExitChain, which implements the MQReceiveExit interface
To use a sequence of send exits, an application must create a list of objects, where each object is one of the following:
- An instance of a user defined class that implements the MQSendExit interface (for a send exit written in Java™)
- An instance of the MQExternalSendExit class (for a send exit not written in Java)
- An instance of the MQSendExitChain class
The application creates an MQSendExitChain object by passing this list of objects as a parameter on the constructor. The application can then assign the MQSendExitChain object to the MQEnvironment.sendExit field before creating an MQQueueManager object.
The context of information passed to exits is solely within the domain of the exits. For example, if a Java exit and a C exit are chained, the C exit will not be aware that there is also a Java exit in effect.
An application can use a sequence of receive exits in a way similar to that just described for a sequence of send exits.
uj11190_