Techopedia Explains Transaction ManagerWhen instructed to commit a transaction, transaction managers kick off the two-phase commit protocol. In the first phase, they ask all enlisted resource managers to prepare. In the second phase, the transaction managers notify the resource managers if the transaction is aborted or committed.
A transaction manager maintains a log in storage. This log is usually a sequential file, which is used to record the transaction events. Transaction managers use this log for recording transaction starts, commit decisions, enlistments, etc. At the time of normal processing, transaction managers simply write to the log, but if they fail, they read the log as soon as it restarts to restore the latest state.
Transaction managers often have the following responsibilities:
- Demarcation: Starting and finishing transactions by means of begin, commit and rollback methods.
- Controlling the Transaction Context: Transaction contexts contain all the information that helps a transaction manager to monitor a transaction. Transaction managers are in charge of building transaction contexts and connecting them to the existing thread.
- Coordinating the Transaction: Transaction managers generally have the ability to harmonize a transaction over various resources. This feature demands the two-phase commit protocol. XA protocol is also used to register and manage the resources.
- Recovery From Failure: Transaction managers are accountable to guarantee that the resources are not kept in an inconsistent state in case of a system or application failure.
- Money Laundering, the Internet Way
- 8 Ways to Become an IT Leader
- Job Role: IoT Product Manager
- Write For Techopedia: A New Challenge is Waiting For You
- Tech Career Pivot: Where the Jobs Are (and Aren’t)
- Why You Should Ditch Your Project Management Tool for a Work OS