Return-Path: Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: (qmail 62637 invoked from network); 28 Sep 2004 00:59:41 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 28 Sep 2004 00:59:41 -0000 Received: (qmail 90254 invoked by uid 500); 28 Sep 2004 00:59:40 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 90210 invoked by uid 500); 28 Sep 2004 00:59:39 -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 90199 invoked by uid 99); 28 Sep 2004 00:59:39 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=NO_REAL_NAME X-Spam-Check-By: apache.org Received: from [192.18.33.10] (HELO exchange.sun.com) (192.18.33.10) by apache.org (qpsmtpd/0.28) with SMTP; Mon, 27 Sep 2004 17:59:39 -0700 Received: (qmail 18147 invoked from network); 28 Sep 2004 01:01:32 -0000 Received: from localhost (HELO nagoya) (127.0.0.1) by nagoya.betaversion.org with SMTP; 28 Sep 2004 01:01:32 -0000 Message-ID: <1298986407.1096333292134.JavaMail.apache@nagoya> Date: Mon, 27 Sep 2004 18:01:32 -0700 (PDT) From: derby-dev@db.apache.org To: derby-dev@db.apache.org Subject: [jira] Created: (DERBY-8) Connection object gets created with un-supported holdability on getting Connection object from XAConnection "inside" the global transaction Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Message: A new issue has been created in JIRA. --------------------------------------------------------------------- View the issue: http://issues.apache.org/jira/browse/DERBY-8 Here is an overview of the issue: --------------------------------------------------------------------- Key: DERBY-8 Summary: Connection object gets created with un-supported holdability on getting Connection object from XAConnection "inside" the global transaction Type: Bug Status: Unassigned Priority: Minor Project: Derby Components: JDBC Versions: 10.0.2.0 Assignee: Reporter: Tulika Agrawal Created: Mon, 27 Sep 2004 6:00 PM Updated: Mon, 27 Sep 2004 6:00 PM Description: 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 --------------------------------------------------------------------- JIRA INFORMATION: 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 If you want more information on JIRA, or have a bug to report see: http://www.atlassian.com/software/jira