Skip Navigation Links | |
Exit Print View | |
Oracle GlassFish Server Message Queue 4.5 Developer's Guide for C Clients |
Message Queue C Client Setup Operations
To Set Up a Message Queue C Client to Produce Messages
To Set Up a Message Queue C Client to Consume Messages Synchronously
To Set Up a Message Queue C Client to Consume Messages Asynchronously
Setting Connection and Message Properties
To Set Properties for a Connection
To Iterate Through a Properties Handle
Defining Connection Properties
Working With Secure Connections
Configuring the Client for Secure Communication
Verification Using Fingerprints
Coordinating NSS Initialization
Working With Sessions and Destinations
Getting Information About Destinations
Receiving a Message Synchronously
Receiving a Message Asynchronously
Working With Distributed Transactions
Message Queue Resource Manager Information
Table 2-14 lists the functions you use to free or deallocate memory allocated by the Message Queue-C client library on behalf of the user. Such deallocation is part of normal memory management and will prevent memory leaks.
The functions MQCloseConnection, MQCloseSession , MQCloseMessageProducer, and MQCloseMessageConsumer are used to free resources associated with connections, sessions, producers, and consumers.
Table 2-14 Functions Used to Free Memory
|
You should free a connection only after you have closed the connection with the MQCloseConnection() function and after all of the application threads associated with this connection and its dependent sessions, producers, and consumers have returned.
You should not free a connection while an application thread is active in a library function associated with this connection or one of its dependent sessions, producers, consumers, and destinations.
Freeing a connection does not release resources held by a message associated with this connection. You must free memory allocated for this message by explicitly calling the MQFreeMessage function.
You should not free a properties handle if the properties handle passed to a function becomes invalid on its return. If you do, you will get an error.