Transaction manager
The role of the transaction manager is to serve as a coordinator for all of the components involved in the global transaction and to keep track of all of the steps involved in the transactions. The transaction manager works with all of the resource managers to reach a consistent decision as to whether to commit or cancel the transaction.
If all of the resource managers are ready and in unanimous agreement, the transaction manager instructs them all to commit their transactions. If any one of the resource managers involved in this global transaction is not ready or able to commit, or does not respond to the transaction manager request, all of the resource managers are instructed by the transaction manager to roll back their transactions.
In summary, there are three different results that the transaction manager may find on a local level:
- The client application either commits or cancels the transaction.
- One of the resource managers cancels the transaction.
- A failure occurs, for example, there is an interruption on the network.
In all of the situations, the transaction manager must signal the resource managers to either commit or roll back the entire transaction. If any failure in the system occurs, the transaction would be rolled back.