Nested Transactions

A nested transaction is used to provide a transactional guarantee for a subset of operations performed within the scope of a larger transaction. Doing this allows you to commit and abort the subset of operations independently of the larger transaction.

The rules to the usage of a nested transaction are as follows:

To create a nested transaction, use the XmlTransaction::createChild() method. For example:

    // parent transaction
    XmlTransaction parentTxn = myManager.createTransaction();
    // child transaction
    XmlTransaction childTxn = parentTxn.createChild();