Home > Articles > Programming > Java

J2EE EJB Architecture and Development

  • Print
  • + Share This
The Enterprise JavaBeans (EJBs) model is a powerful one for building distributed, server-side, and Java-based enterprise application components. In this article, author Paul Perrone describes the EJB architecture and its features.
This article contains excerpts from Building Java Enterprise Systems with J2EE.
From the author of

EJB Overview

Enterprise JavaBeans (EJBs) represent a powerful component model for building distributed, server-side, and Java-based enterprise application components. The Enterprise JavaBeans model can be starkly contrasted with the regular JavaBeans model. The JavaBeans model defines a means for building Java-based components for use in containers that have a nondistributed nature, have many client-side GUI semantics associated with them, and do not define standard operations to enable sophisticated life-cycle management of JavaBean components. The Enterprise JavaBeans model, on the other hand, defines a means for building Java-based components for use in containers that do offer distributed client connectivity, have exclusive server-side semantics associated with them, and define various standard operations to enable sophisticated life-cycle management of Enterprise JavaBean components.

In fact, EJBs provide the following key features:

  • A model for defining server-side components

  • A model for defining distributed client interfaces to the services provided by these components

  • Standard operations and semantics for allowing a container to create, destroy, allocate, persist, and activate component instances

  • A standard model for defining a component that maintains a conversational session with a client, with session management handled by the container

  • A standard model for defining a component that encapsulates a data-source (for example, database) entry, with object-to-relational data mapping being handled by the container

  • A standard for defining configuration and deployment characteristics of a component, independent of its implementation

  • A standard model for declaratively defining the security attributes of a component

  • A standard model for declaratively defining the transactions attributes of a component

  • A standard component interface contract so that components can run in any vendor-compliant container/server that implements that standard interface contract

The EJB component model is thus a very powerful model for building enterprise applications and is the focal point of the Java 2, Enterprise Edition (J2EE) architecture. The J2EE v1.2 requires that all EJB v.1.1 APIs and implementations be included within J2EE EJB containers and that EJB v1.1 client APIs and implementations be included with J2EE Web containers and J2EE application clients. EJB v1.1 represents a significant advancement over EJB v1.0. EJB v1.1 compliance depreciates a set of javax.ejb.deployment package abstractions provided by EJB v1.0, requires standard XML-based deployment descriptors to be used, and requires use of EJB entity beans (in EJB v1.0, these were optional).

J2EE v1.3 requires that EJB v2.0 APIs be included within J2EE EJB containers. I will talk more about EJB 2.0 features in subsequent articles in this series.

  • + Share This
  • 🔖 Save To Your Account