3.3.5.1.1 Receiving a TXUSER_DTCLURMCONFIGURE_MTAG_ADD Message
When the Transaction Manager Communicating with an LU 6.2 Implementation Facet receives a TXUSER_DTCLURMCONFIGURE_MTAG_ADD (section 2.2.3.1.1) message, it MUST perform the following actions:
If the connection state is Idle:
Set the connection state to Processing Add 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 found:
Send the TXUSER_DTCLURMCONFIGURE_MTAG_ADD_DUPLICATE (section 2.2.3.1.4) message using the connection.
Otherwise:
Create an LU Pair object that is initialized as follows:
Set the LU Name Pair field to the first cbLength bytes of the rgbBlob field of the DTCLU_VARLEN_BYTEARRAY structure (contained in the LuNamePair field) of the message.
Set the Local Log Name field to an implementation-specific value.
Set the Resource Manager Identifier field to a new GUID value.
Set the Recovery Sequence Number field to 1.
Set the Is Warm flag to FALSE.
Set the LU Pair Recovery State field to Recovery Process Not Attached.
Set the Is LUW Triggered Recovery Pending flag to FALSE.
Attempt to add the new LU Pair object to the log and the LU Pair Table keyed by the first cbLength bytes of the rgbBlob field of the DTCLU_VARLEN_BYTEARRAY structure (contained in the LuNamePair field) of the message.
If LU Pair is added successfully:
Send the TXUSER_DTCLURMCONFIGURE_MTAG_REQUEST_COMPLETED (section 2.2.3.1.3) message using the connection.
Otherwise:
Send the TXUSER_DTCLURMCONFIGURE_MTAG_ADD_LOG_FULL 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.