Managing the Transaction Service

You can roll back a single transaction by using the asadmin subcommands
described in this section. To do so, the transaction service must be stopped
(and later restarted), allowing you to see the active transactions and correctly
identify the one that needs to be rolled back.

To Stop the Transaction Service

Use the freeze-transaction-service subcommand in
remote mode to stop the transaction service. When the transaction service
is stopped, all in-flight transactions are immediately suspended. You must stop the transaction
service before rolling back any in-flight transactions.

Running this subcommand on a stopped transaction subsystem has no effect.
The transaction service remains suspended until you restart it by using the unfreeze-transaction-service subcommand.

Example 21–1 Stopping the Transaction Service

See Also

You can also view the full syntax and options of the subcommand by typing asadmin help freeze-transaction-service at the command line.

To Roll Back a Transaction

In some situations, you might want to roll back a particular transaction.
Before you can roll back a transaction, you must first stop the transaction
service so that transaction operations are suspended. Use the rollback-transaction subcommand in remote mode to roll back a specific transaction.

Before You Begin

Stop the transaction service before rolling back an in-flight transaction.

Ensure that the server is running.

Remote subcommands
require a running server.

Identify the ID of the transaction you want to roll back.

To see a list of IDs of active transactions, use the get subcommand
to get the monitoring data for the activeids statistic.
See Transaction Service Statistics.