Export (0) Print
Expand All

Application Programmer's View of Transactions

The application programmer's transaction model is simple—programs either succeed or fail. When the application program begins a transaction, it gets a transaction object. All subsequent work is associated with that transaction object. When the program reaches a consistent state, it calls the Commit method. If the commit succeeds, the transaction is durably committed. If the commit fails, the transaction aborts. If the application program can't successfully complete the transaction, it can call the Abort method to undo the transaction's effects.

If the program fails before it commits the transaction, the transaction manager aborts the transaction and informs each enlisted resource manager to rollback the transaction's effects. If either the computer or resource manager fails, the transaction is also aborted.

If the transaction successfully commits, the resource managers and the transaction manager ensure that the transaction's effects are durable, even if there are subsequent failures.

See Also

Show:
© 2014 Microsoft