use of space.npstr.sqlsauce.DatabaseConnection in project Backend by FredBoat.
the class DatabaseManager method initMainDbConn.
private DatabaseConnection initMainDbConn() throws DatabaseException {
Flyway flyway = null;
if (this.migrateAndValidate) {
flyway = buildFlyway("classpath:com/fredboat/backend/quarterdeck/db/migrations/main");
}
DatabaseConnection databaseConnection = getBasicConnectionBuilder(MAIN_PERSISTENCE_UNIT_NAME, this.mainJdbc).setHibernateProps(buildHibernateProps("ehcache_main.xml")).addEntityPackage("com.fredboat.backend.quarterdeck.db.entities.main").setFlyway(flyway).build();
log.debug(CacheManager.getCacheManager("MAIN_CACHEMANAGER").getActiveConfigurationText());
return databaseConnection;
}
Aggregations