Roll Back an XA Transaction

delete

/admin/v1/xa-transaction/{id}

In case any pending transactions which are not commited or rolled back by participant services due to unexpected reasons, use this request to force roll back the transaction for a specific transaction ID. Transaction Manager for Microservices synchronously sends the roll back call to all the the participants involved in the given transaction ID. You can roll back a transaction only if the transaction status is `Created`, `Preparing`, or `Rollingback`.

Request

Supported Media Types
Path Parameters
  • Global transaction ID (GTRID) of the XA transaction. This is a unique ID which you can use to track the transaction.
Back to Top

Response

Supported Media Types

200 Response

OK
Body ()
Root Schema : xa-resp
Type: object
Show Source
Nested Schema : branches
Type: array
Show Source
Nested Schema : items
Type: object
Show Source
  • Allowed Values: [ "XA_RBROLLBACK", "XA_RBCOMMFAIL", "XA_RBDEADLOCK", "XA_RBINTEGRITY", "XA_RBOTHER", "XA_RBPROTO", "XA_RBTIMEOUT", "XA_RBTRANSIENT", "XA_NOMIGRATE", "XA_HEURHAZ", "XA_HEURCOM", "XA_HEURRB", "XA_HEURMIX", "XA_RETRY", "XA_RDONLY", "XA_OK", "XAER_ASYNC", "XAER_RMERR", "XAER_NOTA", "XAER_INVAL", "XAER_PROTO", "XAER_RMFAIL" ]
  • Allowed Values: [ "Enlisted", "Prepared", "Committed", "Rolledback", "HeuristicallyCompleted", "HeuristicallyRolledback" ]

400 Response

Invalid Arguments

401 Response

Unauthorized

404 Response

Not Found

412 Response

Precondition Failed
Back to Top

Examples

cURL Command

The following example shows how to roll back an XA transaction by submitting a DELETE request on the REST resource using cURL. For more information about cURL, see Use cURL.

Enter the command on a single line. Line breaks are used in this example for readability.

curl -X PUT 
     -H "Authorization:Bearer $OTMM_COOKIE"
     https://192.0.2.1:8080/admin/v1/xa-transaction/e6808684-5d8c-4ad0-90d2-345a225d0f02
  • OTMM_COOKIE is the name of the variable in which you stored the authentication cookie earlier. For information about retrieving the authentication cookie and storing it in a variable, see Authenticate.

  • 192.0.2.1:8080 is an example REST endpoint URL. Change this value to the REST endpoint URL to access the Istio ingress gateway in your environment. For information about finding out REST endpoint URL for your site, see Send Requests.

  • e6808684-5d8c-4ad0-90d2-345a225d0f02 is an example value for the global transaction ID (GTRID). Replace this value with the GTRID of an XA transaction in your environment.

No response is returned for this request.

Back to Top