Sun Java System Application Server Platform Edition 8.1 2005Q2 Update 2 Developer's Guide

- Previous: A
- Next: C

# B

## bean-cache

Specifies the entity bean cache properties. Used for entity beans and stateful session beans.

### Superelements

ejb (`sun-ejb-jar.xml`)

### Subelements

The following table describes subelements for the `bean-cache` element.

Table A–7 `bean-cache` Subelements

Element | Required | Description
--- | --- | ---
max-cache-size | zero or one | Specifies the maximum number of beans allowable in cache.
is-cache-overflow-allowed | zero or one | Deprecated.
cache-idle-timeout-in-seconds | 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).
removal-timeout-in-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.
resize-quantity | 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.
victim-selection-policy | zero or one | Specifies the algorithm that must be used by the container to pick victims. Applies only to stateful session beans.

### Example

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

## bean-pool

Specifies the pool properties of stateless session beans, entity beans, and message-driven bean.

### Superelements

ejb (`sun-ejb-jar.xml`)

### Subelements

The following table describes subelements for the `bean-pool` element.

Table A–8 `bean-pool` Subelements

Element | Required | Description
--- | --- | ---
steady-pool-size | zero or one | Specifies the initial and minimum number of beans maintained in the pool. Default is 32.
resize-quantity | 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.
max-pool-size | 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.
max-wait-time-in-millis | zero or one | Deprecated.
pool-idle-timeout-in-seconds | 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).

### Example

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

- Previous: A
- Next: C

- © 2010, Oracle Corporation and/or its affiliates