According to the specification, no exception should be thrown in isValid when the connection is closed (see http://docs.oracle.com/javase/6/docs/api/java/sql/Connection.html#isValid%28int%29)