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

▼
To Enable Java Serialization
You must set this property on all servers that you want to use JSG.
In the tree component, expand the Congurations node.
Expand the desired node.
Select the JVM Settings node
In the JVM Settings page, choose the JVM Options tab.
Click Add JVM Option, and enter the following value:
-Dcom.sun.CORBA.encoding.ORBEnableJavaSerialization=true
Click Save
Restart the Application Server.
Using JSG for Application Clients
If an application uses standalone non-web clients (application clients), and you want to use JSG,
you must also set a system property for the client applications. A common way to do this is to
add the property to the Java command line used to start the client application, for example:
java -Dcom.sun.CORBA.encoding.ORBEnableJavaSerialization=true
-Dorg.omg.CORBA.ORBInitialHost=gollum
-Dorg.omg.CORBA.ORBInitialPort=35309
MyClientProgram
Thread Pool Settings
You can both monitor and tune thread pool settings through the Admin Console. To congure
monitoring with the Admin Console, open the page Congurations > cong-name >
Monitoring. To view monitoring information with the Admin Console, open the page
Stand-Alone Instances > instance-name (Monitor).
Tuning Thread Pools (Unix /Linux only)
Congure thread pool settings through the Admin Console at Congurations > cong-name >
Thread Pools.
Since threads on Unix/Linux are always operating system (OS)-scheduled, as opposed to
user-scheduled, Unix/Linux users do not need to use native thread pools. Therefore, this option
1
2
3
4
5
6
7
Thread Pool Settings
Sun GlassFish Enterprise Server 2.1 Performance Tuning Guide • January 200976










