Game uses hikaricp for all connection pooling. Connection count set dynamically.

This commit is contained in:
2023-05-20 09:39:23 -04:00
parent 3c5ffed352
commit 0e4490576a
16 changed files with 136 additions and 184 deletions
+8 -7
View File
@@ -11,6 +11,7 @@ package engine.db.archive;
import engine.Enum;
import engine.Enum.RecordEventType;
import engine.gameManager.DbManager;
import engine.objects.Guild;
import engine.workthreads.WarehousePushThread;
@@ -164,16 +165,16 @@ public class GuildRecord extends DataRecord {
public void write() {
try (Connection connection = DataWarehouse.connectionPool.getConnection();
PreparedStatement statement = this.buildGuildInsertStatement(connection)) {
try (Connection connection = DbManager.getConnection();
PreparedStatement statement = this.buildGuildInsertStatement(connection)) {
statement.execute();
statement.execute();
} catch (SQLException e) {
e.printStackTrace();
}
} catch (SQLException e) {
e.printStackTrace();
}
}
}
private PreparedStatement buildGuildInsertStatement(Connection connection) throws SQLException {