We clarified this in JDBC 4 spec

Once a ResultSet has been closed, any attempt to access any of its methods with
the exception of the isClosed method will result in a SQLException being
thrown. ResultSetMetaData instances that were created by a ResultSet that
has been closed are still accessible.

Knut Anders Hatlen wrote:
I discovered that the client driver throws SQLException if
getConcurrency() is called on a closed ResultSet, whereas embedded
does not throw exception. Which behaviour is correct? The JDBC javadoc
just says:

 Throws:
     SQLException - if a database access error occurs

I see other methods, like getWarnings(), where the javadoc explicitly
states that an exception should be thrown if the ResultSet is closed:

 Throws:
     SQLException - if a database access error occurs or this method
     is called on a closed result set

Reply via email to