Добавил:
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Enterprise JavaBeans™ Specification, v1.1 - Sun Microsystems.pdf
Скачиваний:
11
Добавлен:
24.05.2014
Размер:
1.62 Mб
Скачать

Sun Microsystem Inc

Concepts

Enterprise JavaBeans v1.1, Final Release

Entity Bean Component Contract

Chapter 9 Entity Bean Component Contract

Note: Container support for entity beans is a mandatory feature in the EJB 1.1 release.

The entity bean component contract is the contract between an entity bean and its container. It defines the life cycle of the entity bean instances and the model for method delegation of the client-invoked business methods. The main goal of this contract is to ensure that a component is portable across all compliant EJB Containers.

This chapter defines the enterprise Bean Provider’s view of this contract and the Container Provider’s responsibility for managing the life cycle of the enterprise bean instances.

9.1 Concepts

9.1.1 Runtime execution model

This section describes the runtime model and the classes used in the description of the contract between an entity bean and its container.

97

11/24/99

Sun Microsystems Inc.

Entity Bean Component Contract

Enterprise JavaBeans v1.1, Final Release

Concepts

Figure 21 Overview of the entity bean runtime execution model

container

 

EJBHome

 

 

 

enterprise bean

 

EJB objects

instances

 

 

 

EJB objects

 

 

EJBObjects

 

client

 

enterprise bean 1

 

 

EJBHome

EJB objects

EJB objects

enterprise bean instances

EJBObjects

enterprise bean 2

classes generated by

classes provided by

Container Provider tools

Bean Provider

An enterprise bean instance is an object whose class was provided by the Bean Provider.

An entity EJBObject is an object whose class was generated at deployment time by the Container Provider’s tools. The entity EJBObject class implements the entity bean’s remote interface. A client never references an entity bean instance directly—a client always references an entity EJBObject whose class is generated by the Container Provider’s tools.

An entity EJBHome object provides the life cycle operations (create, remove, find) for its entity objects. The class for the entity EJBHome object is generated by the Container Provider’s tools at deployment time. The entity EJBHome object implements the entity bean’s home interface that was defined by the Bean Provider.

11/24/99

98