The xa_rollback() function
The xa_rollback() function is called if an application rolls back the transaction or if the prepare stage of the transaction fails.
The syntax for the function is:
mint xa_rollback (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 | TMNOFLAGS, which is the valid value. |
The following code sample code fragment contains the xa_rollback() function:
#include "xa.h"
mint mqseries_rollback(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.