Uploaded image for project: 'Directory ApacheDS'
  1. Directory ApacheDS
  2. DIRSERVER-588

ldap server is never shut down, since ldapStarted flag is never set

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 1.0-RC1
    • 1.0-RC4, 1.5.0
    • ldap
    • None

    Description

      Class org.apache.directory.server.jndi.ServerContextFactory

      internally uses a flag ldapStarted (and ldapsStarted which I think suffers of the same problem)
      that probably should be set when ldap is started, otherwise the ldap server will not shut down when in SeverContextFactory.afterShutdown(...)

      I Fixed the code for my purposes and hope you will be able to make use of it:

      In ServerContextFactory.startLDAPS( ServerStartupConfiguration, Hashtable):
      ...
      chain = ( IoFilterChainBuilder ) Class.forName( "org.apache.directory.server.ssl.LdapsInitializer", true,
      ServerContextFactory.class.getClassLoader() ).getMethod( "init", new Class[]

      { ServerStartupConfiguration.class }

      ).invoke( null, new Object[]

      { cfg }

      );
      ldapsStarted=true;//FIX Geospa added this line
      ...

      In ServerContextFactory.startLDAP0( ServerStartupConfiguration, Hashtable):
      ...
      tcpAcceptor.bind( new InetSocketAddress( port ), protocolProvider.getHandler(), acceptorCfg );
      ldapStarted=true;//FIX Geospa added this line
      ...

      Attachments

        Activity

          People

            akarasulu Alex Karasulu
            geospa George Spalding
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: