1. Transaction Commands
The following is a list of transaction commands.
Command | Description |
---|---|
Changes the configuration of the transaction manager of a server. |
|
Recovers the resource manager of a server. Resources can be selectively recovered. |
|
Checks the configuration of the transaction manager of a server. |
|
Checks the transaction by its status on a server. |
1.1. modify-transaction-manager
Changes the configuration of the transaction manager of a server.
-
Alias
modify-tm, modifytm, tmconfig, tmconf
-
Usage
modify-transaction-manager <server-name> [-at,--activeTimeout <active-timeout>] [-pt,--prepareTimeout <prepare-timeout>] [-pdt,--preparedTimeout <prepared-timeout>] [-ct,--commitTimeout <commit-timeout>] [-rt,--recoveryTimeout <recovery-timeout>] [-it,--incompleteTimeout <incomplete-timeout>] [-d,--txLogDir <transaction-log-directory>] [-a,--automaticRecovery <automatic-recovery-enable/disable>] [-f,--forceLock] [-detail]
-
Parameters
Parameter Description <server-name>
Name of the server for which the transaction configuration is changed.
[-at,--activeTimeout <active-timeout>]
Period in which to commit when starting a transaction. If timeout occurs, the transaction is forcibly rolled back.
[-pt,--prepareTimeout <prepare-timeout>]
Period in which the root coordinator receives a response from a sub-coordinator after sending the prepare command.
[-pdt,--preparedTimeout <prepared-timeout>]
Period in which the sub-coordinator waits for global decisions from the root coordinator after sending the prepare response.
[-ct,--commitTimeout <commit-timeout>]
Period in which the root coordinator receives a response after sending the commit command to a sub-coordinator.
[-rt,--recoveryTimeout <recovery-timeout>]
Period in which to receive the recovery information. If timeout occurs, the recovery is delegated to the user.
[-it,--incompleteTimeout <incomplete-timeout>]
Period in which incomplete transactions recover. If timeout occurs, incomplete transactions are deleted.
[-d,--txLogDir <transaction-log-directory>]
Directory that stores transactions for recovery. For more information, refer to Recovery Related Log File in JEUS Server Guide.
[-a,--automaticRecovery <automatic-recovery-enable/disable>]
[Dynamic] Option to let another server recover incomplete transactions when an error occurs in the server. For more information, refer to Transaction Recovery in JEUS Server Guide.
[-f,--forceLock]
Forcibly applies the configuration changes.
[-detail]
Displays detailed results of the configuration changes.
-
Example
-
Check the current configuration.
[MASTER]domain1.adminServer>modify-transaction-manager server1 Shows the current configuration. transaction of server (server1) ================================================================================ +---------------------+--------------------------------------------------------+ | Active Timeout | 600000 | | Prepare Timeout | 120000 | | Prepared Timeout | 60000 | | Commit Timeout | 240000 | | Recovery Timeout | 120000 | | Incomplete Timeout | 86400000 | | Tx Log Dir | ${SERVER_HOME}/.workspace/tmlog | | Automatic Recovery | false | +---------------------+--------------------------------------------------------+ ================================================================================
-
Dynamically turn on the transaction auto-recovery function.
[MASTER]domain1.adminServer>modify-transaction-manager server1 -automaticRecovery true Successfully performed the MODIFY operation for transaction of server (server1). Check the results using "show-transaction-manager server1 or modify-transaction-manager sever1"
-
Change the timeout configuration that applies when the server reboots.
[MASTER]domain1.adminServer>modify-transaction-manager server1 -activeTimeout 20000 Successfully performed the MODIFY operation for transaction of server (server1), but all changes were non-dynamic. They will be applied after restarting. Check the results using "show-transaction-manager server1 or modify-transaction-manager server1"
-
Change the configuration that allows dynamic changes and the configuration that applies when the server reboots.
[MASTER]domain1.adminServer>modify-transaction-manager server1 -automaticRecovery true -activeTimeout 20000 Successfully performed the MODIFY operation for transaction of server (server1), but some changes were non-dynamic. They will be applied after restarting. Check the results using "show-transaction-manager server1 or modify-transaction-manager server1"
-
1.2. recover-transactions
Recovers the resource manager of a server. Resources can be selectively recovered.
-
Alias
recovertx, tmresync
-
Usage
recover-transactions -server <server-name> <resource-type> <export-name> [<connector-module-name>]
-
Parameters
Parameter Description -server <server-name>
Server name.
<resource-type>
Resource type to be recovered.
-
sql : JDBC XADataSource
-
jms : JMS Connection Factory
-
connector: Connector Resource Adapter
<export-name>
export-name of the resource.
[<connector-module-name>]
If the resource is a connector, sets the name of the connector module.
-
-
Example
[MASTER]domain1.adminServer>recover-transactions -server server1 sql jdbc/derby/XADataSource The recover-transactions command was executed on the server1 server.
1.3. show-transaction-manager
Checks the configuration of the transaction manager of a server.
-
Alias
show-tm, showtm
-
Usage
show-transaction-manager <server-name>
-
Parameters
Parameter Description [<server-name>]
Server name.
-
Example
[MASTER]domain1.adminServer>show-transaction-manager server1 Shows the current configuration. transaction of server (server1) ================================================================================ +---------------------+--------------------------------------------------------+ | Active Timeout | 600000 | | Prepare Timeout | 120000 | | Prepared Timeout | 60000 | | Commit Timeout | 240000 | | Recovery Timeout | 120000 | | Incomplete Timeout | 86400000 | | Tx Log Dir | ${SERVER_HOME}/.workspace/tmlog | | Automatic Recovery | false | +---------------------+--------------------------------------------------------+ ================================================================================
1.4. transaction-info
Checks the transaction by its status on a server.
-
Alias
transactioninfo, txinfo
-
Usage
transaction-info -server <server-name> [-i,--inflight] [-d,--indoubt] [-r,--retrying]
-
Parameters
Parameter Description -server <server-name>
Server name.
[-i,--inflight]
Checks the running transactions, transactions in the memory that have not reached the commit or rollback step.
[-d,--indoubt]
Checks the incomplete transactions, transactions that require recovery or that have undetermined status.
[-r,--retrying]
Checks the transactions to be retried within JEUS because one-phase-commit or two-phase-commit was not successfully performed due to problems with the resource manager.
-
Example
[MASTER]domain1.adminServer>transaction-info -server server1 <transactions of server1> In-Flight Transaction Information ================================================================================ +------------------+---------+-------+--------+---------+---------+------------+ | XID | Coordina| Extern| Status | Timeout | Elapse | XAResources| | | tor |al XID | | | | | +------------------+---------+-------+--------+---------+---------+------------+ | 049FE5.00C0A80011| 192.168.| | STATUS | 5000(ms)| 7418(ms)| jdbc/derby/| |2608221CC3D6B40000|0.17:9736| |_MARKED_| | |XADataSource| |000000000011.00 | | |ROLLBACK| | | | +------------------+---------+-------+--------+---------+---------+------------+ ================================================================================ In-doubt Transaction Information ========================================================================== +----+----------------+--------------------+-------+------------+--------+ | XID| Coordinator | External XID | Status| Decision | Sub-XID| +----+----------------+--------------------+-------+------------+--------+ (No data available) ========================================================================== Retrying Transaction Information ============================================================= +----+-----+------------------------------+-------+---------+ | XID| Name| Failuere Count | Status| Decision| +----+-----+------------------------------+-------+---------+ (No data available) =============================================================