Set pool's minimum idle connections to 2 and gave the pool a name

This commit is contained in:
Ammar Askar
2015-03-21 20:46:13 +05:00
parent 448b11b35e
commit 35cf735141

View File

@ -18,6 +18,9 @@ public class MySQLConnectionPool implements Closeable
ds.setUsername(user);
ds.setPassword(password);
ds.setMinimumIdle(2);
ds.setPoolName("LogBlock-Connection-Pool");
ds.addDataSourceProperty("useUnicode", "true");
ds.addDataSourceProperty("characterEncoding", "utf-8");
ds.addDataSourceProperty("rewriteBatchedStatements", "true");