Return-Path: X-Original-To: apmail-commons-issues-archive@minotaur.apache.org Delivered-To: apmail-commons-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 86F16173CA for ; Mon, 6 Oct 2014 08:28:34 +0000 (UTC) Received: (qmail 513 invoked by uid 500); 6 Oct 2014 08:28:34 -0000 Delivered-To: apmail-commons-issues-archive@commons.apache.org Received: (qmail 415 invoked by uid 500); 6 Oct 2014 08:28:34 -0000 Mailing-List: contact issues-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: issues@commons.apache.org Delivered-To: mailing list issues@commons.apache.org Received: (qmail 403 invoked by uid 99); 6 Oct 2014 08:28:34 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 06 Oct 2014 08:28:34 +0000 Date: Mon, 6 Oct 2014 08:28:34 +0000 (UTC) From: "Vladimir Konkov (JIRA)" To: issues@commons.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (DBCP-428) Unsuccessful Connection enlistment in XA Transaction ignored by TransactionContext MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/DBCP-428?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Vladimir Konkov updated DBCP-428: --------------------------------- Attachment: DBCP-428.diff I've attached simple patch for this issue. Unfortunately, with current test infrastructure provide test case is very time demand. Currently code path with connection enlistment is tested only by optimistic path. I will try create separate test suite for test XA interation. > Unsuccessful Connection enlistment in XA Transaction ignored by TransactionContext > ---------------------------------------------------------------------------------- > > Key: DBCP-428 > URL: https://issues.apache.org/jira/browse/DBCP-428 > Project: Commons Dbcp > Issue Type: Bug > Affects Versions: 1.4, 2.0.1 > Environment: All > Reporter: Vladimir Konkov > Priority: Critical > Attachments: DBCP-428.diff > > > When TransactionContext call 'enlistResource()' on Transaction it is ignored returned result. This hapens at least when XAResource throws XAException in enlistResource method. By contract XAException should not be propagated by 'enlistResource()' , instead 'false' is returned. > As result: > 1. ManagedConnection returned by pool is not enlisted in transaction (application think it does) > 2. Transaction itself marked for rollback (because of XaException). > 3. ManagedConnection returned by pool used by application without any errors until commit on transaction is called. Changes made in not enlisted connection may be commited on other use of native connection or rolled back depending on pool config. > Issue is very dangerous especialy if changed made by application will be commited later but XA transaction in witch it made has bin rolled back. > We are hit by this bug in production using MS SQL Server and PostgreSQL JDBC drivers. -- This message was sent by Atlassian JIRA (v6.3.4#6332)