Sun GlassFish Message Queue 4.4 Developer's Guide for C Clients



The handle to the connection to which this session belongs. This handle is passed back to you by the MQGetXAConnection function. You can create multiple sessions on a single connection.


An enumeration specifying whether this session will do synchronous or asynchronous message receives. Specify MQ_SESSION_SYNC_RECEIVE or MQ_SESSION_ASYNC_RECEIVE.

If the session is only for producing messages, the receiveMode has no significance. In that case, specify MQ_SESSION_SYNC_RECEIVE to optimize the session’s resource use.


A callback function before asynchronous message delivery.


A callback function after asynchronous message delivery.


A data pointer to be passed to the beforeDelivery and afterDelivery functions.


A handle to this session. You will need to pass this handle to the functions you use to manage the session and to create destinations, consumers, and producers associated with this session.

If receiveMode is MQ_SESSION_SYNC_RECEIVE, pass NULL for beforeMessageListener, afterMessageListener, and callbackData.

The MQCreateXASession function creates a new distributed transaction (XA) session. The connectionHandle must be a XA connection handle.

An XA session is the same as a regular session created by MQCreateSession (see MQCreateSession) except: