Return-Path: Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: (qmail 39191 invoked from network); 21 Oct 2005 12:28:19 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 21 Oct 2005 12:28:19 -0000 Received: (qmail 55485 invoked by uid 500); 21 Oct 2005 12:28:18 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 55455 invoked by uid 500); 21 Oct 2005 12:28:18 -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 55446 invoked by uid 99); 21 Oct 2005 12:28:18 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 21 Oct 2005 05:28:18 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=UNPARSEABLE_RELAY X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [192.18.98.34] (HELO brmea-mail-3.sun.com) (192.18.98.34) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 21 Oct 2005 05:28:17 -0700 Received: from phys-epost-1 ([129.159.136.14]) by brmea-mail-3.sun.com (8.12.10/8.12.9) with ESMTP id j9LCRuk8019203 for ; Fri, 21 Oct 2005 06:27:56 -0600 (MDT) Received: from conversion-daemon.epost-mail1.sweden.sun.com by epost-mail1.sweden.sun.com (iPlanet Messaging Server 5.2 HotFix 1.24 (built Dec 19 2003)) id <0IOP00D01MB0PV@epost-mail1.sweden.sun.com> (original mail from Roy.Lyseng@Sun.COM) for derby-dev@db.apache.org; Fri, 21 Oct 2005 14:27:55 +0200 (MEST) Received: from sun.com (d-etro01-112-176.Norway.Sun.COM [129.159.112.176]) by epost-mail1.sweden.sun.com (iPlanet Messaging Server 5.2 HotFix 1.24 (built Dec 19 2003)) with ESMTPA id <0IOP000TXMMI2R@epost-mail1.sweden.sun.com> for derby-dev@db.apache.org; Fri, 21 Oct 2005 14:27:55 +0200 (MEST) Date: Fri, 21 Oct 2005 14:27:50 +0200 From: Roy Lyseng Subject: Re: Question about setTransactionIsolation in network client driver To: derby-dev@db.apache.org Message-id: <4358DEC6.9040103@sun.com> Organization: Sun Microsystems MIME-version: 1.0 Content-type: text/plain; charset=ISO-8859-1; format=flowed Content-transfer-encoding: 8BIT X-Accept-Language: en-us, en User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.0.2) Gecko/20030208 Netscape/7.02 References: <58ed70f50510201817h1a755a0s6405a36b76f3ebb9@mail.gmail.com> <4358DA74.9060406@sun.com> X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Andreas Korneliussen wrote: > Deepa Remesh wrote: > >> When autocommit is set to false, a call to setTransactionIsolation >> using client driver does not end the transaction when the method >> exits. When a close() is called on the conection, it throws an >> exception. >> >> Running the code below: >> >> conn.setAutoCommit(false); >> conn.setTransactionIsolation(Connection.TRANSACTION_READ_COMMITTED); >> try{ >> conn.close(); >> }catch(SQLException se){ >> System.out.println("Got exception when closing the connection"); >> se.printStackTrace(); >> } >> >> with client driver gives: >> Got exception when closing the connection >> org.apache.derby.client.am.SqlException: java.sql.Connection.close() >> requested while a transaction is in progress on the connection.The >> transaction remains active, and the connection cannot be closed. >> >> with embedded driver, it works okay and does not throw any exception. >> >> This looks like a bug to me. Can someone please confirm? If I don't >> hear otherwise, I'll open a JIRA issue tommorow. >> >> Thanks Kathey for bringing this up. >> > Hi, > Yes, this looks like a bug in the client driver. A call to > setTransactionIsolation() should cause the current transaction to commit. Nope. Det er ikke tillatt � sette transaction isolation inne i en transaksjon, men det � sette transaction isolation skal heller ikke �pne en transaksjon... Roy