Show TOC Start of Content Area

Function documentation The Distributed Object Model  Locate the document in its SAP Library structure

Use

The distributed applications consist of two parts – a client part and a server part. A typical server part of such an application defines several distributed objects and allows clients to request them by obtaining references to them. The client part obtains a reference to one or more objects from the server part, and calls their methods. RMI-P4 provides the mechanism by which client and server parts communicate.

Features

The RMI-P4 implements the following functions that an application based on the Distributed Object Model requires:

     Locate the distributed object

You can obtain references to a distributed object in your application using one of the following two options: either by registering the distributed objects to a naming system, or by sending distributed objects as parameters or return values of methods. The RMI-P4 does not use the standard RMI registry; it uses the J2EE Engine’s Naming System (which is a JNDI implementation) to obtain an initial reference to the distributed object, instead.

·        Communicate with the distributed object

The details of the actual communication are hidden behind the implementation of the P4 protocol. From a programming point of view, this communication does not differ from the standard local method invocation.

·        Load classes of objects that are transmitted in the communication process

Transmitting objects between a client and server implies the availability of mechanisms for remote class loading. The RMI-P4 provides such functions that have minor limitations compared to the standard RMI implementation.

Note

By default, the P4 Provider service uses a Web application (deployed in the Web Container service on the J2EE Engine) to download the necessary classes from the remote server using HTTP. In case the default mechanism is not an option in your scenario, you can enable an alternative mechanism that downloads classes using a P4 connection.

To enable the P4-based remote class loading mechanism, you need to set the -DP4ClassLoad=P4Connection JVM parameter on your server. For more information about how you can set additional JVM parameters using the Config Tool, see Configuring Cluster Elements.

 

 

End of Content Area