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

is not oered in a Unix/Linux user interface. However, it is possible to edit the OS-scheduled
thread pools and add new thread pools, if needed, using the Admin Console.
Resources
■
“JDBC Connection Pool Settings” on page 77
■
“Connector Connection Pool Settings” on page 80
JDBC Connection Pool Settings
For optimum performance of database-intensive applications, tune the JDBC Connection Pools
managed by the Enterprise Server. These connection pools maintain numerous live database
connections that can be reused to reduce the overhead of opening and closing database
connections. This section describes how to tune JDBC Connection Pools to improve
performance.
J2EE applications use JDBC Resources to obtain connections that are maintained by the JDBC
Connection Pool. More than one JDBC Resource is allowed to refer to the same JDBC
Connection Pool. In such a case, the physical connection pool is shared by all the resources.
Monitoring JDBC Connection Pools
Statistics-gathering is enabled by default for JDBC Connection Pools. The following attributes
are monitored:
■
numConnFailedValidation (count)Number of connections that failed validation.
■
numConnUsed (range)Number of connections that have been used.
■
numConnFree (count)Number of free connections in the pool.
■
numConnTimedOut (bounded range)Number of connections in the pool that have timed
out.
To get the statistics, use these commands:
asadmin get --monitor=true
serverInstance.resources.jdbc-connection-pool.*asadmin get
--monitor=true serverInstance.resources.jdbc-connection-pool. poolName.* *
Tuning JDBC Connection Pools
Set JDBC Connection Pool attributes with the Admin Console under Resources > JDBC >
Connection Pools > PoolName. The following attributes aect performance:
■
“Pool Size Settings” on page 78
Resources
Chapter 3 • Tuning the Enterprise Server 77










