use of org.gluu.persist.ldap.operation.impl.LdapOperationsServiceImpl in project oxCore by GluuFederation.
the class LdapEntryManagerFactory method createEntryManager.
@Override
public LdapEntryManager createEntryManager(Properties conf) {
LdapConnectionProvider connectionProvider = new LdapConnectionProvider(conf);
if (!connectionProvider.isCreated()) {
throw new ConfigurationException(String.format("Failed to create LDAP connection pool! Result code: '%s'", connectionProvider.getCreationResultCode()));
}
LOG.debug("Created connectionProvider '{}' with code '{}'", connectionProvider, connectionProvider.getCreationResultCode());
LdapConnectionProvider bindConnectionProvider = new LdapAuthConnectionProvider(conf);
if (!bindConnectionProvider.isCreated()) {
throw new ConfigurationException(String.format("Failed to create LDAP bind connection pool! Result code: '%s'", bindConnectionProvider.getCreationResultCode()));
}
LOG.debug("Created bindConnectionProvider '{}' with code '{}'", bindConnectionProvider, bindConnectionProvider.getCreationResultCode());
LdapEntryManager ldapEntryManager = new LdapEntryManager(new LdapOperationsServiceImpl(connectionProvider, bindConnectionProvider));
LOG.info("Created LdapEntryManager: {}", ldapEntryManager.getOperationService());
return ldapEntryManager;
}
Aggregations