3.5 Example 5: Connection to a Resource Manager Breaks Down
This example demonstrates how the resource manager drives recovery when connection to a resource manager breaks, as described in use case Recover In-doubt Transaction State – resource manager (section 2.5.4).
Prerequisites:
The transaction processing services protocols meet all the preconditions, as described in section 2.4.
Transaction processing services are operational.
The application can access a transaction manager in the system.
Transaction work is performed.
Initial System State
A transaction is performed by an application.
Final System State
The transaction is complete after recovering from a resource manager breakdown.
Sequence of Events
The PrepareRequest, PrepareRequestDone, CommitRequest, and CommitRequestDone messages that are exchanged in this example are contained within the two-phase commit notifications action between the system and participating roles.

Figure 16: Example of a resource manager connection breakdown during a two-phase commit
The message flow that is shown in this example is as follows:
The root transaction manager sends a TXUSER_ENLISTMENT_MTAG_PREPAREREQ message to the resource manager over the CONNTYPE_TXUSER_ENLISTMENT connection, as specified in [MS-DTCO] section 4.5.1.1, indicating that this is a two-phase commit.
The root transaction manager sends a PARTNERTM_PROPAGATE_MTAG_PREPAREREQ message to the remote transaction manager over the CONNTYPE_PARTNERTM_BRANCH connection, as specified in [MS-DTCO] section 4.5.1.2, indicating that this is a two-phase commit.
The resource manager sends a TXUSER_ENLISTMENT_MTAG_PREPAREREQDONE message to the root transaction manager, indicating that the prepare request finished successfully (OK) TXUSER_ENLISTMENT_PREPAREREQDONE_OK, as specified in [MS-DTCO] section 4.5.1.1, completing step 1.
The remote transaction manager sends a TXUSER_ENLISTMENT_MTAG_PREPAREREQ message to the remote resource manager over the CONNTYPE_TXUSER_ENLISTMENT connection, as specified in [MS-DTCO] section 4.5.1.1, indicating that this is a two-phase commit.
The remote resource manager sends a TXUSER_ENLISTMENT_MTAG_PREPAREREQDONE message to the remote transaction manager indicating that the prepare request finished successfully (OK) TXUSER_ENLISTMENT_PREPAREREQDONE_OK, as specified in [MS-DTCO] section 4.5.1.1, completing step 4.
The remote transaction manager sends a PARTNERTM_PROPAGATE_MTAG_PREPAREREQDONE to the root transaction manager, indicating that the prepare request finished successfully (OK), as specified in [MS-DTCO] section 4.5.1.2, completing step 2.
The root transaction manager sends a TXUSER_BEGIN2_MTAG_SINK_ERROR message to the application over the CONNTYPE_TXUSER_BEGIN2 connection, as specified in [MS-DTCO] section 4.1.2.1, specifying that the transaction has committed (TRUN_TXBEGIN_ERROR_NOTIFY_COMMITTED), completing step 21 in Example 1, as described in section 3.1.
The root transaction manager sends a TXUSER_ENLISTMENT_MTAG_COMMITREQ message to the resource manager over the CONNTYPE_TXUSER_ENLISTMENT connection, as specified in [MS-DTCO] section 4.4.3.2).
The root transaction manager sends a PARTNERTM_PROPAGATE_MTAG_COMMITREQ message to the remote transaction manager over the CONNTYPE_PARTNERTM_BRANCH connection, as specified in [MS-DTCO] section 4.5.2.2).
The connection from remote transaction manager to the remote resource manager breaks. As a result, the remote transaction manager cannot send a CommitRequest message to the remote resource manager.
The resource manager sends a TXUSER_ENLISTMENT_MTAG_COMMITREQDONE message to the root transaction manager, as specified in [MS-DTCO] section 4.4.3.2, completing step 8.
The remote transaction manager sends a PARTNERTM_PROPAGATE_COMMITREQDONE message to the root transaction manager, as specified in [MS-DTCO] section 4.5.2.2, completing step 9.
The remote resource manager comes back up and finds the transaction in the in-doubt state.
The remote resource manager sends a TXUSER_RESOURCEMANAGER_MTAG_CREATE message to the remote transaction manager over the CONNTYPE_TXUSER_RESOURCEMANAGER connection, as specified in [MS-DTCO] section 3.5.4.10.1) to perform a Register action against the remote transaction manager.
The remote resource manager sends a TXUSER_REENLIST_MTAG_REENLIST message to the remote transaction manager over the CONNTYPE_TXUSER_REENLIST connection, as specified in [MS-DTCO] section 4.6.2) to perform a Query Transaction Outcome action against the remote transaction manager.
The remote transaction manager sends a TXUSER_REENLIST_MTAG_REENLIST_COMMITTED message to the remote resource manager, as specified in [MS-DTCO] section 4.6.2) to indicate the outcome of the transaction is committed.
The remote resource manager sends a TXUSER_RESOURCEMANAGER_MTAG_REENLISTMENTCOMPLETE message to the remote transaction manager over the CONNTYPE_TXUSER_RESOURCEMANAGER connection, as specified in [MS-DTCO] section 4.6.3, to indicate that it has recovered its transactions.
The remote transaction manager sends a TXUSER_RESOURCEMANAGER_MTAG_REQUEST_COMPLETE message to the remote resource manager, as specified in [MS-DTCO] section 4.6.3, to confirm the completion of recovery.