Platform SDK: Transaction Server |
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 may 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 undo 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 the Client Application Startup, Transaction Initiation, and Resource Manager Enlistment state diagrams for more information.