From d450a17d586da562acaffdf00257dc41efb76094 Mon Sep 17 00:00:00 2001 From: Gravit Date: Wed, 19 Dec 2018 18:54:23 +0700 Subject: [PATCH] =?UTF-8?q?=D0=9F=D1=80=D0=B0=D0=B2=D0=BA=D0=B8=20Hikari?= =?UTF-8?q?=20=D0=BA=D0=BE=D0=B4=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ru/gravit/launchserver/auth/MySQLSourceConfig.java | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/LaunchServer/src/main/java/ru/gravit/launchserver/auth/MySQLSourceConfig.java b/LaunchServer/src/main/java/ru/gravit/launchserver/auth/MySQLSourceConfig.java index 6a0c1321..11837fbd 100644 --- a/LaunchServer/src/main/java/ru/gravit/launchserver/auth/MySQLSourceConfig.java +++ b/LaunchServer/src/main/java/ru/gravit/launchserver/auth/MySQLSourceConfig.java @@ -105,19 +105,13 @@ public synchronized Connection getConnection() throws SQLException { Class.forName("com.zaxxer.hikari.HikariDataSource"); hikari = true; // Used for shutdown. Not instanceof because of possible classpath error HikariConfig cfg = new HikariConfig(); - cfg.setUsername(username); - cfg.setPassword(password); cfg.setDataSource(mysqlSource); cfg.setPoolName(poolName); - cfg.setMinimumIdle(0); cfg.setMaximumPoolSize(MAX_POOL_SIZE); - cfg.setIdleTimeout(TIMEOUT * 1000L); // Set HikariCP pool - HikariDataSource hikariSource = new HikariDataSource(cfg); // Replace source with hds - source = hikariSource; + source = new HikariDataSource(cfg); LogHelper.info("HikariCP pooling enabled for '%s'", poolName); - return hikariSource.getConnection(); } catch (ClassNotFoundException ignored) { LogHelper.warning("HikariCP isn't in classpath for '%s'", poolName); }