Server User Manual
Table Of Contents
- Sun GlassFish Enterprise Server 2.1 Performance Tuning Guide
- Preface
- Overview of Enterprise Server Performance Tuning
- Tuning Your Application
- Java Programming Guidelines
- Java Server Page and Servlet Tuning
- EJB Performance Tuning
- Goals
- Monitoring EJB Components
- General Guidelines
- Using Local and Remote Interfaces
- Improving Performance of EJB Transactions
- Use Container-Managed Transactions
- Don’t Encompass User Input Time
- Identify Non-Transactional Methods
- Use TX_REQUIRED for Long Transaction Chains
- Use Lowest Cost Database Locking
- Use XA-Capable Data Sources Only When Needed
- Configure JDBC Resources as One-Phase Commit Resources
- Use the Least Expensive Transaction Attribute
- Using Special Techniques
- Tuning Tips for Specific Types of EJB Components
- JDBC and Database Access
- Tuning Message-Driven Beans
- Tuning the Enterprise Server
- Deployment Settings
- Logger Settings
- Web Container Settings
- EJB Container Settings
- Java Message Service Settings
- Transaction Service Settings
- HTTP Service Settings
- ORB Settings
- Thread Pool Settings
- Resources
- Tuning the Java Runtime System
- Tuning the Operating System and Platform
- Tuning for High-Availability
- Index

asadmin get -m serverInstance.transaction-service.*
The following statistics are gathered on the transaction service:
■
total-tx-completed Completed transactions.
■
total-tx-rolled-back Total rolled back transactions.
■
total-tx-inflight Total inight (active) transactions.
■
isFrozen Whether transaction system is frozen (true or false)
■
inflight-tx List of inight (active) transactions.
Here is a sample of the output using asadmin:
********** Stats for JTS ************
total-tx-completed = 244283
total-tx-rolled-back = 2640
total-tx-inflight = 702
isFrozen = False
inflight-tx =
Transaction Id , Status, ElapsedTime(msec)
000000000003C95A_00, Active, 999
Tuning the Transaction Service
This property can be used to disable the transaction logging, where the performance is of
utmost importance more than the recovery. This property, by default, won’t exist in the server
conguration.
Disable Distributed Transaction Logging
To disable distributed transaction logging with the Admin Console, go to Congurations >
cong-name > Transaction Service. Click on Add Property, and specify:
■
Name: disable-distributed-transaction-logging
■
Value: true
You can also set this property with asadmin, for example:
asadmin set
server1.transaction-service.disable-distributed-transaction-logging=true
Setting this attribute to true disables transaction logging, which can improve performance.
Setting it to false (the default), makes the transaction service write transactional activity to
transaction logs so that transactions can be recovered. If Recover on Restart is checked, this
property is ignored.
Set this property to true only if performance is more important than transaction recovery.
Transaction Service Settings
Chapter 3 • Tuning the Enterprise Server 59










