From af3d007e78246144f2f50aaadc05f81bae000f84 Mon Sep 17 00:00:00 2001 From: "David A. Madore" Date: Sun, 12 Oct 2014 18:46:56 +0200 Subject: Use JDBC4, in order to use the .isValid() method. Note that the PostgreSQL implementation does not have this in the 9.1-901 version. Try 9.2-1002 instead (sucks: this is not in Debian stable...). --- org/madore/damlengine/WeblogDatabaseConnection.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'org/madore/damlengine/WeblogDatabaseConnection.java') diff --git a/org/madore/damlengine/WeblogDatabaseConnection.java b/org/madore/damlengine/WeblogDatabaseConnection.java index dfacebb..1a1828d 100644 --- a/org/madore/damlengine/WeblogDatabaseConnection.java +++ b/org/madore/damlengine/WeblogDatabaseConnection.java @@ -21,7 +21,7 @@ public final class WeblogDatabaseConnection { public static Connection getConnection() throws SQLException { Connection conn = pconn.get(); - if ( conn == null || conn.isClosed() ) { + if ( conn == null || conn.isClosed() || ! conn.isValid(5) ) { String dbHost = null; if ( ! DamlEngine.runAsServlet ) dbHost = System.getenv("DAMLENGINE_PGHOST"); -- cgit v1.2.3