Basic HTML version of Foils prepared 3 Feb 98

Foil 14 Name Registry

From Overview of Distributed Objects and RMI in Java 1.1 ARL Database Tutorial and CPS616 -- February 98. by Nancy McCracken

Java classes for RMI hello example for Foil 14
The rmi registry is another server running on the remote machine - all RMI servers can register names with an object by calling the rebind method.
The name given to rebind should be a string of the form: Naming.rebind("//osprey7:1099/HelloServer", obj); where the machine name can default to the current host the port number can default to the default registry port, 1099
For large distributed applications using RMI, a design goal is to minimize the number of names in the registry. The client can obtain the name of one remote object from the registry, and other remote objects from that rmi server can be returned as values to the client. This is called "bootstrapping".
Example call to rebind for the main method in HelloImpl: Naming.rebind("HelloServer", obj);
Look at full example Hello.java and HelloImpl.java



© Northeast Parallel Architectures Center, Syracuse University, npac@npac.syr.edu

If you have any comments about this server, send e-mail to webmaster@npac.syr.edu.

Page produced by wwwfoil on Sun Nov 29 1998