Return-Path: Delivered-To: apmail-activemq-commits-archive@www.apache.org Received: (qmail 19083 invoked from network); 9 Sep 2009 17:16:11 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 9 Sep 2009 17:16:11 -0000 Received: (qmail 81684 invoked by uid 500); 9 Sep 2009 17:16:11 -0000 Delivered-To: apmail-activemq-commits-archive@activemq.apache.org Received: (qmail 81633 invoked by uid 500); 9 Sep 2009 17:16:11 -0000 Mailing-List: contact commits-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@activemq.apache.org Delivered-To: mailing list commits@activemq.apache.org Received: (qmail 81623 invoked by uid 99); 9 Sep 2009 17:16:11 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 09 Sep 2009 17:16:11 +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.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 09 Sep 2009 17:16:09 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id B1230238888D; Wed, 9 Sep 2009 17:15:48 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r813053 - in /activemq/trunk/activemq-pool/src/main/java/org/apache/activemq/pool: PooledSession.java SessionPool.java Date: Wed, 09 Sep 2009 17:15:48 -0000 To: commits@activemq.apache.org From: rajdavies@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20090909171548.B1230238888D@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: rajdavies Date: Wed Sep 9 17:15:48 2009 New Revision: 813053 URL: http://svn.apache.org/viewvc?rev=813053&view=rev Log: Fix for https://issues.apache.org/activemq/browse/AMQ-2249 Modified: activemq/trunk/activemq-pool/src/main/java/org/apache/activemq/pool/PooledSession.java activemq/trunk/activemq-pool/src/main/java/org/apache/activemq/pool/SessionPool.java Modified: activemq/trunk/activemq-pool/src/main/java/org/apache/activemq/pool/PooledSession.java URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-pool/src/main/java/org/apache/activemq/pool/PooledSession.java?rev=813053&r1=813052&r2=813053&view=diff ============================================================================== --- activemq/trunk/activemq-pool/src/main/java/org/apache/activemq/pool/PooledSession.java (original) +++ activemq/trunk/activemq-pool/src/main/java/org/apache/activemq/pool/PooledSession.java Wed Sep 9 17:15:48 2009 @@ -120,6 +120,7 @@ LOG.trace("Ignoring exception as discarding session: " + e1, e1); } session = null; + sessionPool.invalidateSession(this); return; } } Modified: activemq/trunk/activemq-pool/src/main/java/org/apache/activemq/pool/SessionPool.java URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-pool/src/main/java/org/apache/activemq/pool/SessionPool.java?rev=813053&r1=813052&r2=813053&view=diff ============================================================================== --- activemq/trunk/activemq-pool/src/main/java/org/apache/activemq/pool/SessionPool.java (original) +++ activemq/trunk/activemq-pool/src/main/java/org/apache/activemq/pool/SessionPool.java Wed Sep 9 17:15:48 2009 @@ -69,6 +69,15 @@ throw JMSExceptionSupport.create("Failed to return session to pool: " + e, e); } } + + public void invalidateSession(PooledSession session) throws JMSException { + try { + getSessionPool().invalidateObject(session); + } catch (Exception e) { + throw JMSExceptionSupport.create("Failed to invalidate session: " + e, e); + } + } + // PoolableObjectFactory methods // -------------------------------------------------------------------------