3.3.5.2.1 Receiving a TXUSER_DTCLURMRECOVERY_MTAG_ATTACH Message
A Transaction Manager Communicating with an LU 6.2 Implementation Facet MUST perform the following actions to attempt to register the connection's MSDTC Connection Manager: OleTx Transports Protocol (as specified in [MS-CMPO]) session for all recovery processing associated with the LU Name Pair when it receives a TXUSER_DTCLURMRECOVERY_MTAG_ATTACH (section 2.2.3.2.1) message:
If the connection state is Idle:
Set the connection state to Processing Register Request.
Attempt to find the LU Pair object keyed by the first cbLength bytes of the rgbBlob field of the DTCLU_VARLEN_BYTEARRAY structure (contained in the LuNamePair field) of the message in the LU Pair Table.
If the LU Pair object is not found:
Send the TXUSER_DTCLURMRECOVERY_MTAG_ATTACH_NOT_FOUND (section 2.2.3.2.4) message using the connection.
Set the connection state to Ended (section 3.3.1.3.4).
Otherwise:
If the LU Pair Recovery State field of the found LU Pair object is set to Recovery Process Not Attached:
Set the LU Pair Recovery State field of the found LU Pair object to Not Synchronized.
Send the TXUSER_DTCLURMRECOVERY_MTAG_REQUEST_COMPLETED (section 2.2.3.2.2) message using the connection.
Set the connection state to Registered.
Otherwise:
Send the TXUSER_DTCLURMRECOVERY_MTAG_ATTACH_DUPLICATE (section 2.2.3.2.3) message using the connection.
Set the connection state to Ended.
Otherwise, if the connection state is Ended:
Ignore the message.
Otherwise, the message MUST be processed as an invalid message, as specified in [MS-DTCO], section 3.1.6.