3.3.5.3.7 Connection Disconnected
When a CONNTYPE_XAUSER_XACT_OPEN connection (section 2.2.4.5) is disconnected, the XA Superior Transaction Manager MUST perform the following actions:
If the State field of the receiving connection is set to Awaiting Open Response:
Disconnect the receiving Connection.
Return XA_RBCOMMFAIL from the originating XA call.
If the State field of the receiving connection is set to Awaiting Prepare Response:
Set the State field of the XA Transaction Object to Complete.
Disconnect the receiving Connection.
Remove the XA Transaction Object from the XA Transaction Table referenced by the Parent XA Superior Proxy object referenced by the XA Transaction Object.
Return XA_RBCOMMFAIL from xa_prepare call.
If the State field of the receiving connection is set to Awaiting Commit Response:
Set the State field of the XA Transaction Object to Complete.
Disconnect the receiving Connection.
Remove the XA Transaction Object from the XA Transaction Table referenced by the Parent XA Superior Proxy object referenced by the XA Transaction Object.
SHOULD return XAER_RMFAIL from xa_commit call.<36>
If the State field of the receiving connection is set to Awaiting Abort Response:
Set the State field of the XA Transaction Object to Complete.
Disconnect receiving Connection.
Remove the XA Transaction Object from the XA Transaction Table referenced by the Parent XA Superior Proxy object referenced by the XA Transaction Object.
SHOULD return XAER_RMFAIL from xa_rollback call.<37>