Skip to content
This repository has been archived by the owner on Apr 9, 2021. It is now read-only.

Commit

Permalink
Remove obsolete tunnel configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
schnapster committed Mar 11, 2018
1 parent b84bdb3 commit e8b983b
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 12 deletions.
11 changes: 0 additions & 11 deletions Database/src/main/java/fredboat/db/DatabaseManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@
import space.npstr.sqlsauce.DatabaseConnection;
import space.npstr.sqlsauce.DatabaseException;
import space.npstr.sqlsauce.DatabaseWrapper;
import space.npstr.sqlsauce.ssh.SshTunnel;

import javax.annotation.Nullable;
import java.util.Properties;
Expand All @@ -60,12 +59,8 @@ public class DatabaseManager {
private final boolean migrateAndValidate;
private final String mainJdbc;
@Nullable
private final SshTunnel.SshDetails mainTunnel;
@Nullable
private final String cacheJdbc;
@Nullable
private final SshTunnel.SshDetails cacheTunnel;
@Nullable
private final DatabaseConnection.EntityManagerFactoryBuilder entityManagerFactoryBuilder;

@Nullable
Expand All @@ -90,19 +85,15 @@ public DatabaseManager(@Nullable HibernateStatisticsCollector hibernateStats,
String appName,
boolean migrateAndValidate,
String mainJdbc,
@Nullable SshTunnel.SshDetails mainTunnel,
@Nullable String cacheJdbc,
@Nullable SshTunnel.SshDetails cacheTunnel,
@Nullable DatabaseConnection.EntityManagerFactoryBuilder entityManagerFactoryBuilder) {
this.hibernateStats = hibernateStats;
this.hikariStats = hikariStats;
this.poolsize = poolsize;
this.appName = appName;
this.migrateAndValidate = migrateAndValidate;
this.mainJdbc = mainJdbc;
this.mainTunnel = mainTunnel;
this.cacheJdbc = cacheJdbc;
this.cacheTunnel = cacheTunnel;
this.entityManagerFactoryBuilder = entityManagerFactoryBuilder;

if (mainJdbc.isEmpty()) {
Expand Down Expand Up @@ -197,7 +188,6 @@ private DatabaseConnection initMainDbConn() throws DatabaseException {
DatabaseConnection databaseConnection = getBasicConnectionBuilder(MAIN_PERSISTENCE_UNIT_NAME, mainJdbc)
.setHibernateProps(buildHibernateProps("ehcache_main.xml"))
.addEntityPackage("fredboat.db.entity.main")
.setSshDetails(mainTunnel)
.setFlyway(flyway)
.build();

Expand All @@ -217,7 +207,6 @@ public DatabaseConnection initCacheConn(String jdbc) throws DatabaseException {
DatabaseConnection databaseConnection = getBasicConnectionBuilder(CACHE_PERSISTENCE_UNIT_NAME, jdbc)
.setHibernateProps(buildHibernateProps("ehcache_cache.xml"))
.addEntityPackage("fredboat.db.entity.cache")
.setSshDetails(cacheTunnel)
.setFlyway(flyway)
.build();

Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ subprojects {
napsterAnnotations = '0.0.1'

//database deps
sqlsauceVersion = '0.0.11'
sqlsauceVersion = '0.0.13'
hibernateVersion = '5.2.13.Final'
flywayVersion = '5.0.7'
dsProxyVersion = '1.4.6'
Expand Down

0 comments on commit e8b983b

Please sign in to comment.