System administrators can view XA transaction branch information by using REST Monitoring APIs.
System administrators can view XA transaction branch information by using a REST Monitoring API, or by using the Amlen WebUI. For more information about using the Amlen WebUI to view XA transaction branch information,
see Viewing XA
transaction information by using the GUI.
XA transaction statistics can be created by using a REST Monitoring API. To create XA
transaction monitoring information, complete the following steps:
-
Use the Eclipse Amlen REST API
GET method with the following Eclipse Amlen monitoring URI:
http://<admin-endpoint-IP:Port>/ima/v1/monitor/<ObjectType>
-
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
Where:
-
- XID
- Optional.
-
Specifies the identifier of the XA transaction branch.
Asterisk (*) matches 0 or more characters.
The default value is *.
-
- StatType
- Optional.
-
Specifies the type of data to order the results by.
This value can be one of the following values:
-
- LastStateChangeTime
- The most recent time that the specified XA transaction branch changed state.
- Unsorted
- The results are not returned in a specific order.
-
- AllUnsorted
- Lists all transactions.
- Any value that is specified for ResultCount is ignored, so setting
StatType to AllUnsorted can result in a large number of
responses being generated.
The default value is LastStateChangeTime.
-
- TranState
- Optional.
-
Specifies the state of the XA transaction branches to be displayed.
This value can be one of the following values:
-
- All
- Data about transaction branches that are in any of prepared, committed or rolled
back states is reported.
- This value is the default value.
-
- Heuristic
- Data about transaction branches that have been heuristically committed or rolled
back is reported.
-
- HeuristicCommit
- Data about transaction branches that have been heuristically committed is
reported.
-
- HeuristicRollback
- Data about transaction branches that have been heuristically rolled back is
reported.
-
- Prepared
- Data about transaction branches that are in prepared state is reported.
-
- ResultCount
- Optional.
-
Specifies the number of results to display.
Options available for selection are 10, 25, 50, and 100.
The default is 25.
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 }
] }