db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Peterson, John" <John.Peter...@pega.com>
Subject RE: Invalid XJ215 Error?
Date Thu, 27 Mar 2008 16:31:25 GMT
I am unable to locate in any JDBC specification
(http://java.sun.com/products/jdbc/download.html#102spec) the
requirement that a ResultSet should be closed when all of the rows
retrieved.  I also do not see this behavior with MSSQL (2000 or 2005),
or with Oracle (9 or 10).  Also, this functionality must have been
recently fixed or added for Derby 10.3 because I did not see this
behavior in Derby 10.2 or 10.1 either.


-----Original Message-----
From: Daniel John Debrunner [mailto:djd@apache.org] 
Sent: Thursday, March 27, 2008 11:24 AM
To: Derby Discussion
Subject: Re: Invalid XJ215 Error?

Peterson, John wrote:

> Would you agree that closing the ResultSet when the next() method 
> returns false is an undesirable side effect which conflicts with the 
> expected behavior, or have I overlooked something?

JDBC 3.0 & early mandated that the result set was closed when all of the

rows have been retrieved, that's the behaviour you are seeing. JDBC 4 
changed the rules for statement completion (in an incompatible way) and 
Derby has not reconciled the behaviour yet. The same code supports all 
the JDBC versions (with additional methods/classes added for newer 
versions) and traditionally the same behaviour was required across JDBC 
versions (e.g. JDBC 3 was a super-set of JDBC 2). No one has addressed 
requiring different behaviour for the same method across different JDBC 
versions. Changing the behaviour for JDBC 4 will also cause backwards 
compatibility issues for applications that change to Java 6.


View raw message