If your Java application generates an output response and
you need to correlate the response with the initial synchronous callout
request, your IMS™ application
is responsible for such correlation.
For asynchronous callout, correlation can be achieved by defining
some data, such as a message identifier or a unique request ID, in
the callout request that can correlate with the initial input message.
For synchronous callout, use the correlator token that is passed
with the callout message.
The following diagram demonstrates the high-level steps that are
involved in a non-MDB application to retrieve an IMS callout request and to send the response
back.
Figure 1. Process flow for retrieving and
responding to a synchronous callout request from IMS for non-MDB Java applications
- The Java™ application issues
a SYNC_RECEIVE_CALLOUT request to the OTMA tpipe TP1.
- An IMS application issues
a DL/I ICAL call with the SENDRECV subfunction and specifies the OTMA
destination descriptor name and the timeout value.
- IMS OTMA delivers the request
message to the IMS TM
resource adapter through IMS Connect. A correlation token
is sent with the callout request.
- The Java application receives
the callout request message and the correlation token. After processing
the request, the Java application
sends the response message and the correlation token back to IMS by using the SYNC_SEND request.
With the correlation token, IMS correlates
the response message back to the corresponding IMS transaction instance.