Return-Path: Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: (qmail 40406 invoked from network); 8 Oct 2007 17:52:09 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 8 Oct 2007 17:52:09 -0000 Received: (qmail 24577 invoked by uid 500); 8 Oct 2007 17:48:07 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 24552 invoked by uid 500); 8 Oct 2007 17:48:07 -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 24541 invoked by uid 99); 8 Oct 2007 17:48:07 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 08 Oct 2007 10:48:07 -0700 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO brutus.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 08 Oct 2007 17:48:10 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 9FB11714159 for ; Mon, 8 Oct 2007 10:47:50 -0700 (PDT) Message-ID: <9698382.1191865670621.JavaMail.jira@brutus> Date: Mon, 8 Oct 2007 10:47:50 -0700 (PDT) From: "Knut Anders Hatlen (JIRA)" To: derby-dev@db.apache.org Subject: [jira] Commented: (DERBY-3115) With embedded driver and autocommit, when closing a connection, updates on updatable result set are lost, unless result set is closed In-Reply-To: <1371482.1191845450832.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/DERBY-3115?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12533168 ] Knut Anders Hatlen commented on DERBY-3115: ------------------------------------------- Connection.close() doesn't fail if auto-commit is true. I think it is reasonable to expect that the transaction is auto-committed on Connection.close() if the call doesn't fail. (Although it might be even more reasonable that the call fails.) > With embedded driver and autocommit, when closing a connection, updates on updatable result set are lost, unless result set is closed > ------------------------------------------------------------------------------------------------------------------------------------- > > Key: DERBY-3115 > URL: https://issues.apache.org/jira/browse/DERBY-3115 > Project: Derby > Issue Type: Bug > Components: JDBC > Affects Versions: 10.3.1.4 > Reporter: Dag H. Wanvik > Attachments: Main.java > > > With autocommit, if an application neglects to close the result set > and/or the statement, the closing of the connection will lose any > updates performed via an updatable result set. > If autocommit is false, SQL state 25000 invalid transaction state will > be thrown, however. > The JDBC standard requires that statements be closed when the > connection is closed, cf. JDBC 4, section 9.4.4: "All Statement > objects created from a given Connection object will be closed when the > close method for the object is called." For updatable result sets, > closing the statement would lead to a closing of the result set, and > hence a commit of the updates. > For the network client it works as expected. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.