Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Overview
Anchor
top
top

A typical J2EE application may contain Enterprise JavaBeans or EJBs. These beans contain the application's business logic and live business data. Although it is possible to use standard Java objects to contain your business logic and business data, using EJBs addresses many of the issues of using simple Java objects, such as scalability, lifecycle management and state management.

This document discusses one type of EJB, the Session EJB. This type of EJB is useful for mapping business process flow (or equivalent application concepts). There are two types of Session EJB, stateless and stateful.

EJBs hold conversations with clients. A conversation is basically an interaction between the EJB and the client and these interactions are composed of method calls by the clients to the EJBs. Stateful session beans retain state on behalf of a client. This means that if the state of the bean changes during a client's method call, this state is retained for subsequent calls by the same client. A stateless session bean on the other hand retains no conversational state from method to method. In other words, it is expected to hold its conversational state for only a single method call.

This article is organized in the following sections:

...