use of org.gluu.persist.PersistenceEntryManager in project oxAuth by GluuFederation.
the class AppInitializer method createPersistenceEntryManager.
@Produces
@ApplicationScoped
@Named(ApplicationFactory.PERSISTENCE_ENTRY_MANAGER_NAME)
public PersistenceEntryManager createPersistenceEntryManager() {
Properties connectionProperties = preparePersistanceProperties();
PersistenceEntryManager persistenceEntryManager = applicationFactory.getPersistenceEntryManagerFactory().createEntryManager(connectionProperties);
log.info("Created {}: {} with operation service: {}", new Object[] { ApplicationFactory.PERSISTENCE_ENTRY_MANAGER_NAME, persistenceEntryManager, persistenceEntryManager.getOperationService() });
externalPersistenceExtensionService.executePersistenceExtensionAfterCreate(connectionProperties, persistenceEntryManager);
return persistenceEntryManager;
}
use of org.gluu.persist.PersistenceEntryManager in project oxAuth by GluuFederation.
the class AppInitializer method applicationInitialized.
public void applicationInitialized(@Observes @Initialized(ApplicationScoped.class) Object init) {
log.debug("Initializing application services");
configurationFactory.create();
PersistenceEntryManager localPersistenceEntryManager = persistenceEntryManagerInstance.get();
log.trace("Attempting to use {}: {}", ApplicationFactory.PERSISTENCE_ENTRY_MANAGER_NAME, localPersistenceEntryManager.getOperationService());
GluuConfiguration newConfiguration = loadConfiguration(localPersistenceEntryManager, "oxIDPAuthentication", "oxAuthenticationMode");
this.persistenceAuthConfigs = loadPersistenceAuthConfigs(newConfiguration);
// Initialize python interpreter
pythonService.initPythonInterpreter(configurationFactory.getBaseConfiguration().getString("pythonModulesDir", null));
// Initialize script manager
List<CustomScriptType> supportedCustomScriptTypes = Lists.newArrayList(CustomScriptType.values());
supportedCustomScriptTypes.remove(CustomScriptType.CACHE_REFRESH);
supportedCustomScriptTypes.remove(CustomScriptType.UPDATE_USER);
supportedCustomScriptTypes.remove(CustomScriptType.USER_REGISTRATION);
supportedCustomScriptTypes.remove(CustomScriptType.SCIM);
supportedCustomScriptTypes.remove(CustomScriptType.IDP);
statService.init();
// Start timer
initSchedulerService();
// Schedule timer tasks
metricService.initTimer();
configurationFactory.initTimer();
loggerService.initTimer();
ldapStatusTimer.initTimer();
cleanerTimer.initTimer();
customScriptManager.initTimer(supportedCustomScriptTypes);
keyGeneratorTimer.initTimer();
statTimer.initTimer();
expirationNotificatorTimer.initTimer();
initTimer();
initCibaRequestsProcessor();
// Set default authentication method after
setDefaultAuthenticationMethod(newConfiguration);
// Notify plugins about finish application initialization
eventApplicationInitialized.select(ApplicationInitialized.Literal.APPLICATION).fire(new ApplicationInitializedEvent());
}
use of org.gluu.persist.PersistenceEntryManager in project oxAuth by GluuFederation.
the class LdapStatusTimer method processInt.
private void processInt() {
logConnectionProviderStatistic(ldapEntryManager, "connectionProvider", "bindConnectionProvider");
for (int i = 0; i < ldapAuthEntryManagers.size(); i++) {
PersistenceEntryManager ldapAuthEntryManager = ldapAuthEntryManagers.get(i);
logConnectionProviderStatistic(ldapAuthEntryManager, "authConnectionProvider#" + i, "bindAuthConnectionProvider#" + i);
}
}
Aggregations