Types of Session Beans

5 March 2012 By Nithya Vasudevan 2,204 views No Comment
0 Flares Twitter 0 Facebook 0 Google+ 0 0 Flares ×

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.

Tags: ,