At first glance, the RMI registry might seem like a nice solution to the problem of bootstrapping a distributed application. As a piece of software, it has many nice properties. Among its chief virtues:
download of the JDK provides an application called
launch the RMI registry, you simply run that
application. After which, you don’t need to do
The RMI registry has a standard port (1099)
on which it usually runs. Moreover, clients don’t
need to get a stub to the registry—they simply use
static methods defined in the
All the client really needs to know about the RMI
registry is the machine on which it runs.
The interface to the RMI registry consists of just five easily understood methods. In addition, these methods have reasonable default arguments.
The five methods are all very fast.
These are all good for an important piece of infrastructure such as a naming service to provide. The question, however, remains: is the RMI registry a good naming service?
In order to answer this question, consider the printer client again. Suppose we want to print a document. To do this, our application needs to do two things. It must find a printer server and then send a document to the printer server.
In the last section, we discussed how to
find a printer from a registry using the
list( ) and
lookup( ) ...