Using EJB activation and passivation

This stateful persistence model is how EAServer implements the standard EJB passivation and activation protocol. This model can be used only by EJB stateful session beans. In EJB terminology, passivation is the process of removing an instance’s data from memory and saving it to a database. Activation is the process of restoring the state and applying it to an instance of the component. You can configure passivization for single-server and clustered-server deployments as described in Table 28-1.

Table 28-1: EJB stateful session bean passivation options

Option

Description

No passivation

This is the default configuration for EJB stateful session beans. EAServer never performs passivation. If you configure an instance timeout property for the component, instances that time out are destroyed and removed from memory. Subsequent use of the instance handle by a client results in an error.

Serialization with support for load balancing and failover

For clustered (multiserver) deployments. EAServer serializes instance state and saves it to a remote database after every remote interface method invocation. This option can be used to support failover and load balancing in an EAServer cluster and also supports passivation as required by the EJB specification. “Configuring stateful session beans to support failover” describes how to configure this option.

Serialization after timeout

For single-server deployments. EAServer serializes instance data when the instance times out, saving the data to a remote database. This option allows you to support EJB passivation without incurring the overhead of a database write after every method invocation. You can also tune the timeout setting to balance memory use versus response time. “Configuring passivation after timeout” describes how to configure this option.