Return-Path: Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: (qmail 71355 invoked from network); 23 Mar 2006 18:34:43 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 23 Mar 2006 18:34:43 -0000 Received: (qmail 53103 invoked by uid 500); 23 Mar 2006 18:34:42 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 52889 invoked by uid 500); 23 Mar 2006 18:34: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 52880 invoked by uid 99); 23 Mar 2006 18:34:41 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 23 Mar 2006 10:34:41 -0800 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from [192.87.106.226] (HELO ajax.apache.org) (192.87.106.226) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 23 Mar 2006 10:34:40 -0800 Received: from ajax (localhost.localdomain [127.0.0.1]) by ajax.apache.org (Postfix) with ESMTP id BC0B4D4A02 for ; Thu, 23 Mar 2006 18:34:19 +0000 (GMT) Message-ID: <268690066.1143138859767.JavaMail.jira@ajax> Date: Thu, 23 Mar 2006 18:34:19 +0000 (GMT) From: "Daniel John Debrunner (JIRA)" To: derby-dev@db.apache.org Subject: [jira] Commented: (DERBY-953) Add miscellaneous Statement methods introduced by JDBC 4 In-Reply-To: <1887814093.1139614258959.JavaMail.jira@ajax.apache.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 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 [ http://issues.apache.org/jira/browse/DERBY-953?page=comments#action_12371608 ] Daniel John Debrunner commented on DERBY-953: --------------------------------------------- Not really sure what explanations you are looking for David, I just clarified the javadoc comments for EmbedStatement.checkStatus and checkExecStatus based upon a few minutes of code inspection. Modifying the javadoc firms up the contract this method is exposing and thus the code in isClosed() is allowed to make assumptions based upon that contract. The checkExecStatus method only throws execeptions in two cases, one the statement is closed and two the statement is part of a non-active global transaction. In either of those two cases and the no exception case after the execution the active field correctly represents the open state of the Statement. One exception thrown is the NO_CURRENT_CONNECTION sql state, means either : the Statement is open but in a suspended transaction (isClosed needs to return false) the Statement has been closed implicitly due to its connection being closed and this is the first call against the Statement that has noticed the connection has been closed. (isClosed needs to return true) The other is ALREADY_CLOSED, means either : the Statement has been explictly closed (isClosed needs to return true) the Statement has been closed implicitly and a previous checkExecStatus threw a NO_CURRENT_CONNECTION (isClosed needs to return true) Thus only catching NO_CURRENT_CONNECTION would be wrong as ALREADY_CLOSED is a valid exception that could occur here and require isClosed() to return true. Thus we are left with needing to catch the two exceptions that this method can throw, which seems, to me, to be the same as catching everything. > Add miscellaneous Statement methods introduced by JDBC 4 > -------------------------------------------------------- > > Key: DERBY-953 > URL: http://issues.apache.org/jira/browse/DERBY-953 > Project: Derby > Type: New Feature > Components: JDBC > Reporter: Rick Hillegas > Assignee: Kristian Waagan > Fix For: 10.2.0.0 > Attachments: DERBY-953-1a.diff, DERBY-953-1a.stat, DERBY-953-2a.diff, DERBY-953-3a.diff > > As described in the JDBC 4 spec, sections 13.1 and 3.1. > This adds support for new Statement methods added by JDBC4 and not addressed by other JIRAs: isClosed() and getResultSetHoldability(). -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira