1. Overview of Enterprise Server Administration
Default Settings and Locations
Instructions for Administering Enterprise Server
4. Administering the Virtual Machine for the Java Platform
6. Administering Web Applications
7. Administering the Logging Service
8. Administering the Monitoring Service
9. Administering Life Cycle Modules
10. Extending Enterprise Server
Part II Security Administration
11. Administering System Security
12. Administering User Security
13. Administering Message Security
Part III Resources and Services Administration
14. Administering Database Connectivity
15. Administering EIS Connectivity
16. Administering Internet Connectivity
17. Administering the Object Request Broker (ORB)
18. Administering the JavaMail Service
19. Administering the Java Message Service (JMS)
20. Administering the Java Naming and Directory Interface (JNDI) Service
21. Administering Transactions
To Manually Recover Transactions
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.
For instructions on configuring the transaction service and setting up automatic recovery, see
Chapter 15, Using the Transaction Service, in Sun GlassFish Enterprise Server v3 Application Development Guide.
The following topics are addressed here:
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.
Ensure that the server is running.
Remote subcommands require a running server.
Stop the transaction service by using the freeze-transaction-service(1) subcommand.
This example stops the transaction service.
asadmin> freeze-transaction-service Command freeze-transaction-service executed successfully
You can also view the full syntax and options of the subcommand by typing asadmin help freeze-transaction-service at the command line.
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.
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.
Roll back the transaction by using the rollback-transaction(1) subcommand.
This example rolls back the transaction with transaction ID 0000000000000001_00.
asadmin> rollback-transaction 0000000000000001_00 Command rollback-transaction executed successfully
You can also view the full syntax and options of the subcommand by typing asadmin help rollback-transaction at the command line.
Use the unfreeze-transaction-service subcommand in remote mote to resume all the suspended in-flight transactions. Run this subcommand to restart the transaction service after it has been frozen.
Ensure that the server is running.
Remote subcommands require a running server.
Restart the suspended transaction service by using the unfreeze-transaction-service(1) subcommand.
This example restarts the transaction service after it has been frozen.
asadmin> unfreeze-transaction-service Command unfreeze-transaction-service executed successfully
You can also view the full syntax and options of the subcommand by typing asadmin help unfreeze-transaction-service at the command line.