How do I communicate over a secure RMI link?
The naming registry is implemented as a standard RMI service, so attempts to register and lookup services will involve network connections being established. With an SSL socket factory installed in a client these connections will be SSL-secured. As a result, the naming registry must use SSL to accept connections. For this reason you must install the SSL socket factory in your naming registry as well as your RMI server. The most straightforward way to achieve this is to have your server start its own naming registry. This registry will then benefit from the server's SSL support.
RMISocketFactory.setSocketFactory (some vendor provided factory);
Note : In other words the vendors provide a SSL implementation of the registry that needs to be started instead of the rmiregisty in case you are not programmatically statring the registry through a LocateRegistry.createRegistry().