--- a/java/sql-dk/src/info/globalcode/sql/dk/DatabaseConnection.java Thu Dec 26 01:05:24 2013 +0100
+++ b/java/sql-dk/src/info/globalcode/sql/dk/DatabaseConnection.java Thu Dec 26 01:24:21 2013 +0100
@@ -120,6 +120,17 @@
}
+ /**
+ * Tests if this connection is live.
+ *
+ * @return true if test was successful
+ * @throws SQLException if test fails
+ */
+ public boolean test() throws SQLException {
+ connection.getAutoCommit();
+ return true;
+ }
+
@Override
public void close() throws SQLException {
connection.close();