if(log.isInfoEnabled()) {
log.info("starting JMXConnector on host " + hostname + ":" + rmiRegistryPort);
}
DefaultClientSocketFactory clientSocketFactory = new DefaultClientSocketFactory();
clientSocketFactory.setBindAddress(hostname);
DefaultSocketFactory serverSocketFactory = new DefaultSocketFactory();
serverSocketFactory.setBindAddress(hostname);
registry = LocateRegistry.createRegistry(rmiRegistryPort, clientSocketFactory, serverSocketFactory);
HashMap env = new HashMap();
if( securityDomain != null)
env.put(RMIConnectorServer.AUTHENTICATOR, new JMXConnectorAuthenticator( securityDomain) );
// note: don't pass clientSocketFactory to RMIJRMPServerImpl ctor or JBAS-7933 regression will occur.