Show TOC Start of Content Area

Background documentation J2EE Engine EJB Architecture  Locate the document in its SAP Library structure

The J2EE Engine EJB architecture fully implements the Sun Microsystems’ Enterprise JavaBeans™ Specification, version 2.0 and is compliant with all previous releases of that specification. The J2EE Engine EJB architecture is integrated with the following services: JMS, JNDI, RMI-IIOP, JTA, JavaMail, JDBC, J2EE Connector Architecture, and Web Services.

The J2EE Engine EJB architecture contains the following components:

·        J2EE Engine EJB Container

·        Persistence Manager

EJB Container

EJB Container is the environment where enterprise beans reside. It enables multiple enterprise beans to be deployed on the J2EE Engine and makes them accessible through the JNDI. The EJB Container provides the deployed beans with services such as persistence, transaction handling, pooling, security, exception handling and so on. At runtime the EJB Container creates instances of the bean class, that is bean instances, and manages their life cycle.

Session and Entity EJB Container

The EJB Container provides tools for code generation that are used at deploy time. These tools generate the implementations of the enterprise beans’ home and component interfaces. These generated classes intercept client calls, provide security and transaction management, and delegate the calls to the bean instances (that is, instances of the bean class) that contain the implementation of the business methods.

 

This graphic is explained in the accompanying text

Session and Entity EJB Container

 

Message-Driven EJB Container

The Message-Driven EJB Container delegates JMS messages to message-driven bean instances. The bean instances’ lifetime is managed by the EJB Container and their existence is completely hidden for the client. The message-driven bean serves as a JMS message consumer and all instances of a message-driven bean class, which reside in the EJB Container, are identical if they are not involved in processing a JMS message.

This graphic is explained in the accompanying text

Message-Driven EJB Container

Persistence Manager

The Persistence Manager is part of the J2EE Engine EJB architecture that manages the persistent data of the container-managed entity beans deployed on the J2EE Engine. It provides transparent object persistence – it binds the container-managed entity beans to the database entities/records they represent and automatically synchronizes their state. Applications deal with their container-managed entity beans just like they deal with simple Java objects. However, all updates of the persistent data will be reflected in the data store, too.

This graphic is explained in the accompanying text

The Persistence Manager in the J2EE Engine EJB Architecture

 

The Persistence Manager provides the following functions to container-managed entity beans:

·        Generation of SQL queries. Thus, the application developer can work with a higher level of abstraction and does not have to manually develop SQL script. Moreover, the application developer is guaranteed that the queries used are portable, optimized, and effective enough for the system used.

·        Transparent management of synchronization of data with the database (loading and storing)

·        Transparent control of concurrent work with shared resources. This includes both multiple clients that use one business application simultaneously and multiple clients that use different applications, which work with shared data. In a cluster this is managed with the help of the Enqueue Server.

·        Transparency of the object-relational transformation of data. This feature provides the following advantages:

¡        Applications are independent of the database, with which they work, which guarantees their portability

¡        The application developer does not have to take into consideration the particular database schema and can focus entirely on the business logic of the application

·        Cache of data – this makes the interactions with the database as few as possible, thus ensuring faster application work

·        Primary key generation

·        Management of the relationship constraints

 

 

End of Content Area