EJB Performance Tuning
■Database rows represented by the bean do not change.
■The application can tolerate using
For example, an application might use a
The ejbLoad() method of a
To create a
Refresh period
An important parameter for tuning
This parameter enables the EJB component to periodically refresh its “snapshot” of the database values it represents. If the refresh period is less than or equal to 0, the bean is never refreshed from the database (the default behavior if no refresh period is given).
Pre-fetching Container Managed Relationship (CMR) Beans
If a
In general, if a bean has n relationships, using all the data of the bean would require n+1 database accesses. Use CMR
44 | Sun GlassFish Enterprise Server 2.1 Performance Tuning Guide • January 2009 |