3.4.7.3 Begin Rollback
The Begin Rollback event MUST be signaled with the following arguments:
An XA Subordinate Enlistment object.
If the Begin Rollback event is signaled, the XA Resource Manager Bridge Facet MUST perform the following actions:
If the State field of the provided XA Subordinate Enlistment object is set to Enlisted or Prepared:
Call xa_rollback on the XA Switch of the XA Resource Manager object referenced by the provided XA Subordinate Enlistment object with the following arguments:
The XID field of the provided XA Subordinate Enlistment object.
The XA Resource Manager Identifier field of the XA Resource Manager object referenced by the provided XA Subordinate Enlistment object.
TMNOFLAGS.
If the Output is set to either XAER_RMFAIL, XA_RETRY, XAER_RMERR, XAER_NOTA, XAER_INVAL, or XAER_PROTO:
Set the State field of the XA Subordinate Enlistment object to Ended.
Remove the provided XA Subordinate Enlistment object from the XA Subordinate Enlistment Table referenced by the XA Resource Manager object referenced by provided XA Subordinate Enlistment object.
Signal the Recover XA Resource Manager event on XA Resource Manager Bridge Facet with the following argument:
The XA Resource Manager object referenced by the provided XA Subordinate Enlistment object.
Otherwise:
Set the State field of the XA Subordinate Enlistment object to Ended.
Remove the provided XA Subordinate Enlistment object from the XA Subordinate Enlistment Table referenced by the XA Resource Manager referenced by the provided XA Subordinate Enlistment.
Signal the Enlistment Rollback Complete event on the Core Transaction Manager Facet with the following argument:
The Provided XA Subordinate Enlistment object.
If the XA Subordinate Enlistment Table referenced by the XA Resource Manager referenced by the provided XA Subordinate Enlistment object is empty and State of XA Resource Manager referenced by the provided XA Subordinate Enlistment object is set to Ended:
Remove the XA Resource Manager referenced by the provided XA Subordinate Enlistment object from the XA Resource Manager Durable Log.
Remove the XA Resource Manager referenced by the provided XA Subordinate Enlistment object from the XA Resource Manager Table.