1. Overview of GlassFish Server Administration
Default Settings and Locations
Instructions for Administering GlassFish 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. Writing and Running JavaScript Clients to Monitor GlassFish Server
10. Administering Life Cycle Modules
11. Extending and Updating GlassFish Server
Part II Resources and Services Administration
12. Administering Database Connectivity
13. Administering EIS Connectivity
14. Administering Internet Connectivity
15. Administering the Object Request Broker (ORB)
16. Administering the JavaMail Service
17. Administering the Java Message Service (JMS)
18. Administering the Java Naming and Directory Interface (JNDI) Service
19. Administering Transactions
Managing the Transaction Service for Rollbacks
To Stop the Transaction Service
To Restart the Transaction Service
Determining Local Transaction Completion at Shutdown
Automatic Transaction Recovery
To Manually Recover Transactions
Distributed Transaction Recovery
Recovery Workarounds and Limitations
Oracle Setup for Transaction Recovery
Delegated Recovery After Server Crash Doesn't Work on MySQL
Call to XATeminator.recover() During ResourceAdapter.start() Hangs If Automatic Recovery Is Enabled
To Store Transaction Logs in a Database
You can configure the transaction service in the GlassFish Server in the following ways:
To configure the transaction service using the Administration Console, open the Transaction Service component under the relevant configuration. For details, click the Help button in the Administration Console.
To configure the transaction service, use the set(1) subcommand to set the following attributes.
The following examples show the server-config configuration, but values for any configuration can be set. For example, if you create a cluster named cluster1 and a configuration named cluster1-config is automatically created for it, you can use cluster1-config in the set subcommand to get the transaction service settings for that cluster.
server-config.transaction-service.automatic-recovery = false server-config.transaction-service.heuristic-decision = rollback server-config.transaction-service.keypoint-interval = 2048 server-config.transaction-service.retry-timeout-in-seconds = 600 server-config.transaction-service.timeout-in-seconds = 0 server-config.transaction-service.tx-log-dir = domain-dir/logs
You can also set these properties:
server-config.transaction-service.property.oracle-xa-recovery-workaround = true server-config.transaction-service.property.sybase-xa-recovery-workaround = false server-config.transaction-service.property.disable-distributed-transaction-logging = false server-config.transaction-service.property.xaresource-txn-timeout = 0 server-config.transaction-service.property.pending-txn-cleanup-interval = -1 server-config.transaction-service.property.use-last-agent-optimization = true server-config.transaction-service.property.delegated-recovery = false server-config.transaction-service.property.wait-time-before-recovery-insec = 60 server-config.transaction-service.property.purge-cancelled-transactions-after = 0 server-config.transaction-service.property.commit-one-phase-during-recovery = false server-config.transaction-service.property.add-wait-point-during-recovery = 0 server-config.transaction-service.property.db-logging-resource = jdbc/TxnDS server-config.transaction-service.property.xa-servername = myserver
Default property values are shown where they exist. For db-logging-resource and xa-servername, typical values are shown. Values that are not self-explanatory are as follows:
The xaresource-txn-timeout default of 0 means there is no timeout. The units are seconds.
The pending-txn-cleanup-interval default of -1 means the periodic recovery thread doesn't run. The units are seconds.
The purge-cancelled-transactions-after default of 0 means cancelled transactions are not purged. The units are the number of cancellations in between purging attempts.
The add-wait-point-during-recovery property does not have a default value. If this property is unset, recovery does not wait. The units are seconds.
The db-logging-resource property does not have a default value. It is unset by default. However, if you set db-logging-resource to an empty value, the value used is jdbc/TxnDS.
The xa-servername property does not have a default value. Use this property to override server names that can cause errors.
You can use the get(1) subcommand to list all the transaction service attributes and the properties that have been set. For details, see the Oracle GlassFish Server 3.1-3.1.1 Reference Manual.
Changing keypoint-interval, retry-timeout-in-seconds, or timeout-in-seconds does not require a server restart. Changing other attributes or properties requires a server restart.
You can also set the following system properties:
ALLOW_MULTIPLE_ENLISTS_DELISTS=false JTA_RESOURCE_TABLE_MAX_ENTRIES=8192 JTA_RESOURCE_TABLE_DEFAULT_LOAD_FACTOR=0.75f
The JTA_RESOURCE_TABLE_DEFAULT_LOAD_FACTOR default is the default Map resizing value.