Skip Headers

Oracle® Containers for J2EE Enterprise JavaBeans Developer's Guide 10g Release 3 (10.1.3) B14428-01 |
| Home | Solution Area | Contents | Index

Previous | Next |

# Configuring Passivation Criteria

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

For more information, see:

- "When does Stateful Session Bean Passivation Occur?"

- "Configuring Passivation"

- "Configuring Passivation Location"

## 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. When this value is reached, OC4J attempts to passivate the oldest in-memory bean instance. If unsuccessful, it waits `call-timeout` number of milliseconds (set in `orion-ejb-jar.xml` file element `entity-deployment`) to see if a bean instance is removed from memory, either through another passivation, calling the bean `remove` method, or bean expiration, before throwing a `TimeoutExpiredException` back to the client. To disable bean pooling, set this value to a negative number. | "0" (unlimited)
max-instances-threshold | Percentage of `max-instances` number of beans that can be in memory before passivation occurs. When this threshold is reached, passivation of beans occurs. For example, if max-instances is 100 beans, when max-instances-threshold reaches 90, OC4J begins passivation. | "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"