String rmiHost = serviceURL.getHost();
int rmiPort = serviceURL.getPort();
// create new connector server and start it
RMIServerSocketFactory serverSocketFactory = new DefaultSocketFactory(InetAddress.getByName(rmiHost));
RMIServerImpl rmiServer = new RMIJRMPServerImpl(rmiPort, null, serverSocketFactory, null);
connectorServer = new RMIConnectorServer(serviceURL, null, rmiServer, mbeanServer);
log.debug("JMXConnectorServer created: " + serviceURL);
connectorServer.start();
rmiRegistry.rebind("jmxrmi", rmiServer.toStub());
log.debug("JMXConnectorServer started: " + serviceURL);
}