Basics of EJBs
In EJB 2.0, there are four types of EJBs:
Stateless session beans provide a service without storing a conversation state between method calls.
Stateful session beans maintain state; each instance is associated with a particular client.
Entity beans represent an object view of persistent data, usually rows in a database. Entity beans have a primary key as a unique identifier. There are two operational styles for entity beans: container-managed persistence (CMP) and bean-managed persistence (BMP).
Message-driven beans were added in EJB 2.0. Message-driven EJBs, the integration between JMS (Java Message Service) and EJB, are used to perform asynchronous work within the server.
Session beans (both stateful and stateless) ...