db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Knut Anders Hatlen (JIRA)" <derby-...@db.apache.org>
Subject [jira] Updated: (DERBY-1234) Verify that we raise SQLException when calling methods on closed java.sql objects
Date Fri, 05 May 2006 08:23:18 GMT
     [ http://issues.apache.org/jira/browse/DERBY-1234?page=all ]

Knut Anders Hatlen updated DERBY-1234:

    Attachment: derby-1234-cleanup1.diff

Patch derby-1234-cleanup1.diff addresses the issue raised by
Andreas. I removed checkIfClosed() from getColumn() since the error
message generated there is not as accurate as the ones generated in
the top-level methods. I also removed a call to checkStatus() in one
of the EmbedCallableStatement20 methods which would raise
SQLFeatureNotSupportedException anyway.

With this change, all of EmbedResultSet's get and update methods which
take a column number parameter, only invoke checkIfClosed() once. The
get and update methods that take a column name parameter invoke
checkIfClosed() twice. (This could be avoided by making private
unchecked methods that are called by both the column number methods
and the column name methods, but I'm afraid that would be ugly too.) I
feel this is an acceptable cost (I checked the client driver, and it
also checks twice for these methods) since the overhead of mapping a
column name to a column number is probably much higher than one single
test of a boolean variable. Andreas, are you satisfied with this

> Verify that we raise SQLException when calling methods on closed java.sql objects
> ---------------------------------------------------------------------------------
>          Key: DERBY-1234
>          URL: http://issues.apache.org/jira/browse/DERBY-1234
>      Project: Derby
>         Type: Improvement

>   Components: JDBC
>     Versions:
>     Reporter: Rick Hillegas
>     Assignee: Knut Anders Hatlen
>      Fix For:
>  Attachments: derby-1234-cleanup1.diff, derby-1234-cleanup1.stat, derby-1234-part1.diff,
derby-1234-part2.diff, derby-1234-part2.stat, derby-1234-part3.diff, derby-1234-part3.stat,
derby-1234-part4.diff, derby-1234-part4.stat, derby-1234-part5.diff, derby-1234-part5.stat,
derby-1234-v1.diff, derby-1234-v1.stat
> The next rev of the JDBC4 spec will clarify that databases should raise SQLException
when an application calls methods on closed sql objects: ResultSet, Preparedstatement, CallableStatement,
Connection, and Statement. We should verify that we conform.

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
For more information on JIRA, see:

View raw message