Types of Session Beans and Conversational State

Session beans are designed to handle as many of the low-level state and transactional aspects of a client session as possible. However, there are several levels of control that Web developers may choose from to determine how much of the EJB container capabilities they want to use, and how much they still want to code manually.

Session beans come in two major varieties, stateful and stateless. This determines whether or not the component can retain what is known as conversational state.

Conversational state is defined as the data describing the conversation represented by a specific client pairing with a session object.

If the session bean retains this state, it provides the client with the ability ...

Get Developing Enterprise Java Applications with J2EE™ and UML 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.