Hi guys,

I think that the LdapConnectionFactory class is not only useless, but it's also a source of problem.

Methods such as :
    /**
     * Gets the core session connection.
     *
     * @return a connection based on the the CoreSession
     */
    public static LdapConnection getCoreSessionConnection()
    {
        try
        {
Class<?> cl = Class.forName( "org.apache.directory.server.core.api.LdapCoreSessionConnection" );
            return ( LdapConnection ) cl.newInstance();
        }
        catch ( Exception e )
        {
            throw new RuntimeException( e );
        }
    }

Are too dependent on the class name, and should not be used. If we change its name, we could be in trouble.

I suggest we get rid of this class and use the constructors instead.

--
Regards,
Cordialement,
Emmanuel Lécharny
www.iktek.com

Reply via email to