Show TOC Start of Content Area

Function documentation Failover for Clustered RMI-P4 Remote Objects  Locate the document in its SAP Library structure

Use

RMI-P4 provides a transparent failover for clustered remote objects (all actions are performed on the server side and the client is not aware of any of them). It implements a mechanism for migrating instances of those objects to other available server processes within the J2EE Engine cluster in case a server process crashes.

Note

This mechanism does not deal with preserving any state of the remote object after migration; it remains the developer’s responsibility.

Activities

The process of migration of the remote object between cluster elements is depicted in the following diagram:

This graphic is explained in the accompanying text

To call methods on a remote object, a client must obtain a reference to it. The reference contains information about the identifier that is associated with the remote object by the Naming System. If a server process crashes, the remote object is no longer available. Therefore, when the Java dispatcher receives a request from the client to that server process, it uses the load balancing mechanism to direct the request to another server process. In this case, there is no instance of the remote object there. The P4 broker object on the new server process gets the identifier of the remote object from the request and contacts the cross system. The latter looks up the remote object and provides the P4 broker with access to the class loader of the remote object. This way, an instance of the remote object is created on the new server process, and client-server communication continues as usual.

Recommendation

We recommend that you use enterprise beans as remote objects in your applications, and therefore use the EJB failover mechanism, which is based on the RMI-P4 failover mechanism described above. For more information, see Failover for Enterprise Beans.

End of Content Area