Next: Structure and exported Objects
Up: RMI Communication Service
Previous: RMI Communication Service
  Contents
The RMI registry is a very important part of the RMI communication. Without
it there is no remote method invocation possibly. Normally you have to start
the RMI registry manually as a separate program which ships with the JDK or
JRE (Java Runtime Environment), but you can also start it automatically from
your application. To start the RMI registry manually has a few advantages. It
is separate from the Agent System. When the Agent System goes down the RMI registry
keeps running and is able to serve other Agent Systems residing on this machine.
If the registry is built in one Agent System and there are more Agent Systems
running on the same machine, the others loose their capability to communicate
through RMI when the System with the RMI registry is going down. The disadvantages
are the following. First it is easier to use the built in registry because this
does not require any user input. The built in registry is automatically started
when no other RMI registry is running. The second advantage is the use of different
ports for the RMI registry. The standard port is 1099 but if you have more then
one application running on the same machine which is using the RMI services,
it is a good idea to start different registry for the different applications.
These registry are listening on different ports. If you use the built in registry
(which is recommended) you can give a port in the configuration file and do
not have to worry about the other registries running on the same machine with
e.g. different CLASSPATHs. It could be a task for the future to re-run a new
RMI registry if an Agent System cannot connect to the one running on its machine.
This would be a very fail - safe construct.
Next: Structure and exported Objects
Up: RMI Communication Service
Previous: RMI Communication Service
  Contents
Thomas Letsch
2001-02-21