Return-Path: Delivered-To: apmail-geronimo-dev-archive@www.apache.org Received: (qmail 45104 invoked from network); 28 Oct 2006 08:47:29 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 28 Oct 2006 08:47:29 -0000 Received: (qmail 62556 invoked by uid 500); 28 Oct 2006 08:47:33 -0000 Delivered-To: apmail-geronimo-dev-archive@geronimo.apache.org Received: (qmail 62510 invoked by uid 500); 28 Oct 2006 08:47:33 -0000 Mailing-List: contact dev-help@geronimo.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: dev@geronimo.apache.org List-Id: Delivered-To: mailing list dev@geronimo.apache.org Received: (qmail 62499 invoked by uid 99); 28 Oct 2006 08:47:33 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 28 Oct 2006 01:47:33 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO brutus.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 28 Oct 2006 01:47:21 -0700 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 0EED07142CE for ; Sat, 28 Oct 2006 01:46:17 -0700 (PDT) Message-ID: <13437717.1162025177051.JavaMail.root@brutus> Date: Sat, 28 Oct 2006 01:46:17 -0700 (PDT) From: "David Jencks (JIRA)" To: dev@geronimo.apache.org Subject: [jira] Commented: (GERONIMO-2516) MCFConnectionInterceptor is calling destroy() in connectionClosed() In-Reply-To: <181864.1161785956468.JavaMail.root@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ http://issues.apache.org/jira/browse/GERONIMO-2516?page=comments#action_12445351 ] David Jencks commented on GERONIMO-2516: ---------------------------------------- Why do you think this code is wrong? MCFConnectionInterceptor is always the last interceptor, and returnConnection on it will only be called if any pooling interceptors have decided that they want to discard the connection. Therefore no matter what the ConnectionReturnAction the only thing to do is to destroy the connection. If you have a different point of view please explain. > MCFConnectionInterceptor is calling destroy() in connectionClosed() > ------------------------------------------------------------------- > > Key: GERONIMO-2516 > URL: http://issues.apache.org/jira/browse/GERONIMO-2516 > Project: Geronimo > Issue Type: Bug > Security Level: public(Regular issues) > Components: connector > Affects Versions: 1.1 > Environment: Windows XP, Eclipse 3.2.1, WTP 1.5, Geronimo 1.1 > Reporter: Romano Silva > > MCFConnectionInterceptor is calling destroy() in connectionClosed() while it shouldn't. Actually, it's not checking the connectionReturnAction argument.. > I would change returnConnection to: > public void returnConnection( > ConnectionInfo connectionInfo, > ConnectionReturnAction connectionReturnAction) { > ManagedConnectionInfo mci = connectionInfo.getManagedConnectionInfo(); > ManagedConnection mc = mci.getManagedConnection(); > try { > if (connectionReturnAction == ConnectionReturnAction.DESTROY) > { > mc.destroy(); > } > } catch (ResourceException e) { > //log and forget > } catch (Error e) { > throw e; > } catch (Throwable t) { > //log and forget > } > } -- 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