final AuthenticatorConfig config = new AuthenticatorConfig();
final GenericAuthenticatorConfig config = new GenericAuthenticatorConfig();
    public static AuthenticatorConfig getAuthenticatorConfig( String authenticatorName, Hashtable env )            throws NamingException    {        final StringBuffer buf = new StringBuffer();        final AuthenticatorConfig config = new AuthenticatorConfig();        // --------------------------------------------------------------------        // set id for authenticator        // --------------------------------------------------------------------        config.setAuthenticatorName( authenticatorName );        // --------------------------------------------------------------------        // set authenticator class        // --------------------------------------------------------------------        buf.setLength( 0 );        buf.append( EnvKeys.AUTHENTICATOR_CLASS ).append( authenticatorName );        String authenticatorClass = ( String ) env.get(  buf.toString() );        if ( authenticatorClass != null )        {            config.setAuthenticatorClass( authenticatorClass );        }        // --------------------------------------------------------------------        // set authenticator properties        // --------------------------------------------------------------------        buf.setLength( 0 );        buf.append( EnvKeys.AUTHENTICATOR_PROPERTIES ).append( authenticatorName );        String propertiesFile = ( String ) env.get(  buf.toString() );        if ( propertiesFile != null )        {            try            {                Properties properties = config.getProperties();                properties.load( new FileInputStream( propertiesFile ) );                config.setProperties( properties );            }            catch ( Exception e )            {                throw new NamingException( e.getMessage() );            }        }        return config;    }