use of io.jans.orm.sql.operation.impl.SqlOperationServiceImpl in project jans by JanssenProject.
the class SqlEntryManagerFactory method createEntryManager.
@Override
public SqlEntryManager createEntryManager(Properties conf) {
Properties entryManagerConf = PropertiesHelper.filterProperties(conf, "#");
SqlConnectionProvider connectionProvider = new SqlConnectionProvider(entryManagerConf);
connectionProvider.create();
if (!connectionProvider.isCreated()) {
throw new ConfigurationException(String.format("Failed to create SQL connection pool! Result code: '%s'", connectionProvider.getCreationResultCode()));
}
LOG.debug("Created connectionProvider '{}' with code '{}'", connectionProvider, connectionProvider.getCreationResultCode());
SqlEntryManager sqlEntryManager = new SqlEntryManager(new SqlOperationServiceImpl(entryManagerConf, connectionProvider));
LOG.info("Created SqlEntryManager: {}", sqlEntryManager.getOperationService());
return sqlEntryManager;
}
Aggregations