Another gripe: "InValid" method
"IsValid" method in JDBC spec is not functional (simply throws an exception).
http://download.oracle.com/javase/6/docs/api/java/sql/Connection.html#isValid(int)
This means users have to write their own routine to test if the connection is still successfully running. Example, run
aquery like "SELECT 1 = 1;" where you ignore the results -- you just look to see if errors occurred.
Spec:
-----
Returns true if the connection has not been closed and is still valid. The driver shall submit a query on the
connectionor use some other mechanism that positively verifies the connection is still valid when this method is
called.
-----
Current code in "AbstractJdbc4Connection.java" of "postgresql-jdbc-9.0-801.src":
-----
public boolean isValid(int timeout) throws SQLException
{
checkClosed();
throw org.postgresql.Driver.notImplemented(this.getClass(), "isValid(int)");
}
-----
--Basil Bourque