3.6.1 Precursory Message Exchange

The following diagram shows precursory message exchange in a distributed transaction with external components.

Precursory message exchange in a distributed transaction with external components

Figure 17: Precursory message exchange in a distributed transaction with external components

The following steps describe this sequence:

  1. Connect(DtcUic) [C1.0]: The management tool initiates a CONNTYPE_TXUSER_DTCUIC connection on an MSDTC Connection Manager: OleTx Management Protocol session with the root transaction manager, as specified in [MS-CMOM] section 3.2.1.1.

  2. Hello [C1.1]: The management tool sends an MTAG_HELLO message to the root transaction manager, as specified in [MS-CMOM] section 3.2.1.1.

  3. Stats [C1.2]: The root transaction manager receives the connection request. It starts a timer (if one does not exist) and adds the management tool to its list of Management Client Role connections. Each time the timer expires, the root transaction manager sends an MSG_DTCUIC_STATS message to the management tool, as specified in [MS-CMOM] section 3.2.1.1. If the root transaction manager is tracking any active transactions, the root transaction manager also sends an MSG_DTCUIC_TRANLIST message, as specified in [MS-CMOM] section 3.2.1.1. In this example, no MSG_DTCUIC_TRANLIST message is sent. The management tool continues to receive these messages from the root transaction manager until it closes the connection by initiating the disconnect sequence [C1.3; C1.4].

  4. Connect (ResMgr) [C2.0]: The resource manager initiates a CONNTYPE_TXUSER_RESOURCEMANAGER connection on a DTCO session, as specified in [MS-DTCO] section 4.4.1, with the root transaction manager.

  5. Create(guidRm) [C2.1]: The resource manager sends a TXUSER_RESOURCEMANAGER_MTAG_CREATE message specifying a GUID that uniquely identifies the resource manager (guidRm) to the root transaction manager, as specified in [MS-DTCO] section 4.4.1.

  6. RequestComplete [C2.2]: The root transaction manager adds the resource manager to its list of registered resource managers and sends a TXUSER_RESOURCEMANAGER_MTAG_REQUEST_COMPLETE message to the resource manager protocol, as specified in [MS-DTCO] section 4.4.1. The resource manager continues to maintain this connection to enable the creation of new enlistments in transactions and its participation in two-phase commit processing.

  7. Connect(LuConfigure) [C3.0]: The external resource manager initiates a CONNTYPE_TXUSER_DTCLUCONFIGURE connection on a DTCLU session with the external transaction manager, as specified in [MS-DTCLU] section 4.1.1.

  8. Add(LuPair) [C3.1]: The external resource manager sends a TXUSER_DTCLURMCONFIGURE_MTAG_ADD message specifying the LU name pair (LuPair) to the external transaction manager, as specified in [MS-DTCLU] section 4.1.1.

  9. RequestComplete [C3.2]: The external transaction manager adds the LU name pair to its table of LU name pairs and sends a TXUSER_DTCLURMCONFIGURE_MTAG_REQUEST_COMPLETED message to the external resource manager, as specified in [MS-DTCLU] section 4.1.1. When the external resource manager receives the TXUSER_DTCLURMCONFIGURE_MTAG_REQUEST_COMPLETED response from the external transaction manager, the external resource manager initiates the disconnect sequence.

  10. Connect(LuRecovery) [C4.0]: The external resource manager initiates a CONNTYPE_TXUSER_DTCLURECOVERY connection on a DTCLU session with the external transaction manager, as specified in [MS-DTCLU] section 4.2.1.

  11. Attach(LuPair) [C4.1]: The external resource manager sends a TXUSER_DTCLURMRECOVERY_MTAG_ATTACH message to the external transaction manager specifying an LuPair which was previously configured with the external transaction manager, as specified in [MS-DTCLU] section 4.2.1.

  12. RequestComplete [C4.2]: The external transaction manager registers the connection's CMPO session, as specified in [MS-CMPO], for all Recovery Processing associated with the LU name pair and sends a TXUSER_DTCLURMRECOVERY_MTAG_REQUEST_COMPLETED message to the external resource manager, as specified in [MS-DTCLU] section 4.2.1. The external resource manager continues to maintain the connection to enable recovery processes to be initiated and to enable the creation of new enlistments in the transactional work associated with the LU name pair.

  13. Connect(LuRecoveryByDtc) [C5.0]: The external resource manager initiates a CONNTYPE_TXUSER_DTCLURECOVERYINITIATEDBYDTC connection a DTCLU session with the external transaction manager, as specified in [MS-DTCLU] section 4.3.1.

  14. GetWork (LuPair) [C5.1]: The external resource manager sends a TXUSER_DTCLURECOVERYINITIATEDBYDTC_MTAG_GETWORK message to the external transaction manager specifying the LuPair for which the external resource manager registered as the recovery process, as specified in [MS-DTCLU] section 4.3.1.

  15. WorkTrans (Cold) [C5.2]: The external transaction manager determines that it has to perform a cold recovery (Cold) for the LU name pair and sends a TXUSER_DTCLURECOVERYINITIATEDBYDTC_MTAG_WORK_TRANS message to the external resource manager, as specified in [MS-DTCLU] section 4.3.1.

  16. TheirXlnResponse (LogName) [C5.3]: The external resource manager exchanges log names with the remote LU and sends a TXUSER_DTCLURECOVERYINITIATEDBYDTC_MTAG_THEIR_XLN_RESPONSE message specifying the remote LU log name (LogName) to the external transaction manager, as specified in [MS-DTCLU] section 4.3.1.

  17. ConfirmationForTheirXln [C5.4]: The external transaction manager verifies that the reported state of the remote LU is consistent with the external transaction manager's state and sends a TXUSER_DTCLURECOVERYINITIATEDBYDTC_MTAG_CONFIRMATION_FOR_THEIR_XLN message to the external resource manager, as specified in [MS-DTCLU] section 4.3.1.

  18. CheckForCompareStates [C5.5]: The external resource manager sends a TXUSER_DTCLURECOVERYINITIATEDBYDTC_MTAG_CHECK_FOR_COMPARESTATES message to the external transaction manager to query whether recovery work is required for any LU 6.2 transactional work involving the LU name pair, as specified in [MS-DTCLU] section 4.3.1.

  19. NoCompareStates [C5.6]: The external transaction manager checks the local and remote transactional state and sends a TXUSER_DTCLURECOVERYINITIATEDBYDTC_MTAG_NO_COMPARESTATES message to the external resource manager, as specified in [MS-DTCLU] section 4.3.1. When the external resource manager has received the TXUSER_DTCLURECOVERYINITIATEDBYDTC_MTAG_NO_COMPARESTATES message, no further messages are sent using this connection and the external resource manager initiates the disconnect sequence.