Skip Headers
Oracle® Containers for J2EE Enterprise JavaBeans Developer's Guide
10g (10.1.3.5.0)

Part Number E13981-01
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Index
Index
Go to Feedback page
Contact Us

Go to previous page
Previous
Go to next page
Next
View PDF

Configuring Passivation Criteria

You can specify under what conditions OC4J passivates a stateful session bean (see "Using Deployment XML").

For more information, see: the following

Using Deployment XML

Table 12-3 lists the attributes, values, and defaults for configuring passivation criteria in the orion-ejb-jar.xml file element session-deployment.

Table 12-3 orion-ejb-jar.xml Element session-deployment Passivation Criteria

Attribute Values Default

idletime

Positive, integer number of seconds before passivation occurs.

To disable this criteria, specify a value of never.

300

memory-threshold

Percentage of JVM memory that can be consumed before passivation occurs.

To disable this criteria, specify a value of never.

80

max-instances

Maximum positive integer number of bean instances allowed in memory: either instantiated or pooled.

When this value is reached, OC4J attempts to passivate beans using the least recently used (LRU) algorithm. To allow an infinite number of bean instances, the max-instances attribute can be set to zero. Default is 0, which means infinite. This applies to both stateless and stateful session beans.

To disable instance pooling, set max-instances to any negative number. This will create a new instance at the start of the EJB call and release it at the end of the call.

See "Configuring Bean Instance Pool Size" for more information.

0 (unlimited)

max-instances-threshold

Percentage of max-instances number of beans that can be in memory before passivation occurs.

Specify an integer that is translated as a percentage. If you define that the max-instances is 100 and the max-instances-threshold is 90%, then when the active bean instances is greater than or equal to 90, passivation of beans occurs. Default: 90%.

To disable, specify never

90

passivate-count

Positive, integer number of beans to be passivated if any of the resource thresholds (memory-threshold or max-instances-threshold) have been reached.

Passivation of beans is performed using the least recently used algorithm.

To disable this option, specify a value of 0.

One-third of max-instances

resource-check-interval

The frequency, as a positive, integer number of seconds, at which OC4J checks resource thresholds (memory-threshold or max-instances-threshold).

To disable this option, specify a value of never.

180