Rolling back an XA transaction branch by using REST Administration APIs

System administrators can heuristically roll back an XA transaction branch that is in prepared state by using REST Administration APIs.

You can heuristically roll back an XA transaction branch by using a REST Administration API, or by using the Amlen WebUI. For more information about using the Amlen WebUI to roll back an XA transaction branch, see Changing the state of an XA transaction branch by using the Amlen WebUI.

Change the state of an XA transaction branch only when you are certain that the transaction cannot be resolved by the normal protocols. Changing the state independently of the transaction manager might result in the loss of transactional integrity between Eclipse Amlen and other resource managers involved in the XA transaction.

  1. To heuristically rollback an XA transaction branch that is in prepared state, use the Eclipse Amlen REST API SERVICE method with the following Eclipse Amlen configuration URI:

    http:<admin-endpoint-IP:Port>:port/ima/v1/service/rollback/transaction

  2. Provide object configuration data in the payload of the method by using the following schema. Content-type is set to application/json. Ensure that capitalization and double quotation marks are used as shown.
    
    {                       
     "XID": "string"  
    }
    
    where
    XID
    Specifies the XA transaction branch identifier (XID) of the transaction branch to forget. The XID includes the format identifier, the branch qualifier and the global transaction identifier of the XA transaction.
The following example uses cURL to rollback an XA transaction branch with the XID of 57415344:0000014247FEBB3D000000012008CC78A1A981840C3350B9E2:00000001.

curl -X POST \
   -H  'Content-Type: application/json'  \
   -d  '{                       
           "XID": "57415344:0000014247FEBB3D000000012008CC78A1A981840C3350B9E2:00000001"
        }
  '   \
http://127.0.0.1:9089/ima/v1/service/commit/transaction

The following example shows an example response to the method:


{        
  "Version": "v1",
  "Code": "CWLNA6011",
  "Message": "The requested configuration change has completed successfully."
}