Sun Java System Application Server 9.1 High Availability Administration Guide
只搜寻这本书
查看这本书:
以 PDF 格式下载本书 (1536 KB)

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 9.1 Application Deployment Guide.


Example 9–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>