Termination - MQ_TERM_EXIT
MQ_TERM_EXIT provides connection level termination, registered with a function identifier of MQXF_TERM and ExitReason MQXR_CONNECTION. If registered, MQ_TERM_EXIT is called once for every disconnect request.
As part of the termination, storage no longer required by the exit can be released, and any clean up required can be performed.
If an MQ_TERM_EXIT fails with MQXCC_FAILED, the queue manager returns from the MQDISC that called it with MQCC_FAILED and MQRC_API_EXIT_ERROR.
If the queue manager encounters an error while terminating the API exit function execution environment after invoking the last MQ_TERM_EXIT, the queue manager returns from the MQDISC call that invoked MQ_TERM_EXIT with MQCC_FAILED and MQRC_API_EXIT_TERM_ERROR
The interface to this function is:
MQ_TERM_EXIT (&ExitParms, &ExitContext, &CompCode, &Reason)where the parameters are:
- ExitParms (MQAXP) - input/output
- Exit parameter structure.
- ExitContext (MQAXC) - input/output
- Exit context structure.
- CompCode (MQLONG) - input/output
- Completion code, valid values for which are:
- MQCC_OK
- Successful completion.
- MQCC_FAILED
- Call failed
- Reason (MQLONG) - input/output
- Reason code qualifying the completion code.
If the completion code is MQCC_OK, the only valid value is:
If the completion code is MQCC_FAILED, the exit function can set the reason code field to any valid MQRC_* value.
- MQRC_NONE
- (0, x'000') No reason to report.
The CompCode and Reason returned to the application depend on the value of the ExitResponse field in MQAXP.
Parent topic:
The API exit functions
fg15010_