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_end( ) function

3

For each 3XA data source participating in a transaction, the xa_end( ) function 3is called before a direct rollback or before the prepare stage for 3a commit operation.

3

The syntax for the function is: 3

3
mint xa_end (XID *xid,    /* IN */
3          mint rmid,     /* IN */
3          int4 flags)   /* IN */

3

3 33333333333333333333333
Table 76. xa_end( ) Parameters
Parameter Description
xid Pointer to the 3XID data structure that is defined in the xa.h file 3and used for the current transaction
rmid Unique resource manager identifier
flags 3

TMSUCCESS, when commit issued, or

3 3

TMFAIL, indicating the transaction will be rolled back

3

The following code fragment contains the xa_end( ) function: 3

3
#include "xa.h"
3mint mqseries_end(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 ]