activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rajdav...@apache.org
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 GMT
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
     // -------------------------------------------------------------------------



Mime
View raw message