ServerStartupConfiguration cfg = ( ServerStartupConfiguration ) service.getConfiguration();
ServerStartupConfiguration cfg = ( ServerStartupConfiguration ) service.getConfiguration().getStartupConfiguration();
    public void afterShutdown( DirectoryService service )    {        ServerStartupConfiguration cfg = ( ServerStartupConfiguration ) service.getConfiguration();                if ( ldapStarted )        {            stopLDAP0( cfg.getLdapPort() );            ldapStarted = false;        }        if ( ldapsStarted )        {            stopLDAP0( cfg.getLdapsPort() );            ldapsStarted = false;        }        if ( tcpKdcServer != null )        {            tcpKdcServer.destroy();            if ( log.isInfoEnabled() )            {                log.info( "Unbind of KRB5 Service (TCP) complete: " + tcpKdcServer );            }            tcpKdcServer = null;        }        if ( udpKdcServer != null )        {            udpKdcServer.destroy();            if ( log.isInfoEnabled() )            {                log.info( "Unbind of KRB5 Service (UDP) complete: " + udpKdcServer );            }            udpKdcServer = null;        }        if ( tcpChangePasswordServer != null )        {            tcpChangePasswordServer.destroy();            if ( log.isInfoEnabled() )            {                log.info( "Unbind of Change Password Service (TCP) complete: " + tcpChangePasswordServer );            }            tcpChangePasswordServer = null;        }        if ( udpChangePasswordServer != null )        {            udpChangePasswordServer.destroy();            if ( log.isInfoEnabled() )            {                log.info( "Unbind of Change Password Service (UDP) complete: " + udpChangePasswordServer );            }            udpChangePasswordServer = null;        }        if ( tcpNtpServer != null )        {            tcpNtpServer.destroy();            if ( log.isInfoEnabled() )            {                log.info( "Unbind of NTP Service (TCP) complete: " + tcpNtpServer );            }            tcpNtpServer = null;        }        if ( udpNtpServer != null )        {            udpNtpServer.destroy();            if ( log.isInfoEnabled() )            {                log.info( "Unbind of NTP Service complete: " + udpNtpServer );            }            udpNtpServer = null;        }    }