
Max Cache Size
Max Cache Size | Maximum number of beans in the cache. Make this setting greater than one. The default value is 512. A | |
| value of zero indicates the cache is unbounded, which means the size of the cache is governed by Cache | |
| Idle Timeout and Cache Resize Quantity. The corresponding EJB deployment descriptor attribute is | |
| ||
Cache Resize | Number of beans to be created or deleted when the cache is serviced by the server. Valid values are from | |
Quantity | zero to MAX_INTEGER, and the default is 16. The corresponding EJB deployment descriptor attribute is | |
| ||
Removal Timeout | Amount of time that a stateful session bean remains passivated (idle in the backup store). If a bean was not | |
| accessed after this interval of time, then it is removed from the backup store and will not be accessible to | |
| the client. The default value is 60 minutes. The corresponding EJB deployment descriptor attribute is | |
| ||
Removal Selection | Algorithm used to remove objects from the cache. The corresponding EJB deployment descriptor | |
Policy | attribute is | |
| ■ | NRU (not recently used). This is the default, and is actually |
|
| |
| ■ | FIFO (first in, first out) |
|
| |
| ■ | LRU (least recently used) |
|
| |
Cache Idle | Maximum time that a stateful session bean or entity bean is allowed to be idle in the cache. After this time, | |
Timeout | the bean is passivated to the backup store. The default value is 600 seconds. The corresponding EJB | |
| deployment descriptor attribute is | |
Refresh period | Rate at which a | |
| refreshed. The default is 600 seconds. The corresponding EJB deployment descriptor attribute is | |
| ||
| set it, use the Add Property button in the Additional Properties section. |
Pool and Cache Settings for Individual EJB Components
Individual EJB pool and cache settings in the
TABLE 3–2 EJB Cache and Pool Settings
| Cache Settings |
|
|
|
|
| Pool Settings |
|
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| cache- |
|
|
|
|
|
|
|
|
|
|
| idle- |
|
| refresh- |
|
|
|
|
| cache- |
|
| timeout- | removal- | victim- | period- |
| pool- | max- | |
Type of | resize- |
| max- cache- | in- | timeout- in- | selection- | in- | steady- | resize- | pool- | |
Bean | quantity |
| size | seconds | seconds | policy | seconds | quantity | size | seconds | |
|
|
|
|
|
|
|
|
|
|
|
|
Stateful | X |
| X | X | X | X |
|
|
|
|
|
Session |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Stateless |
|
|
|
|
|
|
| X | X | X | X |
Session |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
56 | Sun GlassFish Enterprise Server 2.1 Performance Tuning Guide • January 2009 |