Sun Java System Application Server Enterprise Edition 8.1 2005Q2 High Availability Administration Guide

- Previous: Configuring Availability for an Individual Application or EJB Module
- Next: Specifying Methods to Be Checkpointed

## Configuring Availability for an Individual Bean

To enable availability and select methods to be checkpointed for an individual SFSB, use the `sun-ejb-jar.xml` deployment descriptor file. .

To enable high availability session persistence, set `availability-enabled="true"` in the `ejb` element. To control the size and behavior of the SFSB cache, use the following elements:

- `max-cache-size` : specifies the maximum number of session beans that are held in cache. If the cache overflows (the number of beans exceeds `max-cache-size`), the container then passivates some beans or writes out the serialized state of the bean into a file. The directory in which the file is created is obtained from the EJB container using the configuration APIs.

- `resize-quantity`

- `cache-idle-timeout-in-seconds`

- `removal-timeout-in-seconds`

- `victim-selection-policy`

For more information about `sun-ejb-jar.xml`, see The sun-ejb-jar.xml File in Sun Java System Application Server Enterprise Edition 8.1 2005Q2 Developer’s Guide

##### Example 8–1 Example of an EJB Deployment Descriptor With Availability Enabled

    <sun-ejb-jar>
        ...
        <enterprise-beans>
            ...
            <ejb availability-enabled="true">
                <ejb-name>MySFSB</ejb-name>
            </ejb>
            ...
        </enterprise-beans>
    </sun-ejb-jar>

- Previous: Configuring Availability for an Individual Application or EJB Module
- Next: Specifying Methods to Be Checkpointed

- © 2010, Oracle Corporation and/or its affiliates