Finding Remote Objects
The benefit of using Remote Method Invocation is that your object can call a method of another object in another JVM, usually on another physical host system. In order to do this, however, you need to find the object and get a reference to it, just as you would for a local object in the same JVM. The primary mechanism for locating remote objects in RMI is called the RMIRegistry.
The RMIRegistry is a fairly simple program that contains remote references to remote objects, along with a logical name to use for finding the object. For example, you might have a remote object that represents a shopping cart for an e-commerce application. In your program, the name of the reference to the object might be scRemote1. In the RMIRegistry, ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access