!--a11y-->
Failover
for Clustered RMI-P4 Remote Objects 
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 SAP J2EE Engine cluster in case a server process crashes.

This mechanism does not deal with preserving any state of the remote object after migration, this remains the developer’s responsibility.
The process of migration of the remote object between cluster elements is depicted in the following diagram:

In order to call methods on a remote object, a client must obtain a reference to that object. The reference to the object contains information about the identifier that is associated to 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.
