EJB Container

Use

During application deployment, EJBs are deployed on all server processes in the cluster. For each call to an EJB, a system, which is external to the EJB Container, dispatches the call to an EJB instance on a particular server process. This instance works locally – that is, it is not aware of the availability of other EJB instances in the cluster.

If the server process where the instance resides fails, then the call must be redirected to an available server process where a new EJB instance processes it. The redirection is transparent to the EJB.

Session Beans

Session Enterprise Java Beans (EJBs) in the J2EE Engine work locally and independently of each other. They are not clustered and do not communicate with other session EJBs on other server nodes in the cluster.

Failover for stateless session beans is provided by the RMI-P4 protocol, which redirects the call to an available server process. However, state preservation is available for stateful session beans through the failover system of the J2EE Engine. The bean instance is serialized and stored in a persistent storage and that makes it possible to restore the state after the call has been redirected to an available server process by the RMI-P4 protocol.

For more information about stateful session failover, see Failover System. For more information about programming prerequisites, see Developing Enterprise Beans.

Entity Beans

The state of an entity bean is kept in the underlying database. This is the last committed state. Therefore, the new bean instance that is to process the call after the failover retrieves the last committed state from the database.