3.2.5.3.1 Receiving an XAUSER_XACT_MTAG_OPEN Message
When the XA Subordinate Transaction Manager Facet receives an XAUSER_XACT_MTAG_OPEN message, it MUST perform the following actions:
If the connection state is Idle:
Set the connection state to Processing Open Request.
Attempt to find an XA Superior Object in the XA Superior Table keyed by the guidXaRm field of the message.
If not found:
Send an XAUSER_XACT_MTAG_OPEN_NOT_FOUND message using the connection.
Set the connection state to Ended.
Otherwise:
Attempt to find XA Superior Enlistment Object in XA Superior Enlistment Table referenced by the XA Superior Object that meet both of the following criteria:
The XID field is set to the XAIdentifier field of the XA_UOW structure in the XAUOW field of the message.
Coupling set to Loose.
If not found:
Send an XAUSER_XACT_MTAG_OPEN_NOT_FOUND message using the connection.
Set the connection state to Ended.
Otherwise:
Set the State field of receiving connection to Active.
Set the State field of the XA Superior Enlistment Object to Active.
Set the XA Superior Enlistment Object referenced by the receiving XA Superior Enlistment CMP Connection Object to the located XA Superior Enlistment Object.
Send an XAUSER_XACT_MTAG_OPENED message with the following arguments:
Transaction Identifier of the Transaction Object referenced by the located XA Superior Enlistment Object.
Otherwise, the message MUST be processed as an invalid message as specified in section 3.1.6.