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>
Specifies the pool properties of stateless session beans, entity beans, and message-driven bean.
ejb (sun-ejb-jar.xml)
The following table describes subelements for the bean-pool element.
Table A–8 bean-pool Subelements
Element |
Required |
Description |
---|---|---|
zero or one |
Specifies the initial and minimum number of beans maintained in the pool. Default is 32. |
|
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 maximum number of beans in the pool. Values are from 0 to MAX_INTEGER. Default is to the EJB container value or 60. |
|
zero or one |
Deprecated. |
|
zero or one |
Specifies the maximum time that a bean is allowed to be idle in the pool. After this time, the bean is removed. This is a hint to the server. Default time is 600 seconds (10 minutes). |
<bean-pool> <steady-pool-size>10</steady-pool-size> <resize-quantity>10</resize-quantity> <max-pool-size>100</max-pool-size> <pool-idle-timeout-in-seconds>600</pool-idle-timeout-in-seconds> </bean-pool>