user manual
Chapter 13: Caching of Stateful Session Beans 129
Sessions in secondary storage
Again, aggressive passivation is set Partition-wide using the boolean property
ejb.sfsb.aggressive_passivation. Setting the property to true (the default) stores
the session's state regardless of whether it was accessed before the the last
passivation attempt. Setting the property to false allows the container to use
only simple passivation. Again, this property is set in the container's properties
file partition.xml located in:
<install_dir>/var/domains/base/configurations/<configuration_name>
/ mos/<partition_name>/adm/properties
Bear in mind that although using aggressive passivation aids in failover, it also
results in a performance hit since the container accesses the database more
often. If you configure the JSS to use a non-native database (that is, you
choose not to use JDataStore), the loss of performance can be even greater.
Be aware of the tradeoff between availability and performance before you
elect to use aggressive passivation.
Sessions in secondary storage
Most sessions are not kept in persistent storage forever after they timeout.
Borland provides a mechanism for removing stored sessions from the
database after a discrete period of time known as the keep alive timeout. The
keep alive timeout specifies the minimum amount of time in seconds to persist
a passivated session in stateful storage. The actual amount of time it is kept in
the database can vary, since it is not wise from a performance standpoint to
constantly poll the database for unused sessions. The actual amount of time a
session is persisted is at least the value of the keep alive timeout and not more
than twice the value of the keep alive timeout.
Unlike the other passivation properties discussed above, the keep alive
timeout can be specified either Partition-wide and/or on the individual session
bean. If you set a keep alive timeout for a specific bean, its value will take
precedence over any container-wide values. If you do not specify a keep alive
timeout for a particular bean, it will use the Partition-wide value.
Setting the keep alive timeout in Containers
The Borland JSS implementation uses the property
ejb.sfsb.keep_alive_timeout to specify the amount of time (in seconds) to
maintain a passivated session in stateful storage. The default value is 86,400
seconds, or twenty-four hours. Like the other properties discussed above, you
set the keep alive timeout in the container properties file:
<install_dir>/var/domains/base/configurations/<configuration_name>
/ mos/<partition_name>/adm/properties
Remember that any value you specify here can be overridden by setting a
keep alive timeout for a specific session bean.










