Spring / Spring Data Access
What is 2 phase commit?
Two phase commit is used in distributed environment where multiple transaction take part in distributed transaction process.
In two phase commit, commit or rollback is performed in 2 phases:
Commit request phase: In this phase main process or coordinator process send precommit request to all other process that it has completed its process successfully and ready to commit if all the votes are 'yes' then they go ahead for next phase. And if 'No' then rollback is performed.
Commit phase: Based on the acknowledgement vote if all the votes are yes then commit is done otherwise rollbacked.
More Related questions...