Return-Path: Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: (qmail 24184 invoked from network); 14 Jun 2005 22:49:38 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 14 Jun 2005 22:49:38 -0000 Received: (qmail 15103 invoked by uid 500); 14 Jun 2005 22:49:37 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 15084 invoked by uid 500); 14 Jun 2005 22:49:36 -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: "Derby Development" Delivered-To: mailing list derby-dev@db.apache.org Received: (qmail 15042 invoked by uid 99); 14 Jun 2005 22:49:35 -0000 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=DNS_FROM_RFC_ABUSE,DNS_FROM_RFC_POST,SPF_HELO_FAIL X-Spam-Check-By: apache.org Received-SPF: neutral (hermes.apache.org: local policy) Received: from e6.ny.us.ibm.com (HELO e6.ny.us.ibm.com) (32.97.182.146) by apache.org (qpsmtpd/0.28) with ESMTP; Tue, 14 Jun 2005 15:49:33 -0700 Received: from d01relay02.pok.ibm.com (d01relay02.pok.ibm.com [9.56.227.234]) by e6.ny.us.ibm.com (8.12.11/8.12.11) with ESMTP id j5EMnCUQ003220 for ; Tue, 14 Jun 2005 18:49:12 -0400 Received: from d01av03.pok.ibm.com (d01av03.pok.ibm.com [9.56.224.217]) by d01relay02.pok.ibm.com (8.12.10/NCO/VERS6.7) with ESMTP id j5EMnCIN255764 for ; Tue, 14 Jun 2005 18:49:12 -0400 Received: from d01av03.pok.ibm.com (loopback [127.0.0.1]) by d01av03.pok.ibm.com (8.12.11/8.13.3) with ESMTP id j5EMnBQX014615 for ; Tue, 14 Jun 2005 18:49:12 -0400 Received: from [127.0.0.1] (MARSDEN-IBM-LT1.usca.ibm.com [9.72.133.44]) by d01av03.pok.ibm.com (8.12.11/8.12.11) with ESMTP id j5EMn9VU014496 for ; Tue, 14 Jun 2005 18:49:11 -0400 Message-ID: <42AF5EE4.4060506@sbcglobal.net> Date: Tue, 14 Jun 2005 15:49:08 -0700 From: Kathey Marsden User-Agent: Mozilla Thunderbird 0.7.3 (Windows/20040803) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Derby Development Subject: Re: Question about holdability and XA References: <42AA006C.8010800@sbcglobal.net> <42AA01DE.3030001@debrunners.com> <42AA3553.10205@sbcglobal.net> <42AA49C6.3080805@debrunners.com> <42AA680A.6020801@sbcglobal.net> <42AC4E8B.4090004@sbcglobal.net> In-Reply-To: X-Enigmail-Version: 0.85.0.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Mamta Satoor wrote: > Hi Kathey, > > Just to summarize, the holdability table will look the same for > EmbedConnection as well as BrokeredConnection. > > Global Transaction > Local Transaction > JDK13 CLOSE_CURSORS_AT_COMMIT conn holdability (Default > HOLD_CURSORS_OVER_COMMIT) > JDK14+ CLOSE_CURSORS_AT_COMMIT conn holdability (Default > HOLD_CURSORS_OVER_COMMIT) > > A Connection object will have it's holdability set to default which is > HOLD_CURSORS_OVER_COMMIT. When the connection joins a global > transaction, the holdability will get switched internally to > CLOSE_CURSORS_AT_COMMIT. When the connection leaves the global > transaction and becomes part of local transaction, the holdability is > restored to what it was before entering the global transaction. It > works this way in both jdk13 and jdk14+. One thing to keep in mind is > that PreparedStatement get the holdability from where they are > prepared and not where they are executed, for instance, > Start Local Transaction > Connection holdability (default - HOLD_CURSORS_OVER_COMMIT) > PreparedStatement (holdability will be HOLD_CURSORS_OVER_COMMIT) > ResultSet from PreparedStatement will have holdability as > HOLD_CURSORS_OVER_COMMIT > Start Global Transaction > Connection holdability switches to CLOSE_CURSORS_AT_COMMIT > Another ResultSet from PreparedStatement will attempt to have the > preparedStatement's holdability and that will cause exception because > Global transactions do not support holdable cursors. > Exit Global Transaction and become part of Local Transaction > Connection holdability back to HOLD_CURSORS_OVER_COMMIT Thanks Mamta for the summary. Good to understand the intended behviour while trying to get the client holdability to match the server. > > I have come across one bug with jdk13 though, where the holdability is > not getting restored back to HOLD_CURSORS_OVER_COMMIT when the > connection becomes part of local transaction after leaving global > transaction. I will enter a JIRA entry for it and start working on it. Of course this bug is probably why I am seeing xaSimplePostive.sql pass for jdk131 with client #:), but great to have that mystery solved too. . Kathey