When to use Stateful session bean over Stateless session bean?

First, you have to understand how the beans are created and handled on the server. For stateless session beans the server can maintain a variable amount of instances in a pool. Each time a client requests such a stateless bean (e.g. through a method) a random instance is chosen to serve that request. That means … Read more

Stateless and Stateful Enterprise Java Beans

Stateless Session Beans (SLSB) are not tied to one client and there is no guarantee for one client to get the same instance with each method invocation (some containers may create and destroy beans with each method invocation session, this is an implementation-specific decision, but instances are typically pooled – and I don’t mention clustered … Read more