3.3.5.6.1 Receiving an XAUSER_XACT_MTAG_OPENED Message

When the XA Superior Transaction Manager receives an XAUSER_XACT_MTAG_OPENED message, it MUST perform the following actions:

  • If the State field of the receiving XA Transaction CMP Connection object is set to Awaiting Open Response:

    • Set Transaction Identifier of XA Transaction Object referenced by receiving connection to the guidTx field of the message.

    • Set the State of the receiving Connection to Processing Opened Response.

    • Set the State field of the XA Transaction Object referenced by receiving connection to Active.

    • If the Action field of the receiving Connection is set to Prepare:

      • Set the State field of the receiving connection to Awaiting Prepare Response.

      • Set the State field of the XA Transaction Object referenced by receiving connection to Preparing.

      • Send an XAUSER_XACT_MTAG_PREPARE message with the following values:

        • The fSinglePhase field is set to 0x00000000.

    • Otherwise, if the Action field of the receiving Connection is set to Prepare Single Phase:

      • Set the State of the receiving connection to Awaiting Prepare Response.

      • Set the State field of the XA Transaction Object referenced by receiving connection to Preparing.

      • Send an XAUSER_XACT_MTAG_PREPARE message with the following values:

        • The fSinglePhase field is set to 0x00000001.

    • Otherwise, if the Action field of the receiving Connection is set to Commit:

      • Set the State of the receiving connection to Awaiting Commit Response.

      • Set the State field of the XA Transaction Object referenced by receiving connection to Committing.

      • Send an XAUSER_XACT_MTAG_COMMIT message.

    • Otherwise, if the Action field of the receiving Connection is set to Rollback:

      • Set the State of the receiving connection to Awaiting Abort Response.

      • Set State of XA Transaction Object referenced by the receiving Connection to Aborting.

      • Send an XAUSER_XACT_MTAG_ABORT message.

  • Otherwise:

    • Signal the Disconnect Connection event using the receiving Connection as the argument.