3.6.7.3 Begin Phase One
The Begin Phase One event MUST be signaled with the following arguments:
An Enlistment object
A Boolean value indicating whether or not the transaction manager communicating with a resource manager facetattempts to make an Enlistment single-phase commit request.
If the Begin Phase One event is signaled, the transaction manager MUST perform the following actions:
If the connection state of the enlistment is Active:
If the provided Single Phase Commit flag (defined in section 3.2.1) is true:
Send a TXUSER_ENLISTMENT_MTAG_PREPAREREQ (section 2.2.10.2.2.11) message using the connection of the provided enlistment.
The fSinglePhase field MUST be set to a nonzero value.
Set the grfRM field to the GRFRM field of the transaction object referenced by the Enlistment object.
Set the connection state to Awaiting Single Phase Commit Response.
Otherwise:
Send a TXUSER_ENLISTMENT_MTAG_PREPAREREQ (section 2.2.10.2.2.11) message using the connection of the provided enlistment.
The fSinglePhase field MUST be set to 0.
Set the grfRM field to the GRFRM field of the transaction object referenced by the Enlistment object.
Set the connection state to Awaiting Prepare Response.
Otherwise, ignore the event.