db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel John Debrunner <...@debrunners.com>
Subject Re: DERBY-213 Early Patch
Date Thu, 30 Jun 2005 13:50:40 GMT
Philip Wilder wrote:


> In regards to your last challenge, I am inclined to agree with your
> position. If we consistently follow the specs over the javadocs that is
> one less point for confusion. However as Kathey points out, this may
> mean that there are "bugs" in the javadocs. If we adopt this philosophy
> then we can simplify the advanced cases I specified in my auto-commit
> document. One item I would really like to see in the JDBC 4.0 spec is
> changing this item found in section 9.1 (in relation to closing
> ResultSets):
> "if the cursor is forward only, then when invocation of its next method
> returns false"
> to this
> "if the cursor is forward only, then when invocation of its next method
> returns false. Further calls to next method on this ResultSet will throw
> an Exception."
> if this is what is truly meant. If this is the case then Embedded is not
> functioning to spec and Client (at least in part) is doing what it is
> suppose to (from this it follows that SQuirreL is also not following the
> spec). If not, the reverse is true.

I don't think the JDBC spec (4.0 section 9.1, or 3.0 section 10.1) needs
to be changed as you describe. The comment "if the cursor is forward
only, then when invocation of its next method returns false" is
describing when a ResultSet is closed.

The question then becomes what should the behaviour of a ResultSet be if
it is closed? For Statement and Connection objects is it required that
most methods throw exceptions if they are closed. I'm not sure where
this is defined, but I know Cloudscape followed it once we started
running the JDBC portion of the J2EE TCK. See StmtCloseFunTest.java

Dan.






Mime
View raw message