3.2.5.7.1 Receiving an XAUSER_XACT_MTAG_SUSPEND_WITH_MIGRATE Message
When the XA Subordinate Transaction Manager Facet receives an XAUSER_XACT_MTAG_SUSPEND_WITH_MIGRATE message, it MUST perform the following actions:
If the connection state is Idle:
Set the connection state to Processing Migrate2 Request.
Attempt to find an XA Superior Object in the XA Superior Table keyed by the guidXaRm field of the message.
If an Object is not found:
Send an XAUSER_XACT_MTAG_OPEN_NOT_FOUND message using the connection.
Otherwise:
Attempt to find an XA Superior Enlistment Object in the XA Superior Enlistment Table referenced by the XA Superior Object that meets one of the following conditions:
If an Object is not found:
Send an XAUSER_XACT_MTAG_OPEN_NOT_FOUND message using the connection.
Otherwise:
If first condition was satisfied:
If the State field of the XA Superior Enlistment Object is set to Active:
Set the State field of the XA Superior Enlistment Object to Migrate.
Send an XAUSER_XACT_MTAG_SUSPEND_WITH_MIGRATE_DONE message.
Otherwise:
Send an XAUSER_XACT_MTAG_OPEN_NOT_FOUND message.
Otherwise if second condition was satisfied:
If the State field of the XA Superior Child Branch Enlistment is set to Active:
Set the State field of the XA Superior Child Branch Enlistment to Migrate.
Send an XAUSER_XACT_MTAG_SUSPEND_WITH_MIGRATE_DONE message.
Otherwise:
Send an XAUSER_XACT_MTAG_OPEN_NOT_FOUND message.
Set the connection state to Ended.
Otherwise, the message MUST be processed as an invalid message as specified in section 3.1.6.