3.2.5.3.2 Receiving an XAUSER_XACT_MTAG_PREPARE Message

When the XA Subordinate Transaction Manager Facet receives an XAUSER_XACT_MTAG_PREPARE message, it MUST perform the following actions:

  • If the connection state is set to Active and the State field of the XA Superior Enlistment Object referenced by the XA Superior Enlistment CMP Connection is set to Active:

    • Set Current Request CMP Connection field of XA Superior Enlistment Object referenced by the XA Superior Enlistment CMP Connection to receiving connection.

    • If the Single Phase field of the message is set to 0x00000001:

      • Set the State field of the XA Superior Enlistment Object referenced by the XA Superior Enlistment CMP Connection to Preparing Single Phase.

    • Otherwise:

      • Set the State field of the XA Superior Enlistment Object referenced by the XA Superior Enlistment CMP Connection to Preparing.

    • Signal the Begin Phase Zero event ([MS-DTCO] section 3.2.7.5) on the Core Transaction Manager Facet with the following argument:

      • The Transaction Object referenced by the XA Superior Enlistment Object referenced by the XA Superior Enlistment CMP Connection.

  • Otherwise if the connection state is set to Active and the State field of the XA Superior Enlistment Object referenced by the XA Superior Enlistment CMP Connection is set to Aborted:

    • Send an XAUSER_XACT_MTAG_PREPARE_ABORT message using the connection.

    • Remove XA Superior Enlistment Object referenced by the XA Superior Enlistment CMP Connection from the XA Superior Enlistment Table referenced by the XA Superior Object indexed in the XA Superior Table by Resource Manager Recovery GUID field of the XA Superior Enlistment Object.

    • Set the connection state to Ended.

  • Otherwise: