O'Reilly logo

Java RMI by William Grosso

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Limitations of the RMI Registry

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:

It’s easy to administer

The standard download of the JDK provides an application called rmiregistry. To launch the RMI registry, you simply run that application. After which, you don’t need to do anything else.

It’s easy for clients to find

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 java.rmi.Naming class. All the client really needs to know about the RMI registry is the machine on which it runs.

It’s easy for clients to use

The interface to the RMI registry consists of just five easily understood methods. In addition, these methods have reasonable default arguments.

It’s fast

The five methods are all very fast.

These are all good for an important piece of infrastructure[74] 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( ) ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required