Programming Guide |
Commits an XA-compliant transaction
xa_commit
Oracle Tuxedo
Client, Server
The
xa_commit
command commits the current transaction, initiated by xa_begin. Once initiated, a transaction must be completed by a call to eitherxa_commit
, xa_rollback, or xa_end.For example, the following transaction calls service
DEPOSIT
. If successful, the transaction is committed; otherwise, it is rolled back:xa_begin
service_call "DEPOSIT" ({ACCOUNT, AMOUNT})
if ((@app()->tp_severity > TP_WARNING) \
|| (@app()->tp_return < 0) || (@app()->tp_tran_status < 0))
{
xa_rollback
return 0
}
xa_commit
return 0
xa_commit
can set thetp_return
property to one of these values:
Execution of
xa_commit
can generate the following exceptions: