JavaScript is required to for searching.
Skip Navigation Links
Exit Print View
Oracle GlassFish Server 3.1 Performance Tuning Guide
search filter icon
search icon

Document Information

Preface

1.  Overview of GlassFish Server Performance Tuning

2.  Tuning Your Application

Java Programming Guidelines

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

Avoid Finalizers

Declare Method Arguments final

Synchronize Only When Necessary

Use DataHandlers for SOAP Attachments

Java Server Page and Servlet Tuning

Suggested Coding Practices

General Guidelines

Avoid Shared Modified Class Variables

HTTP Session Handling

Configuration and Deployment Tips

Optimize SSL

Disable Security Manager

EJB Performance Tuning

Goals

Monitoring EJB Components

Monitoring Individual EJB Components

General Guidelines

Use High Performance Beans

Use Caching

Use the Appropriate Stubs

Remove Unneeded Stateful Session Beans

Cache and Pool Tuning Tips

Using Local and Remote Interfaces

Prefer Local 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

Using Special Techniques

Version Consistency

Request Partitioning

Tuning Tips for Specific Types of EJB Components

Entity Beans

Stateful Session Beans

Checkpoint only when needed

Stateless Session Beans

Read-Only Entity Beans

Refresh Period

Pre-Fetching Container Managed Relationship (CMR) Beans

JDBC and Database Access

Use JDBC Directly

Encapsulate Business Logic in Entity EJB Components

Close Connections

Minimize the Database Transaction Isolation Level

Tuning Message-Driven Beans

Use getConnection()

Tune the Message-Driven Bean's Pool Size

Cache Bean-Specific Resources

Limit Use of JMS Connections

3.  Tuning the GlassFish Server

4.  Tuning the Java Runtime System

5.  Tuning the Operating System and Platform

Index

Chapter 2

Tuning Your Application

This chapter provides information on tuning applications for maximum performance. A complete guide to writing high performance Java and Java EE applications is beyond the scope of this document.

The following topics are addressed here: