Loading TOC...


   $forestID as xs:unsignedLong,
   $txn-id as xs:unsignedLong,
   $commit as xs:boolean,
   $remember as xs:boolean
) as empty-sequence()


Completes (commits or rolls back) a prepared XA transaction.

forestID A forest ID.
txn-id The transaction ID.
commit Whether to commit or rollback. A value of true means commit.
remember Whether to remember the completion until explicitly forgotten.

Required Privileges



Usage Notes

You should usually let the Transaction Manager handle commit or rollback of global transactions. This function is made available for unusual circumstances in which you need to heuristically complete the MarkLogic branch of a global XA transaction. For example, if contact with the Transaction Manager is lost for a long time.


xdmp:xa-complete($forest-id, $txn-id, fn:true(), fn:true())
=> Empty. The given transaction is committed and the
   outcome is remembered.

xdmp:xa-complete($forest-id, $txn-id, fn:false(), fn:true())
=> Empty. The given transaction is rolled back and the
     outcome is remembered.

Stack Overflow iconStack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.