Sun GlassFish Enterprise Server v3 Administration Guide

ProcedureTo 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.

  1. Ensure that the server is running.

    Remote subcommands require a running server.

  2. 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.

  3. Roll back the transaction by using the rollback-transaction(1) subcommand.

Example 21–2 Rolling Back a Transaction

This example rolls back the transaction with transaction ID 0000000000000001_00.

asadmin> rollback-transaction 0000000000000001_00
Command rollback-transaction executed successfully

See Also

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