db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David W. Van Couvering" <David.Vancouver...@Sun.COM>
Subject Re: Auto-close of result sets on failure?
Date Sat, 04 Feb 2006 16:18:40 GMT
Thanks, Dan, I'll run a test.

David

Daniel John Debrunner wrote:
> David W. Van Couvering wrote:
> 
> 
>>There is a new metadata call, "autoCommitFailureClosesAllResultSets",
>>which returns true if a SQLException while autoCommit is true indicates
>>that all open ResultSets are closed, even ones that are holdable.
>>
>>In my naive scan of the code on the embedded side, it appears as though
>>we do *not* close result sets upon exception.  There is a method
>>clearResultSets() on EmbedStatement that is only called when the
>>statement itself is closed or when executing a new statement (we close
>>the old result sets from the previous invocation of the statement).
>>
>>Because of the asynchronous nature of the network client protocol, it's
>>a little harder to decode, but it appears that we do not close result
>>sets upon exception there either.
>>
>>Does anyone care to differ?  Otherwise I'll return false for this new
>>JDBC4 metadata call.
> 
> 
> I think I'll differ. :-)
> 
> In embedded I would think that all the ResultSets would be closed on an
> exception that causes a rollback in auto-commit mode. You may not see
> explict code, but the internal Derby objects the JDBC ResultSet depends
> on will be closed. At least I think it's that way, no idea for client.
> Seems like a simple test is in order.
> 
> Dan.
> 

Mime
View raw message