use of org.gluu.persist.ldap.impl.LdapEntryManager in project oxTrust by GluuFederation.
the class AppInitializer method createLdapEntryManager.
@Produces
@ApplicationScoped
@Named(LDAP_ENTRY_MANAGER_NAME)
public LdapEntryManager createLdapEntryManager() {
FileConfiguration ldapConfig = configurationFactory.getLdapConfiguration();
Properties connectionProperties = (Properties) ldapConfig.getProperties();
EncryptionService securityService = encryptionServiceInstance.get();
Properties decryptedConnectionProperties = securityService.decryptProperties(connectionProperties);
LdapEntryManager ldapEntryManager = this.ldapEntryManagerFactory.createEntryManager(decryptedConnectionProperties);
log.info("Created {}: {}", new Object[] { LDAP_ENTRY_MANAGER_NAME, ldapEntryManager.getOperationService() });
return ldapEntryManager;
}
use of org.gluu.persist.ldap.impl.LdapEntryManager in project oxTrust by GluuFederation.
the class AppInitializer method recreateLdapEntryManager.
public void recreateLdapEntryManager(@Observes @LdapConfigurationReload String event) {
// Get existing application scoped instance
LdapEntryManager oldLdapEntryManager = CdiUtil.getContextBean(beanManager, LdapEntryManager.class, LDAP_ENTRY_MANAGER_NAME);
// Close existing connections
closeLdapEntryManager(oldLdapEntryManager);
// Force to create new bean
LdapEntryManager ldapEntryManager = ldapEntryManagerInstance.get();
ldapEntryManagerInstance.destroy(ldapEntryManager);
log.info("Recreated instance {}: {}", LDAP_ENTRY_MANAGER_NAME, ldapEntryManager);
}
use of org.gluu.persist.ldap.impl.LdapEntryManager in project oxTrust by GluuFederation.
the class AppInitializer method applicationInitialized.
/**
* Initialize components and schedule DS connection time checker
*/
public void applicationInitialized(@Observes @Initialized(ApplicationScoped.class) Object init) {
log.debug("Initializing application services");
showBuildInfo();
customLibrariesLoader.init();
createEntryManagerFactory();
configurationFactory.create();
LdapEntryManager localLdapEntryManager = ldapEntryManagerInstance.get();
initializeLdifArchiver(localLdapEntryManager);
// Initialize template engine
templateService.initTemplateEngine();
// Initialize SubversionService
subversionService.initSubversionService();
// Initialize python interpreter
pythonService.initPythonInterpreter(configurationFactory.getLdapConfiguration().getString("pythonModulesDir", null));
// Initialize Shibboleth
shibbolethInitializer.createShibbolethConfiguration();
// Initialize script manager
List<CustomScriptType> supportedCustomScriptTypes = Arrays.asList(CustomScriptType.CACHE_REFRESH, CustomScriptType.UPDATE_USER, CustomScriptType.USER_REGISTRATION, CustomScriptType.ID_GENERATOR, CustomScriptType.SCIM);
// Start timer
quartzSchedulerManager.start();
// Schedule timer tasks
metricService.initTimer();
configurationFactory.initTimer();
ldapStatusTimer.initTimer();
metadataValidationTimer.initTimer();
entityIDMonitoringService.initTimer();
cacheRefreshTimer.initTimer();
customScriptManager.initTimer(supportedCustomScriptTypes);
statusCheckerDaily.initTimer();
statusCheckerTimer.initTimer();
svnSyncTimer.initTimer();
logFileSizeChecker.initTimer();
loggerService.updateLoggerConfigLocation();
}
use of org.gluu.persist.ldap.impl.LdapEntryManager in project oxTrust by GluuFederation.
the class AppInitializer method recreateCentralLdapEntryManager.
public void recreateCentralLdapEntryManager(@Observes @LdapCentralConfigurationReload String event) {
// Get existing application scoped instance
LdapEntryManager oldCentralLdapEntryManager = CdiUtil.getContextBean(beanManager, LdapEntryManager.class, LDAP_CENTRAL_ENTRY_MANAGER_NAME);
// Close existing connections
closeLdapEntryManager(oldCentralLdapEntryManager);
// Force to create new bean
LdapEntryManager ldapCentralEntryManager = ldapCentralEntryManagerInstance.get();
ldapEntryManagerInstance.destroy(ldapCentralEntryManager);
log.info("Recreated instance {}: {}", LDAP_CENTRAL_ENTRY_MANAGER_NAME, ldapCentralEntryManager);
}
use of org.gluu.persist.ldap.impl.LdapEntryManager in project oxTrust by GluuFederation.
the class Configuration method createLdapEntryManager.
private LdapEntryManager createLdapEntryManager() {
Properties connectionProperties = (Properties) this.ldapConfiguration.getProperties();
Properties decryptedConnectionProperties = PropertiesDecrypter.decryptProperties(connectionProperties, this.cryptoConfigurationSalt);
LdapEntryManagerFactory ldapEntryManagerFactory = new LdapEntryManagerFactory();
LdapEntryManager ldapEntryManager = ldapEntryManagerFactory.createEntryManager(decryptedConnectionProperties);
logger.debug("Created LdapEntryManager: {}", ldapEntryManager);
return ldapEntryManager;
}
Aggregations