What's new in RMI under Java 2?

Govind Seshadri

Java 2 SDK adds significant enhancements to the RMI implementation found within JDK 1.1. The most important changes are:

  • Under JDK 1.1, RMI servers have to be up and running all the time, and could not be started 'on demand'. Java 2 adds Remote Object Activation framework to RMI. It is now possible to instantiate server objects "on the fly," making it possible to build even more scalable distributed object networks.
  • Java 2 allows you to implement Custom Socket Types making it simpler to incorporate SSL encryption, data compression and so forth at the transport level. With JDK 1.1, the RMI socket factory could use only one custom socket type per JVM. You also had to use a different rmiregistry for each custom socket implemented by an RMI server. Now, all those limitations are removed.
  • There have been numerous other API changes as well. For instance, you can now unexport a remote object, as well as export a object on a specific port. Also, the RMI transport protocol JRMP has been significantly streamlined, and server-side skeletons are no longer necessary under Java 2. For an exhaustive list of changes, consult the release notes at http://java.sun.com/products/jdk/1.2/docs/guide/rmi/relnotes.html