ldapStarted = true;
    private void startLDAP0( ServerStartupConfiguration cfg, Hashtable env, int port,        IoFilterChainBuilder chainBuilder ) throws LdapNamingException, LdapConfigurationException    {        // Register all extended operation handlers.        LdapProtocolProvider protocolProvider = new LdapProtocolProvider( cfg, ( Hashtable ) env.clone() );        for ( Iterator i = cfg.getExtendedOperationHandlers().iterator(); i.hasNext(); )        {            ExtendedOperationHandler h = ( ExtendedOperationHandler ) i.next();            protocolProvider.addExtendedOperationHandler( h );            log.info( "Added Extended Request Handler: " + h.getOid() );            h.setLdapProvider( protocolProvider );            PartitionNexus nexus = directoryService.getConfiguration().getPartitionNexus();            nexus.registerSupportedExtensions( h.getExtensionOids() );        }        try        {            // Disable the disconnection of the clients on unbind            SocketAcceptorConfig acceptorCfg = new SocketAcceptorConfig();            acceptorCfg.setDisconnectOnUnbind( false );            acceptorCfg.setReuseAddress( true );            acceptorCfg.setFilterChainBuilder( chainBuilder );            ((SocketSessionConfig)(acceptorCfg.getSessionConfig())).setTcpNoDelay( true );                        tcpAcceptor.bind( new InetSocketAddress( port ), protocolProvider.getHandler(), acceptorCfg );            if ( log.isInfoEnabled() )            {                log.info( "Successful bind of an LDAP Service (" + port + ") is complete." );            }        }        catch ( IOException e )        {            String msg = "Failed to bind an LDAP service (" + port + ") to the service registry.";            LdapConfigurationException lce = new LdapConfigurationException( msg );            lce.setRootCause( e );            log.error( msg, e );            throw lce;        }    }