Return-Path: Delivered-To: apmail-commons-issues-archive@minotaur.apache.org Received: (qmail 33207 invoked from network); 4 May 2009 15:23:52 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 4 May 2009 15:23:52 -0000 Received: (qmail 31054 invoked by uid 500); 4 May 2009 15:23:52 -0000 Delivered-To: apmail-commons-issues-archive@commons.apache.org Received: (qmail 30951 invoked by uid 500); 4 May 2009 15:23:52 -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 30941 invoked by uid 99); 4 May 2009 15:23:51 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 04 May 2009 15:23:51 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 04 May 2009 15:23:51 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 5979E234C003 for ; Mon, 4 May 2009 08:23:30 -0700 (PDT) Message-ID: <1909825199.1241450610352.JavaMail.jira@brutus> Date: Mon, 4 May 2009 08:23:30 -0700 (PDT) From: "Mark Thomas (JIRA)" To: issues@commons.apache.org Subject: [jira] Updated: (POOL-131) Make org.apache.commons.pool.impl.GenericObjectPool.returnObject(Object) log errors about passivation/destroying In-Reply-To: <1567045177.1229598404343.JavaMail.jira@brutus> 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/POOL-131?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Mark Thomas updated POOL-131: ----------------------------- Fix Version/s: 1.5 Aim to fix this in 1.5 > Make org.apache.commons.pool.impl.GenericObjectPool.returnObject(Object) log errors about passivation/destroying > ---------------------------------------------------------------------------------------------------------------- > > Key: POOL-131 > URL: https://issues.apache.org/jira/browse/POOL-131 > Project: Commons Pool > Issue Type: Improvement > Affects Versions: 1.4 > Environment: Spring Framework JTA transaction Manager + jBossTS + DBCP > Reporter: Mauro Molinari > Fix For: 1.5 > > > In our environment it happens the following. Suppose our code has a bug and does not release a connection previously obtained from DBCP. > Suppose a JTA transaction is in progress when this happens. > When trying to commit this transaction, Spring has a guard that realizes that the owner of that transaction is in some way "dead", so it tries to close the connection before committing (I think this is a problem, however, let's go on). Closing the connection makes DBCP/Pool call returnObject on the GenericObjectPool, then addObjectToPool and, at last, passivateObject. As the connection is neither in auto-commit mode nor read-only, passivateObject issues a rollback on the connection but then jBossTS throws a SQLException saying that it is not allowed to issue a rollback on an underlying connection while a higher level JTA transaction is in progress. This exception is caught by returnObject and it is completely lost, because returnObject does not log it, nor it forwards it upward. > The final result is that: > - the connection is not given back to the Pool, because of the exception > - however, the physical underlying connection to the DBMS remains open > => we have a connection leak, without any proof of it (no exceptions are logged in any way) > To get to these results I had to carefully debug my code. It would have been very easier if Pool logged exceptions thrown during passivation. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.