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

Sun Microsystem Inc

Overview

Enterprise JavaBeans v1.1, Final Release

Support for Distribution

Chapter 13 Support for Distribution

13.1 Overview

The home and remote interfaces of the enterprise bean’s client view are defined as Java™ RMI [3] interfaces. This allows the Container to implement the home and remote interfaces as distributed objects. A client using the home and remote interfaces can reside on a different machine than the enterprise bean (location transparency), and the object references of the home and remote interfaces can be passed over the network to other applications.

The EJB specification further constrains the Java RMI types that can be used by enterprise beans to the legal RMI-IIOP types [7]. This makes it possible for the EJB Container implementors to use RMI-IIOP as the object distribution protocol.

Note: The EJB 1.1 specification does not require Container vendors to use RMI-IIOP. A later release of the J2EE platform is likely to require a J2EE platform implementor to implement the RMI-IIOP protocol for EJB interoperability in heterogeneous server environments.

199

11/24/99

Sun Microsystems Inc.

Support for Distribution

Enterprise JavaBeans v1.1, Final Release Client-side objects in distributed environment

13.2 Client-side objects in distributed environment

When the RMI-IIOP protocol or similar distribution protocols are used, the client communicates with the enterprise bean using stubs for the server-side objects. The stubs implement the home and remote interfaces.

Figure 49 Location of EJB Client Stubs.

client address space (i.e. JVM)

container address space (i.e. JVM)

EJB home stub

container

EJB home object

 

remote client

EJB object stub

EJB object

enterprise Bean

 

The communication stubs used on the client side are artifacts generated at enterprise Bean’s deployment time by the EJB Container provider tools. The stubs used on the client are standard if the Container uses RMI-IIOP as the distribution protocol; the stubs are Container-specific otherwise.

13.3 Standard distribution protocol

The standard mapping of the Enterprise JavaBeans architecture to CORBA is defined in [8].

The mapping enables the following interoperability:

A client using an ORB from one vendor can access enterprise Beans residing on an EJB Server provided by another vendor.

Enterprise Beans in one EJB Server can access enterprise Beans in another EJB Server.

A non-Java platform CORBA client can access any enterprise Bean object.

11/24/99

200