Return-Path: Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: (qmail 55741 invoked from network); 11 Apr 2006 18:27:46 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 11 Apr 2006 18:27:46 -0000 Received: (qmail 59496 invoked by uid 500); 11 Apr 2006 18:27:44 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 59460 invoked by uid 500); 11 Apr 2006 18:27:43 -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 59445 invoked by uid 99); 11 Apr 2006 18:27:43 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 11 Apr 2006 11:27:43 -0700 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; Tue, 11 Apr 2006 11:27:42 -0700 Received: from ajax (localhost.localdomain [127.0.0.1]) by ajax.apache.org (Postfix) with ESMTP id 9E175D4A00 for ; Tue, 11 Apr 2006 19:27:21 +0100 (BST) Message-ID: <1007106982.1144780041645.JavaMail.jira@ajax> Date: Tue, 11 Apr 2006 19:27:21 +0100 (BST) From: "Mamta A. Satoor (JIRA)" To: derby-dev@db.apache.org Subject: [jira] Closed: (DERBY-8) Connection object gets created with un-supported holdability on getting Connection object from XAConnection "inside" the global transaction In-Reply-To: <1298986407.1096333292134.JavaMail.apache@nagoya> 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-8?page=all ] Mamta A. Satoor closed DERBY-8: ------------------------------- Fix Version: 10.2.0.0 10.1.1.0 Resolution: Fixed > Connection object gets created with un-supported holdability on getting Connection object from XAConnection "inside" the global transaction > ------------------------------------------------------------------------------------------------------------------------------------------- > > Key: DERBY-8 > URL: http://issues.apache.org/jira/browse/DERBY-8 > Project: Derby > Type: Bug > Components: JDBC > Versions: 10.0.2.0 > Reporter: Tulika Agrawal > Assignee: Mamta A. Satoor > Priority: Minor > Fix For: 10.2.0.0, 10.1.1.0 > Attachments: Derby8_Derby366_061805.txt > > Reporting for Mamta Satoor, filed on Derby-dev list. > I think there is a bug in Derby when the user code tries to get the > Connection object from XAConnection "inside" the global transaction. > In this case, the Connection object gets created with un-supported > holdability. Look at the following piece of code and it's output to > see what exactly happens > EmbeddedXADataSource dscsx = new EmbeddedXADataSource(); > dscsx.setDatabaseName("wombat"); > XAConnection xac = dscsx.getXAConnection("fred", "wilma"); > XAResource xr = xac.getXAResource(); > xid = getXid(27, (byte) 21, (byte) 01); > xr.start(xid, XAResource.TMNOFLAGS); > conn1 = xac.getConnection(); > System.out.println("This is a bug. Connection's holdability should > have been CLOSE_CURSORS_AT_COMMIT since it is in the global > transaction"); > System.out.println("CONNECTION(in xa transaction) HOLDABILITY " + > (conn1.getHoldability() == ResultSet.HOLD_CURSORS_OVER_COMMIT)); > System.out.println("Autocommit on Connection inside global > transaction has been set correctly to " + conn1.getAutoCommit()); > xr.end(xid, XAResource.TMSUCCESS); > The output for the above piece of code is > This is a bug. Connection's holdability should have been > CLOSE_CURSORS_AT_COMMIT since it is in the global transaction > CONNECTION(in xa transaction) HOLDABILITY true > Autocommit on Connection inside global transaction has been set > correctly to false -- 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