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

Parameters

connectionHandle

The handle to the connection that you want to close. This handle is created and passed back to you by the function MQCreateConnection.

Closing the connection closes all sessions, producers, and consumers created from this connection. This also forces all threads associated with this connection that are blocking in the library to return.

Closing the connection does not actually release all the memory associated with the connection. After all the application threads associated with this connection (and its dependent sessions, producers, and consumers) have returned, you should call the MQFreeConnection() function to release these resources.