Technical Overview

|  |  |  | OpenEJB OpenJMS OpenORB Castor Tyrex |

Main
Welcome!
Download
Mailing Lists
The Team

Users
Quickstart
Hello World!
CMP Example
CMP Guide
Deploy
Startup
Validation
Configuration
Support
Request Feature
FAQ

Servers
Local Server
Remote Server
Tomcat

Integrators
Why OpenEJB
Overview
Design
Specification
Presentation

Developers
Custom Services
Release Plan
Source Code
SourceForge

Technical Overview

Overview
Container-Server Contract
Application Server's Role
Container's Role
OpenEJB Architecture
Containers
Primary Services
IntraVM Server

## Overview

The Enterprise JavaBeans (EJB) architecture is a component architecture for the development and deployment of component-based distributed business applications. Applications written using the Enterprise JavaBeans architecture are scalable, transactional, and multi-user secure. OpenEJB is an Open Source implementation of version 1.1 of the EJB specification, which supports both session and entity beans in addition to an enhanced security model.

## Container-Server Contract

OpenEJB is a pre-built, self-contained, portable EJB container system that can be plugged into any application server environment. OpenEJB provides a clear separation of responsibilities between the EJB container and the EJB server. The application server and OpenEJB container system interact through an open programming interface, which forms the container-server contact. This contract is defined by the Container Provider Interface (CPI), which is a small and simple set of classes and interfaces.

## Application Server's Role

Application servers that use OpenEJB are responsible for providing client applications with naming and remote access to the application server. Its services may include providing JNDI and proxy implementations that fulfill the client-server contract of the EJB programming model. In application servers that use OpenEJB locally, such as a Servlet Container, OpenEJB already provides the necessary JNDI and proxy implementations. When a client makes a request on a remote bean reference, the application server delivers the request to the OpenEJB container system, which delegates the request to the appropriate enterprise bean and applies the transaction, security, and persistence services appropriately.

## Container's Role

OpenEJB manages the enterprise bean's lifecycle and coordinates the application of transactions (local or distributed), persistence, and security as defined by the EJB specification. To manage these tasks in a way that is flexible and customizable, OpenEJB also enforces a separation of these responsibilities into separate services. OpenEJB provides a Service Provider Interface (SPI) for transaction, persistence, and security services. These simple and flexible container-service contracts are based on simple adapters and industry standards like JTS and JAAS.

## OpenEJB Architecture

OpenEJB is the first EJB container system that allows developers of an EJB platform to assemble it from existing products rather than construct it from scratch. Vendors focus on what they do best while OpenEJB provides the container to host Enterprise JavaBeans. When plugged into any Java compatible application server, the result is a complete, yet modular Enterprise JavaBeans container system. Through the CPI, an application server vendor can use the OpenEJB container system to obtain an instant and customizable EJB 1.1 platform. Through the SPI, primary services may be interchanged to match any target environment's specific requirements.

## Containers

The OpenEJB container system provides four robust container types, including stateless and stateful session-bean containers as well as Bean-Managed (BMP) and Container-Managed (CMP) entity-bean containers. These containers are strictly compliant with the EJB 1.1 specification, and provide the full complement of security and transaction behaviors to beans. The OpenEJB containers are very lightweight because they multiplex requests concurrently, requiring less overhead to service more beans. The containers are also extremely fast because they introduce virtually no bottlenecks to service requests, allowing a high volume of requests to execute within the container system simultaneously.

## Primary Services

OpenEJB defines four primary services: transaction, security, persistence, and assembly. The first three are used continually at runtime by the container system. The last is used only at startup to assemble the container system. The containers use the transaction, security, and persistence services while servicing beans and performing other responsibilities: the transaction service provides the container with transactional integrity; the security service provides authorization control; the persistence service provides an API for container-managed persistence of entity beans.

## IntraVM Server

OpenEJB includes an IntraVM server that allows for swift interaction among beans in the same virtual machine. While respecting the remote semantics required by EJB, optimizations in method calls from one bean to another provide for very fast throughput and little or no latency. The IntraVM provides an immediately available platform for application servers that do not need to support client access through distributed objects. For example, an existing Servlet Container can use the IntraVM server to integrate the OpenEJB container system with very little effort.

Java, EJB, JDBC, JNDI, JTA, Sun, Sun Microsystems are trademarks or registered trademarks of Sun Microsystems, Inc. in the United States and in other countries. XML, XML Schema, XSLT and related standards are trademarks or registered trademarks of MIT, INRIA, Keio or others, and a product of the World Wide Web Consortium. All other product names mentioned herein are trademarks of their respective owners.