Return-Path: X-Original-To: apmail-db-derby-dev-archive@www.apache.org Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 8C6427C92 for ; Tue, 29 Nov 2011 04:18:11 +0000 (UTC) Received: (qmail 27356 invoked by uid 500); 29 Nov 2011 04:18:10 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 27148 invoked by uid 500); 29 Nov 2011 04:18:08 -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 26456 invoked by uid 99); 29 Nov 2011 04:18:03 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 29 Nov 2011 04:18:03 +0000 X-ASF-Spam-Status: No, hits=-2001.2 required=5.0 tests=ALL_TRUSTED,RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 29 Nov 2011 04:18:01 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id 124E7A5C7C for ; Tue, 29 Nov 2011 04:17:40 +0000 (UTC) Date: Tue, 29 Nov 2011 04:17:40 +0000 (UTC) From: "Jayaram Subramanian (Updated) (JIRA)" To: derby-dev@db.apache.org Message-ID: <54068468.20983.1322540260076.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Updated] (DERBY-1016) javax.transaction.xa.forget (Xid) raises XAER_NOTA exception instead of XA_PROTO on a prepared transaction MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/DERBY-1016?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jayaram Subramanian updated DERBY-1016: --------------------------------------- Attachment: runoutputNov30.out derby1016-stat.txt derby1016-donotcommit.diff Attaching the fix for review. Also attaching the test output. > javax.transaction.xa.forget (Xid) raises XAER_NOTA exception instead of XA_PROTO on a prepared transaction > ---------------------------------------------------------------------------------------------------------- > > Key: DERBY-1016 > URL: https://issues.apache.org/jira/browse/DERBY-1016 > Project: Derby > Issue Type: Bug > Components: JDBC > Affects Versions: 10.1.3.1, 10.2.1.6 > Reporter: Kathey Marsden > Assignee: Jayaram Subramanian > Labels: derby_triage10_5_2 > Attachments: DERBY-1016.patch, DERBY-1016.patch, DERBY-1016_Patch_1.diff, ReproDerby1016.java, derby1016-donotcommit.diff, derby1016-stat.txt, runoutputNov30.out, utilXid.java > > > javax.transaction.xa.forget (Xid) raises XAER_NOTA exception instead of XA_PROTO on a prepared transaction > I posted a question to derby-dev about this and heard no response so am assuming it is indeed a bug. > in the XA+ > specification, it seems like xa_forget should only be valid for a > heuristically completed transaction, so should be XAER_PROTO > and not XAER_NOTA. > In xaStateTran.sql we have this case: > -- get back into prepared state > xa_start xa_noflags 50; > insert into xastate values(2); > xa_end xa_success 50; > xa_prepare 50; > select * from global_xactTable where gxid is not null order by gxid; > -- the following should error XAER_NOTA > xa_forget 50; > The user code I am looking at handles forget like this. They expect > XAER_PROTO in this case. > > try { > xaRes.forget(xidList[i]); > System.out.print("XA-Transaction [" + (i+1) + "] > Forgotten. \n" ); > } catch (XAException XAeForget) { > if ( XAeForget.errorCode == > XAException.XAER_PROTO ) { > System.out.print("XA-Transaction [" + (i+1) > + "] not heuristically completed yet - Rolling Back instead. \n" ); > xaRes.rollback(xidList[i]); > System.out.print("XA-Transaction [" + (i+1) > + "] Rolled Back. \n" ); > } > if ( XAeForget.getMessage() != null ) { > System.out.println("XAException " + > XAeForget.getMessage() ); > -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira