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
In accordance with the X/Open distributed transaction model, Message Queue C-API support for distributed transactions relies upon a distributed transaction manager. The distributed transaction manage tracks and manages distributed transactions, coordinating the decision to commit them or roll them back, and coordinating failure recovery. The Message Queue C-API supports the X/Open XA interface, qualifying it as an XA-compliant resource manager. This support allows C-API clients running in a distributed transaction processing environment to participate in distributed transactions.
In particular, two C-API functions support the participation of C-API clients in distributed transactions:
MQGetXAConnection() MQCreateXASession()
If a C-client application is to be used in the context of a distributed transaction, then it must obtain a connection by using MQGetXAConnection() and create a session for producing and consuming messages by using MQCreateXASession(). The start, commit, and rollback, of any distributed transaction is managed by the distributed transaction manager.
For more information on XA resource managers, see the XA Specification.
In accordance with the X/Open XA interface specification, a distributed transaction manager needs the following information regarding the Message Queue XA-compliant resource manager:
Name of the xa_switch_t structure: sun_my_xa_switch
Name of the Resource Manager: SUN_RM
The MQ C-API library to be linked: mqcrt
The xa_close string and format: none
The xa_open string and format: semicolon (“;”)-separated name/value pairs
The following name/value pairs are supported:
Table 2-12 Message Queue Resource Manager Name/Value Pairs
|
To help you program an application that uses distributed transactions, Message Queue provides programming examples based on the Tuxedo distributed transaction manager. A description of the sample programs and their location is provided in Table 1-3.