xa_rollback()--Roll Back an XA Transaction Branch (Transaction Scoped Locks)


  Syntax
 #include <xa.h>

 int xa_switch.xa_rollback_entry(XID *xid,     
     int rmid, long flags);

  Default Public Authority: *USE

  Service Program: QTNXADTP

  Threadsafe: Yes

A transaction manager calls xa_rollback() to roll back work performed on behalf of the transaction branch. A transaction branch is capable of being rolled back until is has been successfully committed.


Parameters

*xid
(Input) A pointer to the transaction branch identifier. This identifier was generated by the transaction manager when the transaction branch was started.

rmid
(Input) An integer value that the transaction manager generated when calling xa_open(). The rmid identifies the resource manager.

flags
(Input) The following are valid settings of flags.

TMNOFLAGS: 0x00000000L Perform the rollback operation normally.


Authorities

None


Return Value

The following return codes indicate that the resource manager rolled back the work done on this transaction branch. These values are typically returned when the transaction branch was previously marked rollback-only.

The following return codes may be returned for any flags setting.



Error Messages

The following messages may be sent from this function.



Related Information


Example

Note: By using the code examples, you agree to the terms of the Code license and disclaimer information.

#include <xa.h>

main() {
  XID  *xid;
  int  rmid;
  long flags;
  int  retcode;
  extern struct xa_switch_t xa_switch;

  retcode =
     xa_switch.xa_rollback_entry(xid, rmid, flags);
}


API introduced: V5R2

[ Back to top | UNIX-Type APIs | APIs by category ]