Home | Previous Page | Next Page   Database Access > Working with XA-Compliant External Data Sources > Creating User-Defined XA-Support Routines > 3 3 3

The xa_commit( ) function

3

The xa_commit( ) function 3requests each participating XA data source to commit a transaction. 3If all of the XA data sources return TMSUCCESS on calls to xa_end( ) and to xa_prepare( ), 3the database server calls xa_commit( ) on 3each participating XA data source.

3

The syntax for the function is: 3

3
mint xa_commit (XID *xid,   /* IN */
3           mint rmid,     /* IN */
3          int4 flags)    /* IN */
3 33333333333333333333333
Table 79. xa_commit( ) Parameters
Parameter Description
xid Pointer to the XID data structure that is defined 3in the xa.h file and used for the current 3transaction
rmid Unique resource manager identifier
flags TMNOFLAGS, which is the valid value.
3

The following code sample code fragment contains the xa_commit( ) function: 3

3
#include "xa.h"
3mint mqseries_commit(XID *xid, mint rmid, int4 flags)
3  {
3/*  Error  */
3   return XAER_RMERR;
3/* Success */
3  return XA_OK;
3}
3

For valid return values, refer to X/Open information, including Distributed Transaction Processing: The XA Specification.

Home | [ Top of Page | Previous Page | Next Page | Contents | Index ]