1. Overview of GlassFish Server Performance Tuning
Avoid Serialization and Deserialization
Use StringBuilder to Concatenate Strings
Assign null to Variables That Are No Longer Needed
Declare Methods as final Only If Necessary
Declare Constants as static final
Declare Method Arguments final
Synchronize Only When Necessary
Use DataHandlers for SOAP Attachments
Java Server Page and Servlet Tuning
Avoid Shared Modified Class Variables
Configuration and Deployment Tips
Monitoring Individual EJB Components
Remove Unneeded Stateful Session Beans
Using Local and Remote Interfaces
Using Pass-By-Reference Semantics
Improving Performance of EJB Transactions
Use Container-Managed Transactions
Do Not 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
Tuning Tips for Specific Types of EJB Components
Pre-Fetching Container Managed Relationship (CMR) Beans
Encapsulate Business Logic in Entity EJB Components
Minimize the Database Transaction Isolation Level
Tune the Message-Driven Bean's Pool Size
3. Tuning the GlassFish Server
4. Tuning the Java Runtime System