17.5. Two Phase Commit
The classical two-phase commit approach is the bedrock of JBoss Transaction Service, and more generally of Web Services transactions. Two-phase commit provides coordination of parties that are involved in a transaction. The general flow of a two-phase commit transaction is described in Figure 17.3, “Two-Phase Commit Overview”.
![Two-Phase Commit Overview](https://access.redhat.com/webassets/avalon/d/JBoss_Enterprise_Application_Platform_Common_Criteria_Certification-5-Transactions_Development_Guide-en-US/images/721547b5fb5ee9da94ec3200cb1231fe/fig-two-phase-commit-overview.png)
Figure 17.3. Two-Phase Commit Overview
Note
During two-phase commit transactions, coordinators and resources keep track of activity in non-volatile data stores so that they can recover in the case of a failure.