Exit providers can supply an MQ_CONNX_EXIT function to intercept
the MQCONN and MQCONNX calls.
- MQ_CONNX_EXIT (pExitParms, pExitContext, pQMgrName,
ppConnectOpts,
- ppHconn, pCompCode, pReason)
|
The MQ_CONNX_EXIT call has the following parameters.
Exit parameter structure.
Exit context structure.
Name of queue manager.
Options that control the action of
MQCONNX .
Connection handle.
Completion code.
Reason code qualifying
pCompCode.
- The MQ_CONNX_EXIT function interface described here is used for
both the MQCONN call and the MQCONNX call.
However, separate entry points are defined for these two calls. To
intercept both calls, the MQXEP call must be used at
least twice - once with function identifier MQXF_CONN, and again with
MQXF_CONNX.
Because the MQ_CONNX_EXIT interface is the same for
MQCONN and MQCONNX , a single exit function can be used
for both calls; the Function field in the MQAXP
structure indicates which call is in progress. Alternatively, the
MQXEP call can be used to register different exit functions for the
two calls.
- When a message channel agent (MCA) responds to an inbound client
connection, the MCA can issue a number of MQ calls before the client state is
fully known. These MQ calls result in the API exit functions being
invoked with the MQAXC structure containing data relating to the MCA, and not
to the client (for example, user identifier and connection name).
However, once the client state is fully known, subsequent MQ calls result in
the API exit functions being invoked with the appropriate client data in the
MQAXC structure.
- All MQXR_BEFORE exit functions are invoked before any parameter validation
is performed by the queue manager. The parameters may therefore be
invalid (including invalid pointers for the addresses of parameters).
The MQ_CONNX_EXIT function is invoked before any authorization
checks are performed by the queue manager.
- The exit function must not change the name of the queue manager specified
on the MQCONN or MQCONNX call. If the name is
changed by the exit function, the results are undefined.
- An MQXR_BEFORE exit function for the MQ_CONNX_EXIT cannot issue
MQ calls other than MQXEP .
MQ_CONNX_EXIT (&ExitParms, &ExitContext, QMgrName,
&pConnectOpts, &pHconn, &CompCode,
&Reason);
The parameters passed to the exit are declared as follows:
PMQAXP pExitParms; /* Exit parameter structure */
PMQAXC pExitContext; /* Exit context structure */
PMQCHAR48 pQMgrName; /* Name of queue manager */
PPMQCNO ppConnectOpts; /* Options that control the action of
MQCONNX */
PPMQHCONN ppHconn; /* Connection handle */
PMQLONG pCompCode; /* Completion code */
PMQLONG pReason; /* Reason code qualifying CompCode */