3.6.5.3.1.1 Receiving a TXUSER_REENLIST_MTAG_REENLIST Message

When the transaction manager communicating with a resource manager facet receives a TXUSER_REENLIST_MTAG_REENLIST message, the transaction manager communicating with a resource manager facet MUST perform the following actions:

  • If the connection state is Idle:

    • Set the connection state to Processing Reenlist Request.

    • Look up a resource manager object in the Active Resource manager table, using the guidRm field from the message as the key.

    • If the resource manager does not exist:

    • Otherwise:

      • Look up a transaction object in the transaction table using the guidTx field from the message as the key.

      • If the transaction is not found:

        • Send a TXUSER_REENLIST_MTAG_REENLIST_ABORTED message using the connection.

        • Set the connection state to Ended.

      • Find an Enlistment object in the transaction object's Phase Two Enlistment list whose Resource Manager field matches the resource manager object.

      • If no Enlistment object is found:

        • Send a TXUSER_REENLIST_MTAG_REENLIST_ABORTED message using the connection.

        • Set the connection state to Ended.

      • Otherwise:

        • Initialize the Reenlist Time-out timer providing the following arguments:

          • If the value of the ulTimeout field from the message is less than zero:

            • Use a value of zero.

          • Otherwise:

            • Use the ulTimeout field from the message.

          • The Enlistment object that is found in the Phase Two enlistment list.

        • Assign the Enlistment object to the enlistment field of the connection.

        • Assign the connection object to the Enlistment Object.Connection field of the enlistment.

        • Signal the Request Transaction Outcome event on the Core Transaction Manager Facet with the new Enlistment object.

  • Otherwise, the message MUST be processed as an invalid message as specified in section 3.1.6.