registry = LocateRegistry.createRegistry(getRmiRegistryPort(), null, registrySocketFactory);
HashMap<String, Object> env = new HashMap<String, Object>();
rmiServer = new RMIJRMPServerImpl(getRmiServerPort(), null, serverSocketFactory, env);
url = buildJMXServiceURL();
adapter = new RMIConnectorServer(url, env, rmiServer, injectedMBeanServer.getValue());
adapter.start();
registry.rebind(RMI_BIND_NAME, rmiServer.toStub());
} catch (Exception e) {
throw new StartException(e);
}