Add HikariCP connection pool for MySQL (#86)
* Add HikariCP connection pool for MySQL * Make code more compatible with connection pooling - Remove connection caching in Process/Consumer - Use try-with-resources to make sure Connections always get closed, even in when an Exception occurs. * Disable SSL for MySQL
This commit is contained in:
parent
2d90f9cc08
commit
fc99c24a0a
15 changed files with 157 additions and 200 deletions
|
|
@ -151,10 +151,9 @@ public class Patch {
|
|||
int result = -1;
|
||||
patching = true;
|
||||
|
||||
try {
|
||||
try (Connection connection = Database.getConnection(true, 0)) {
|
||||
boolean patched = false;
|
||||
boolean allPatches = true;
|
||||
Connection connection = Database.getConnection(true, 0);
|
||||
Statement statement = connection.createStatement();
|
||||
Integer[] newVersion = lastVersion;
|
||||
|
||||
|
|
@ -221,7 +220,6 @@ public class Patch {
|
|||
}
|
||||
|
||||
statement.close();
|
||||
connection.close();
|
||||
}
|
||||
catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue