1.1 --- a/java/sql-dk/src/info/globalcode/sql/dk/DatabaseConnection.java Thu Dec 26 01:05:24 2013 +0100
1.2 +++ b/java/sql-dk/src/info/globalcode/sql/dk/DatabaseConnection.java Thu Dec 26 01:24:21 2013 +0100
1.3 @@ -120,6 +120,17 @@
1.4
1.5 }
1.6
1.7 + /**
1.8 + * Tests if this connection is live.
1.9 + *
1.10 + * @return true if test was successful
1.11 + * @throws SQLException if test fails
1.12 + */
1.13 + public boolean test() throws SQLException {
1.14 + connection.getAutoCommit();
1.15 + return true;
1.16 + }
1.17 +
1.18 @Override
1.19 public void close() throws SQLException {
1.20 connection.close();