EJB allows for several types of beans: stateless, stateful, and entity. As you progress from stateless to entity, the beans offer more functionality, but at the cost of more required coding.
The easiest bean type, and the one you'll look at first, is a stateless session bean. Session beans are usually likened to verbs in English; they are used for actions, such as adding something to the database or computing a value.
Stateless session beans are throwaway objects. They are maintained in a pool on the EJB server. They keep no state between calls, and they operate strictly on the data passed in via the call.
Stateful session beans are allowed to maintain state between calls. By ...