All of a sudden, Ingres (or the Ingres JDBC driver) starts closing connections randomly...

This commit is contained in:
Lukas Eder 2013-11-01 16:00:36 +01:00
parent eab6c31dd0
commit 5cccc5d828

View File

@ -528,6 +528,17 @@ public abstract class jOOQAbstractTest<
@SuppressWarnings("unused")
public final Connection getConnection() {
try {
if (connectionInitialised && connection != null && connection.isClosed()) {
log.info("CONNECTION CLOSED", "Reconnecting...");
connectionInitialised = false;
connection = null;
}
}
catch (SQLException e) {
}
if (!connectionInitialised) {
connectionInitialised = true;
connection = getConnection0(null, null);