Return-Path: Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: (qmail 79827 invoked from network); 4 Feb 2006 02:07:42 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 4 Feb 2006 02:07:42 -0000 Received: (qmail 73767 invoked by uid 500); 4 Feb 2006 02:07:41 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 73683 invoked by uid 500); 4 Feb 2006 02:07:41 -0000 Mailing-List: contact derby-dev-help@db.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: Delivered-To: mailing list derby-dev@db.apache.org Received: (qmail 73674 invoked by uid 99); 4 Feb 2006 02:07:41 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 03 Feb 2006 18:07:41 -0800 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: neutral (asf.osuosl.org: local policy) Received: from [68.142.198.203] (HELO smtp104.sbc.mail.mud.yahoo.com) (68.142.198.203) by apache.org (qpsmtpd/0.29) with SMTP; Fri, 03 Feb 2006 18:07:40 -0800 Received: (qmail 20098 invoked from network); 4 Feb 2006 02:07:19 -0000 Received: from unknown (HELO ?127.0.0.1?) (ddebrunner@sbcglobal.net@71.131.247.194 with plain) by smtp104.sbc.mail.mud.yahoo.com with SMTP; 4 Feb 2006 02:07:19 -0000 Message-ID: <43E40C30.5060109@apache.org> Date: Fri, 03 Feb 2006 18:06:40 -0800 From: Daniel John Debrunner User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.3) Gecko/20040910 X-Accept-Language: en-us, en, de MIME-Version: 1.0 To: derby-dev@db.apache.org Subject: Re: Auto-close of result sets on failure? References: <43E3DEFB.4000606@sun.com> In-Reply-To: <43E3DEFB.4000606@sun.com> X-Enigmail-Version: 0.90.0.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N 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.