![]() | ![]() | Programming Guide |
Commits an XA-compliant transaction
xa_commit
BEA Tuxedo
Client, Server
The
xa_commitcommand commits the current transaction, initiated byxa_begin. Once initiated, a transaction must be completed by a call to eitherxa_commit,xa_rollback, orxa_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_commitcan set thetp_returnproperty to one of these values:
Execution of
xa_commitcan generate the following exceptions: