The xa_end() function
For each XA data source participating in a transaction, the xa_end() function is called before a direct rollback or before the prepare stage for a commit operation.
The syntax for the function is:
mint xa_end (XID *xid, /* IN */
mint rmid, /* IN */
int4 flags) /* IN */| Parameter | Description |
|---|---|
| xid | Pointer to the XID data structure that is defined in the xa.h file and used for the current transaction |
| rmid | Unique resource manager identifier |
| flags | TMSUCCESS, when commit issued,
or TMFAIL, indicating the transaction will be rolled
back |
The following code fragment contains the xa_end() function:
#include "xa.h"
mint mqseries_end(XID *xid, mint rmid, int4 flags)
{
/* Error */
return XAER_RMERR;
/* Success */
return XA_OK;
}For valid return values, refer to X/Open information, including Distributed Transaction Processing: The XA Specification.