Types of Session Beans

A session bean may be either:

  1. Stateless—the session bean instances contain no conversational state between methods; any instance can be used for any client.
  2. Stateful—the session bean instances contain conversational state which must be retained across methods and transactions.
  3. Singleton—a single session bean instance is shared between clients and supports concurrent access.

  • In the case of a stateful session bean, its fields contain a conversational state on behalf of the session object’s client.
  • This state describes the conversation represented by a specific client/session object pair. A stateful session bean’s lifetime is controlled by the client.

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.