1.3.1.1 Phase Zero
When a Commit request is issued by the root application, the transaction first enters Phase Zero. If there are no Phase Zero participants, the transaction leaves Phase Zero and proceeds to Phase One.
Phase Zero is composed of one or more Phase Zero waves. At the beginning of a Phase Zero wave, all Phase Zero participants are notified that the transaction has entered Phase Zero. While the participants process the Phase Zero notification, they can continue to marshal the transaction to new participants. Consequently, participating transaction managers can still accept new enlistments during Phase Zero.
When a Phase Zero participant completes its Phase Zero processing, it sends a Phase Zero completion notification back to the transaction manager.
If any of the Phase Zero participants fail or issue an Abort request during the Phase Zero wave, the current Phase Zero wave is terminated and the transaction immediately moves to the aborting state, which is discussed in section 1.3.2.1.
Otherwise, after completion notifications are received from all Phase Zero participants:
If no new Phase Zero enlistments were created during the current Phase Zero wave, the transaction proceeds to Phase One.
If one or more new Phase Zero enlistments were created during the current Phase Zero wave, the transaction executes another Phase Zero wave with the new Phase Zero participants.
The following figure shows the overall Phase Zero flow.
Figure 2: Transaction manager Phase Zero flow