#include <xa.h>
int xa_switch.xa_start_2_entry(XID *xid,
int rmid, XACTL *ctl, long flags);
A transaction manager calls xa_start_2() to inform a resource manager that an application may do work on behalf of a transaction branch. The calling thread becomes associated with the transaction branch.
For additional information about parameters, authorities required, return values, and error conditions, see the xa_start() API.
The xa_start_2() function is the same as the xa_start() function, with one additional parameter, ctl.
struct xactl_t {
long flags; /* valid element flags */
TRANSACTION_TIMEOUT timeout; /* timeout value */
};
Following are the valid settings of ctl->flags.
XAOPTS_TIMEOUT: 0x00000001L Timeout value is present.
XAOPTS_NOFLAGS: 0x00000000L To be used when no optional values are set.
ctl->timeout is the number of seconds before which the resource manager can timeout and rollback the transaction. Type TRANSACTION_TIMEOUT is declared in header file xa.h.
See Code disclaimer information for information pertaining to code examples.
#include <xa.h>
main() {
XID *xid;
int rmid;
XACTL ctl;
long flags;
int retcode;
extern struct xa_switch_t xa_switch;
retcode =
xa_switch.xa_start_2_entry(xid, rmid, &ctl, flags);
}
| Top | UNIX-Type APIs | APIs by category |