3.6.5.2.2.1 Receiving a TXUSER_ENLISTMENT_MTAG_ENLIST Message
When the transaction manager receives a TXUSER_ENLISTMENT_MTAG_ENLIST message, the transaction manager MUST perform the following actions:
If the connection state is Idle:
Set the connection state to Processing Enlistment Request.
Find the transaction object in the transaction table of the transaction manager using the guidTx field from the message.
If the transaction is not found:
Send a TXUSER_ENLIST_MTAG_ENLIST_TX_NOT_FOUND message using the connection.
Set the connection state to Ended.
Otherwise:
Find the resource manager object in the transaction manager's Active Resource manager table using the guidRm field from the message.
If the resource manager is not found:
Send a TXUSER_ENLIST_MTAG_ENLIST_TOO_LATE message using the connection.
Set the connection state to Ended.
Otherwise:
Create a new Enlistment object with the following values:
The transaction manager communicating with a resource manager facet
The transaction object
The connection
The Resource Manager.Identifier field of the resource manager object
Signal the Create Subordinate Enlistment event on the Core Transaction Manager Facet with the new enlistment object.
Otherwise, the message MUST be processed as an invalid message as specified in section 3.1.6.