Differences Between Stateless and Stateful Session Beans

Unlike the other EJB types, session beans are divided into two categories. A session bean can either be stateful or stateless. A stateful session bean is said to “maintain conversational state” with its client. Conversational state means that the bean maintains knowledge of actions performed by a specific client across multiple method calls made by that client. The EJB specification states that this is the normal behavior for a session bean. A form of session bean that maintains no conversational state (stateless) is also defined by the specification. The primary tradeoff between the two is efficient use of resources versus client application complexity. Even though stateful is described ...

Get Special Edition Using Enterprise JavaBeans™ 2.0 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.