{
for (int i = 0; i < protocolHandlers.size(); i++)
{
try
{
final ProtocolHandler protocolHandler = (ProtocolHandler) protocolHandlers.get(i);
Home home = (Home) getHomes().get(i);
setProperty(protocolHandler, "address", home.host);
setProperty(protocolHandler, "port", "" + home.port);
//TODO: -TME - Should not have to hard set this every time. Should
// be a way to figure out if this is needed or not.
// Need to set the MBeanServer to use since there is no direct way to do it.
setProperty(protocolHandler, "locator", getLocator().getLocatorURI());
RemotingSSLImplementation.setMBeanServer(getLocator().getLocatorURI(), getMBeanServer());
ServerSocketFactory svrSocketFactory = getServerSocketFactory();
if(svrSocketFactory != null)
{
RemotingServerSocketFactory.setServerSocketFactory(getLocator().getLocatorURI(), svrSocketFactory);
setProperty(protocolHandler, "SocketFactory", RemotingServerSocketFactory.class.getName());
}
try
{
AccessController.doPrivileged( new PrivilegedExceptionAction()
{
public Object run() throws Exception
{
protocolHandler.init();
protocolHandler.start();
return null;
}
});
}
catch (PrivilegedActionException e)