9.2. Session Beans and JDO

A typical session bean has the following characteristics, according to the EJB specification:

  • Executes on behalf of a single client.

  • Can be transaction-aware.

  • Often updates shared data in an underlying database.

  • Does not represent directly shared data in the database, although it may access and update such data.

  • Is relatively short-lived.

  • A typical EJB container provides a scalable runtime environment to execute a large number of session objects concurrently.

The EJB specification defines stateless session beans, which do no keep state between business method invocations, as well as stateful session beans, which can keep conversational state between business method invocations. In short, a stateful session bean holds a client-specific ...

Get Core Java™ Data Objects 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.