EJB types and failover
When a client accesses a workload managed EJB, it may be routed to one of a number of instances of the EJB on a number of servers. Not all EJB references can be utilized this way. Table 9-1 shows the types of EJBs that can be workload managed.
Table 9-1
EJB Type and Option Type WLMable Entity Bean, Option A Home Yes CMP No BMP No Entity Bean Options B and C Home Yes CMP Yes BMP Yes Message-Driven Bean MDB Yes Session Bean Home Yes Stateless Yes Stateful No EJB types and failover
The only type of EJBs that cannot be workload managed are instances of a given stateful session bean and entity beans with commit time caching option A. A stateful session bean is used to capture state information that must be shared across multiple client requests that are part of a logical sequence of operations. To ensure consistency in the logic flow of the application, a client must always return to the same instance of the stateful session bean, rather than having multiple requests workload managed across a group of available stateful session beans.
Because of this restriction, stateful session bean instances are not considered failover tolerant. If the process running the stateful session bean fails, the state information maintained in that bean is unrecoverable. It is the responsibility of the application to reconstruct a stateful EJB with the required state. If this is not the case, an alternative implementation, such as storing state in an Entity EJB, should be considered.
Prev | Home | Next WebSphere is a trademark of the IBM Corporation in the United States, other countries, or both.
IBM is a trademark of the IBM Corporation in the United States, other countries, or both.