Pb description (issue #648):
The Jmx connector handler is starting a local RMI registry on port 1689 (actually the port specified in the config.ldif file). Even if you stop the DS server, but if the process is keeping alive, the RMI registry will remain active and will still listen on this port.
Fix:
Instead of using the default factory to get the RMI registry, we use our own socketFactory and keep a reference to the created socket. At server shutdown time, this socket is closed and the RMI registry Remote Object is 'unexported'
Modified Class
org.opends.server.protocols.jmx.RmiConnector
New Class
org.opends.server.protocols.jmx.OpendsRmiServerSocketFactory