Nesting Transactions

Meta Data Services Programming

Meta Data Services Programming

Nesting Transactions

The repository engine permits nesting of Begin and Commit method invocations, but no actual transaction nesting occurs. A nested transaction count is maintained for each open repository instance.

Invoking the Begin method during an active transaction increments the nested transaction count by one, but has no other effect.

Invoking the Commit method during an active transaction decrements the nested transaction count by one. If, and only if, this decrement reduces the nested transaction count to zero, all updates are committed to the repository database.

Invoking the Abort method during an active transaction undoes all changes made during that transaction. Changes made during any nested transactions are also undone, even if the Commit method has already been invoked for those transactions. The nested transaction count is set to zero.

See Also

IRepositoryTransaction::abort

IRepositoryTransaction::begin

IRepositoryTransaction::commit

Managing Transactions and Threads