cc.setName(config.getBindDN());
cc.setCredentials(config.getBindPassword());
}
PoolableLdapConnectionFactory factory = new PoolableLdapConnectionFactory(cc);
adminPool = new LdapConnectionPool(factory);
adminPool.setTestOnBorrow(true);
adminPool.setWhenExhaustedAction(GenericObjectPool.WHEN_EXHAUSTED_GROW);
// setup unbound connection pool. let's create a new version of the config
cc = createConnectionConfig();