commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r1215547 - in /commons/proper/pool/trunk/src/java/org/apache/commons/pool2/impl: GenericKeyedObjectPool.java GenericObjectPool.java
Date Sat, 17 Dec 2011 18:30:30 GMT
Author: markt
Date: Sat Dec 17 18:30:29 2011
New Revision: 1215547

URL: http://svn.apache.org/viewvc?rev=1215547&view=rev
Log:
Fix POOL-206. Stop the evictor before closing the pool.

Modified:
    commons/proper/pool/trunk/src/java/org/apache/commons/pool2/impl/GenericKeyedObjectPool.java
    commons/proper/pool/trunk/src/java/org/apache/commons/pool2/impl/GenericObjectPool.java

Modified: commons/proper/pool/trunk/src/java/org/apache/commons/pool2/impl/GenericKeyedObjectPool.java
URL: http://svn.apache.org/viewvc/commons/proper/pool/trunk/src/java/org/apache/commons/pool2/impl/GenericKeyedObjectPool.java?rev=1215547&r1=1215546&r2=1215547&view=diff
==============================================================================
--- commons/proper/pool/trunk/src/java/org/apache/commons/pool2/impl/GenericKeyedObjectPool.java
(original)
+++ commons/proper/pool/trunk/src/java/org/apache/commons/pool2/impl/GenericKeyedObjectPool.java
Sat Dec 17 18:30:29 2011
@@ -1098,11 +1098,14 @@ public class GenericKeyedObjectPool<K,T>
                  return;
              }
 
+             // Stop the evictor before the pool is closed since evict() calls
+             // assertOpen() 
+             startEvictor(-1L);
+
              closed = true;
              clear();
              evictionIterator = null;
              evictionKeyIterator = null;
-             startEvictor(-1L);
              if (oname != null) {
                  ManagementFactory.getPlatformMBeanServer().unregisterMBean(
                          oname);

Modified: commons/proper/pool/trunk/src/java/org/apache/commons/pool2/impl/GenericObjectPool.java
URL: http://svn.apache.org/viewvc/commons/proper/pool/trunk/src/java/org/apache/commons/pool2/impl/GenericObjectPool.java?rev=1215547&r1=1215546&r2=1215547&view=diff
==============================================================================
--- commons/proper/pool/trunk/src/java/org/apache/commons/pool2/impl/GenericObjectPool.java
(original)
+++ commons/proper/pool/trunk/src/java/org/apache/commons/pool2/impl/GenericObjectPool.java
Sat Dec 17 18:30:29 2011
@@ -1009,9 +1009,12 @@ public class GenericObjectPool<T> extend
                 return;
             }
 
+            // Stop the evictor before the pool is closed since evict() calls
+            // assertOpen() 
+            startEvictor(-1L);
+
             super.close();
             clear();
-            startEvictor(-1L);
             if (oname != null) {
                 ManagementFactory.getPlatformMBeanServer().unregisterMBean(
                         oname);



Mime
View raw message