Enterprise Java Beans (EJBs) are a set of server-side components that are normally used to implement the semantic or business logic of enterprise systems, particularly those tht make use of a database management system.
EJBs are dependent upon an EJB Container, a type of server that not only provides access to them but also manages their life-cycle, connections to external resources (e.g., DBMS), and transactions.
There are three basic types of EJBs, but several of them have subtypes:
- Entity Beans
- Container-Managed
- Top-Down
- Bottom-Up
- Meet-in-the-Middle
- Bean-Managed
- Session Beans
- Stateless
- Stateful
- Message-Driven Beans
Entity EJBs are primarily responsible for providing access to a DBMS. To make them resuable in different contexts, function is usually kept to a minimum -- simply providing mechansisms for creating, retrieving, updating, and deleting entries in a database.
Session EJBs are primarily responsible for proving transaction support, specified as part of the deployment process. To make them resuable in different contexts, function is usually kept to a minimum -- passing client requests on to a middle level of function, sometimes referred to as mappers, where the actual business or semantic processing is done, presumably involving entity EJBs.
Message-Driven EJBs are a recent addition to J2EE and to standard EJB containers, such as that included in recent versions of WebSphere. Basically, they provide an EJB context for JMS and for sending and receiving messages via MQSeries or a similar server.
Checklists are provided for several types of EJBs. They include the following: