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

than cache misses, then option B is an appropriate choice. You might still have to change the
max-cache-size and cache-resize-quantity to get the best result.
If the cache hits are too low and cache misses are very high, then the application is not reusing
the bean instances and hence increasing the cache size (using max-cache-size) will not help
(assuming that the access pattern remains the same). In this case you might use commit option
C. If there is no great dierence between cache-hits and cache-misses then tune
max-cache-size, and probably cache-idle-timeout-in-seconds.
Java Message Service Settings
The Type attribute that determines whether the Java Message Service (JMS) is on local or
remote system aects performance. Local JMS performance is better than remote JMS
performance. However, a remote cluster can provide failover capabilities and can be
administrated together, so there may be other advantages of using remote JMS. For more
information on using JMS, see
Chapter 4, “Conguring Java Message Service Resources,” in Sun
GlassFish Enterprise Server 2.1 Administration Guide
.
Transaction Service Settings
The transaction manager makes it possible to commit and roll back distributed transactions.
A distributed transactional system writes transactional activity into transaction logs so that they
can be recovered later. But writing transactional logs has some performance penalty.
Monitoring the Transaction Service
Transaction Manager monitoring is disabled by default. Enable monitoring of the transaction
service with the Admin Console at Congurations > cong-name > Monitoring.
You can also enable monitoring with these commands:
set serverInstance.transaction-service.monitoringEnabled=true
reconfig serverInstance
Viewing Monitoring Information
When you have enabled monitoring of the transaction service, view results
■
With Admin Console at Standalone Instances > server-name (Monitor | Monitor). Select
transaction-service from the View dropdown.
■
With this command:
Java Message Service Settings
Sun GlassFish Enterprise Server 2.1 Performance Tuning Guide • January 200958










