directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Emmanuel Lecharny" <>
Subject LdapServer init in BigBang
Date Fri, 19 Oct 2007 12:56:44 GMT

while removing the SASL chain, I had some problem with some access to
DirectoryService instance. As the BindHandler were initialized in the
LdapServer constructor, the DirectoryService is null as it is
initialized after.

What I suggest is to initialize the default handler in the
LdapServer.start() method,
just before the server launch :

         * The serveur is now initialized, we can
         * install the default requests handlers, which need
         * access to the DirectoryServer instance.

        startLDAP0( getIpPort(), chain );

        started = true;

Here, the installDefauktHandlers() method will install the default
handlers if no specific handler has been installed :

     * Install the LDAP request handlers.
    private void installDefaultHandlers()
        if ( getAbandonHandler() == null )
            setAbandonHandler( new DefaultAbandonHandler() );


I have tested this approach, and it works perfectly well, and let the
user define its own handler in a embedded server.

I will commit this code in bigbang branch, but if anyone has a better
solution, I would be glad to revert this code !

Emmanuel L├ęcharny

View raw message