Stateful Session Bean failover performance in WebSphere Application Server

Students of EJB specification may remember that it describes Stateful Session Beans (SFSB), a mechanism to preserve state in EJB container. This feature was not popular, as state is mostly handled in Web container in JEE applications, with EJB container providing stateless services. WebSphere Application Server, being a superb J2EE container, supports SFSB. Beginning with WAS version 6, when deployed to a clustered environment, you can enable SFSB failover, so your valuable state is not lost when an EJB container goes down for any reason. It is a telling indicator of low demand that this feature was not available in WebSphere until version 6 (J2EE 1.4 / J2SE 5), which came out in late 2004. SFSB failover in WAS is implemented through bean passivation. After each method call, bean is passivated, which requires serialization. Serialized object is then distributed to other EJB containers in the same cluster. Unlike HTTP session replication, tuning optimizations, such as time-based writes, are not available for SFSB failover. It is all or nothing: either you have no replication/failover or you incur overhead of inlined passivation on every call. Resulting performance is predictably poor. And I can not really blame IBM for not polishing a feature that is in apparently little demand. Another reason for you to stick with HTTP sessions and avoid SFSB.

Advertisements

One Response to Stateful Session Bean failover performance in WebSphere Application Server

  1. Pingback: Stateful Session Bean failover performance in WebSphere Application Server - server camp

%d bloggers like this: