Connect and connect extension - MQ_CONNX_EXIT

 

MQ_CONNX_EXIT provides:

The same interface, as described below, is invoked for both MQCONN and MQCONNX call exit functions.

When the message channel agent (MCA) responds to an inbound client connection, the MCA can connect and make a number of WebSphere MQ API calls before the client state is fully known. These API calls call the API exit functions with the MQAXC based on the MCA program itself (for example in the UserId and ConnectionName fields of the MQAXC).

When the MCA responds to subsequent inbound client API calls, the MQAXC structure is based on the inbound client, setting the UserId and ConnectionName fields appropriately.

The queue manager name set by the application on an MQCONN or MQCONNX call is passed to the underlying connect call. Any attempt by a before MQ_CONNX_EXIT to change the name of the queue manager has no effect.

Use function identifiers MQXF_CONN and MQXF_CONNX with exit reasons MQXR_BEFORE and MQXR_AFTER to register before and after MQCONN and MQCONNX call exit functions.

An MQ_CONNX_EXIT exit called for reason MQXR_BEFORE must not issue any WebSphere MQ API calls, as the correct environment has not been set up at this time.

The interface to MQCONN and MQCONNX is identical:

MQ_CONNX_EXIT (&ExitParms, &ExitContext, &pQMgrName, &pConnectOpts,
               &pHconn, &CompCode, &Reason);
where the parameters are:

ExitParms (MQAXP) - input/output

Exit parameter structure.

ExitContext (MQAXC) - input/output

Exit context structure.

pQMgrName (PMQCHAR) - input

Pointer to the queue manager name supplied on the MQCONNX call. The exit must not change this name on the MQCONN or MQCONNX call.

pConnectOpts (PMQCNO) - input/output

Pointer to the options that control the action of the MQCONNX call.

See "MQCNO - Connect options" in the Application Programming Reference for details.

For exit function MQXF_CONN, pConnectOpts points to the default connect options structure (MQCNO_DEFAULT).

pHconn (PMQHCONN) - input

Pointer to the connection handle.

CompCode (MQLONG) - input/output

Completion code, valid values for which are:

MQCC_OK

Successful completion.

MQCC_WARNING

Warning (partial 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:

MQRC_NONE

(0, x'000') No reason to report.
If the completion code is MQCC_FAILED or MQCC_WARNING, the exit function can set the reason code field to any valid MQRC_* value.

 

Parent topic:

The API exit functions


fg14830_