3.5.4.6 Enlistment Prepare Request Completed

This event MUST be signaled by the higher-layer business logic with the following arguments:

  • A CONNTYPE_TXUSER_ENLISTMENT (section 2.2.10.2.2) connection object.

  • An outcome value. This value MUST be one of the following:

    • Prepared

    • Read Only

    • Aborted

When the higher-layer business logic completes a Prepare request, as specified in section 3.5.5.2.2.3, the resource manager MUST perform the following steps:

  • If the request outcome is Prepared:

    • Add the transaction object referenced by the connection object to the Resource Manager.Durable Log.

    • Send a TXUSER_ENLISTMENT_MTAG_PREPAREREQDONE (section 2.2.10.2.2.12) message using the connection:

      • Set the prepareReqDone field to TXUSER_ENLISTMENT_PREPAREREQDONE_OK.

      • Set the guidReason field to the value provided by the higher-layer business logic, as specified in section 2.2.10.2.2.12.

    • Set the connection state to Awaiting Transaction Outcome.

  • Otherwise, if the request outcome is Read Only:

    • Send a TXUSER_ENLISTMENT_MTAG_PREPAREREQDONE message using the connection:

      • Set the prepareReqDone field to TXUSER_ENLISTMENT_PREPAREREQDONE_READONLY.

    • Set the connection state to Ended.

  • Otherwise, if the request outcome is Aborted:

    • Send a TXUSER_ENLISTMENT_MTAG_PREPAREREQDONE message using the connection:

      • Set the prepareReqDone field to TXUSER_ENLISTMENT_PREPAREREQDONE_ABORT.

    • Set the connection state to Ended.