MQ_CONNX_EXIT - Connect queue manager (extended)

 


Exit providers can supply an  MQ_CONNX_EXIT  function to intercept the  MQCONN  and  MQCONNX  calls.

 

Syntax


 MQ_CONNX_EXIT  (pExitParms, pExitContext, pqueue_manager, ppConnectOpts,
ppHconn, pCompCode, pReason)

 

Parameters

The  MQ_CONNX_EXIT  call has the following parameters.

 

pExitParms (PMQAXP) - input/output

Exit parameter structure.

 

pExitContext (PMQAXC) - input/output

Exit context structure.

 

pqueue_manager (PMQCHAR48) - input/output

Name of queue manager.

 

ppConnectOpts (PPMQCNO) - input/output

Options that control the action of  MQCONNX .

 

ppHconn (PPMQHCONN) - input/output

Connection handle.

 

pCompCode (PMQLONG) - input/output

Completion code.

 

pReason (PMQLONG) - input/output

Reason code qualifying pCompCode.

 

Usage notes

  1. 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.

  2. 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.

  3. 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.

  4. 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.

  5. An MQXR_BEFORE exit function for the  MQ_CONNX_EXIT  cannot issue MQ calls other than  MQXEP .

 

C invocation

MQ_CONNX_EXIT (&ExitParms, &ExitContext, queue_manager,
              &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  pqueue_manager;      /* 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 */