if ( log.isDebugEnabled() ) { log.debug( "Adding interceptor " + cfg.getName() ); }
    public synchronized void init( DirectoryServiceConfiguration factoryCfg ) throws NamingException    {        this.factoryCfg = factoryCfg;        // Initialize tail first.        FINAL_INTERCEPTOR.init( factoryCfg, null );        // And register and initialize all interceptors        ListIterator i = factoryCfg.getStartupConfiguration().getInterceptorConfigurations().listIterator();        Interceptor interceptor = null;        try        {            while( i.hasNext() )            {                InterceptorConfiguration cfg = ( InterceptorConfiguration ) i.next();                register( cfg );            }        }        catch ( Throwable t )        {            // destroy if failed to initialize all interceptors.            destroy();            if ( t instanceof NamingException )            {                throw ( NamingException ) t;            }            else            {                throw new InterceptorException( interceptor, "Failed to initialize interceptor chain.", t );            }        }    }