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

Disable Auto-deployment
Enabling auto-deployment will adversely aect deployment, though it is a convenience in a
development environment. For a production system, disable auto-deploy to optimize
performance. If auto-deployment is enabled, then the Reload Poll Interval setting can have a
signicant performance impact.
Disable auto-deployment with the Admin Console under Stand-Alone Instances > server
(Admin Server) on the Advanced/Applications Conguration tab.
Use Pre-compiled JavaServer Pages
Compiling JSP les is resource intensive and time consuming. Pre-compiling JSP les before
deploying applications on the server will improve application performance. When you do so,
only the resulting servlet class les will be deployed.
You can specify to precompile JSP les when you deploy an application through the Admin
Console or DeployTool. You can also specify to pre-compile JSP les for a deployed application
with the Admin Console under Stand-Alone Instances > server (Admin Server) on the
Advanced/Applications Conguration tab.
Disable Dynamic Application Reloading
If dynamic reloading is enabled, the server periodically checks for changes in deployed
applications and automatically reloads the application with the changes. Dynamic reloading is
intended for development environments and is also incompatible with session persistence. To
improve performance, disable dynamic class reloading.
Disable dynamic class reloading for an application that is already deployed with the Admin
Console under Stand-Alone Instances > server (Admin Server) on the Advanced/Applications
Conguration tab.
Logger Settings
The Application Server produces writes log messages and exception stack trace output to the log
le in the logs directory of the instance, appserver-root/domains/domain-name/logs. Naturally,
the volume of log activity can impact server performance; particularly in benchmarking
situations.
Logger Settings
Sun GlassFish Enterprise Server 2.1 Performance Tuning Guide • January 200950










