Show transaction data for XA transaction statistics by using REST Monitoring APIs

Purpose

Reports transaction data for XA transactions being coordinated by an external transaction manager.

URI

Use the Eclipse Amlen REST API GET method with the following Eclipse Amlen monitoring URI:

http://<admin-endpoint-IP:Port>/ima/v1/monitor/Transaction

Object configuration data

Provide query parameters requesting the statistics that you want returned in the JSON payload. The following example uses cURL to create transaction-related statistics:
curl -X GET http://127.0.0.1:9089/ima/v1/monitor/Transaction?XID=XID%26StatType=StatType
%26TranState=TranState%26ResultCount=ResultCount
XID
Specifies the XA transaction branch identifier (XID) of the transaction about which to report data.
You can use an asterisk (*) to match 0 or more characters.
The default value is *; data for all transactions matching the other criteria is reported.
TranState
Specifies the state of the transactions about which to report data.
This value can be one of the following values:
  • All
    Data about transactions that are in any of prepared, committed or rolled back states is reported.
    This value is the default value.
  • Heuristic
    Data about transactions that have been committed or rolled back is reported.
  • HeuristicCommit
    Data about transactions that have been committed is reported.
  • HeuristicRollback
    Data about transactions that have been rolled back is reported.
  • Prepared
    Data about transactions that are in prepared state is reported.
ResultCount
Specifies the maximum number of results to report.
This value can be one of the following values: 10, 25, 50, 100.
The default value is 25.
StatType
Specifies the type of data to order the results by.
This value can be one of the following values:
  • LastStateChangeTime
    Orders the data according to the time and date when the state of the transaction most recently changed.
    This value is the default value.

Usage NotesĀ®

  • The command must be capitalized as shown.
  • The command must use the double quotation marks as shown.
  • The following fields are returned:
    • XID
      String
      The XID of the transaction.
    • TranState
      String
      The state of the transaction.
    • LastStateChangeTime
      String
      The time at which the transaction state changed to the value in TranState

Example

The following example uses cURL to show how a GET method is used to create statistics about all transaction branches:

curl -X GET http://127.0.0.1:9089/ima/v1/monitor/Transaction?XID=*%26TranState=All
 
 

The following example shows a successful example response to the GET method that was used to create statistics about transaction branches that have been heuristically rolled back:

{ "Version":"v1", "Transaction": [ { "XID":"57415344:0000014247FEBB3D0997000012008CC78A1A981840C3350B9E23A3C2EFB8E5A6D864A89C0:00000001",
"TranState":"Prepared","LastStateChangeTime":1446728129213566618 }
 ] }