/** * Default no-argument constructor that initializes the backing {@link #getEnvironment() environment template} with * the {@link #setContextFactoryClassName(String) contextFactoryClassName} equal to * {@code com.sun.jndi.ldap.LdapCtxFactory} (the Sun/Oracle default) and the default * {@link #setReferral(String) referral} behavior to {@code follow}. */ public JndiLdapContextFactory() { this.environment = new HashMap<String, Object>(); setContextFactoryClassName(DEFAULT_CONTEXT_FACTORY_CLASS_NAME); setReferral(DEFAULT_REFERRAL); poolingEnabled = true; }
@Test public void testReferral() { String referral = "throw"; factory.setReferral(referral); assertEquals(referral, factory.getReferral()); }
/** * Default no-argument constructor that initializes the backing {@link #getEnvironment() environment template} with * the {@link #setContextFactoryClassName(String) contextFactoryClassName} equal to * {@code com.sun.jndi.ldap.LdapCtxFactory} (the Sun/Oracle default) and the default * {@link #setReferral(String) referral} behavior to {@code follow}. */ public JndiLdapContextFactory() { this.environment = new HashMap<String, Object>(); setContextFactoryClassName(DEFAULT_CONTEXT_FACTORY_CLASS_NAME); setReferral(DEFAULT_REFERRAL); poolingEnabled = true; }
/** * Default no-argument constructor that initializes the backing {@link #getEnvironment() environment template} with * the {@link #setContextFactoryClassName(String) contextFactoryClassName} equal to * {@code com.sun.jndi.ldap.LdapCtxFactory} (the Sun/Oracle default) and the default * {@link #setReferral(String) referral} behavior to {@code follow}. */ public JndiLdapContextFactory() { this.environment = new HashMap<String, Object>(); setContextFactoryClassName(DEFAULT_CONTEXT_FACTORY_CLASS_NAME); setReferral(DEFAULT_REFERRAL); poolingEnabled = true; }
contextFactory.setUrl( parseLdapServerUrl( config.get( SecuritySettings.ldap_server ) ) ); contextFactory.setAuthenticationMechanism( config.get( SecuritySettings.ldap_authentication_mechanism ) ); contextFactory.setReferral( config.get( SecuritySettings.ldap_referral ) ); contextFactory.setSystemUsername( config.get( SecuritySettings.ldap_authorization_system_username ) ); contextFactory.setSystemPassword( config.get( SecuritySettings.ldap_authorization_system_password ) );