Specifies the entity bean cache properties. Used for entity beans and stateful session beans.
ejb (sun-ejb-jar.xml)
The following table describes subelements for the bean-cache element.
Table A–7 bean-cache Subelements|
Element |
Required |
Description |
|---|---|---|
|
zero or one |
Specifies the maximum number of beans allowable in cache. |
|
|
zero or one |
Deprecated. |
|
|
zero or one |
Specifies the maximum time that a stateful session bean or entity bean is allowed to be idle in cache before being passivated. Default value is 10 minutes (600 seconds). |
|
|
zero or one |
Specifies the amount of time a bean remains before being removed. If removal-timeout-in-seconds is less than idle-timeout, the bean is removed without being passivated. |
|
|
zero or one |
Specifies the number of beans to be created if the pool is empty (subject to the max-pool-size limit). Values are from 0 to MAX_INTEGER. |
|
|
zero or one |
Specifies the algorithm that must be used by the container to pick victims. Applies only to stateful session beans. |
<bean-cache>
<max-cache-size>100</max-cache-size>
<cache-resize-quantity>10</cache-resize-quantity>
<removal-timeout-in-seconds>3600</removal-timeout-in-seconds>
<victim-selection-policy>LRU</victim-selection-policy>
<cache-idle-timeout-in-seconds>600</cache-idle-timeout-in-seconds>
<removal-timeout-in-seconds>5400</removal-timeout-in-seconds>
</bean-cache>