Java exceptions that involve output messages

If any errors occur when the IMS™ TM resource adapter passes the message through IMS Connect to IMS, and as IMS processes this transaction and attempts to return the output, the Java™ client receives an exception.

The type of exception that is thrown indicates whether an output message is available for retrieval. For example, if the Java client receives an IMSDFSMessageException exception that indicates that the transaction is stopped, the application was not run. Therefore, no output message is available for retrieval. However, if the transaction runs but the executionTimeout value expires before the output message is returned to IMS Connect, the Java client receives an EISSystemException exception. This exception indicates that an execution timeout has occurred. In this case, the output message is queued to the appropriate IMS OTMA asynchronous output queue or tpipe for later retrieval.

Asynchronous output interaction errors

In general, you can use the asynchronous output interactions, SYNC_RECEIVE_ASYNCOUTPUT_SINGLE_NOWAIT and SYNC_RECEIVE_ASYNCOUTPUT_SINGLE_WAIT, to retrieve output messages queued for any client ID, regardless of how those messages were queued to the associated client ID. The messages might be queued either as a result of a failed commit mode 0 transaction, or from an IMS application that issued an INSERT call to an Alternate Program Communication Block (ALTPCB).

For example, in retrieving an output message from a failed commit mode 0 transaction, the client ID that is specified in the IMSConnectionSpec class for retrieval request must match the client ID that was specified on the failed commit mode 0 transaction. If nothing is in the OTMA asynchronous output queue for that particular client ID, an execution timeout exception occurs. The timeout exception can mean one of the following two scenarios:

  • The queue has no messages.
  • The timeout value did not provide enough time for IMS Connect to retrieve the message from the queue.

For both asynchronous output interactions, execution timeout is the length of time IMS Connect waits for a response from IMS. If you do not specify an execution timeout value for a retrieval request, the default execution timeout value is used. The default timeout value is the IMS Connect configuration member TIMEOUT value. You might need to experiment with the execution timeout value to ensure that output messages are returned for all types of interactions.