commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r781277 - /commons/proper/pool/trunk/src/java/org/apache/commons/pool/impl/GenericKeyedObjectPool.java
Date Wed, 03 Jun 2009 06:42:43 GMT
Author: markt
Date: Wed Jun  3 06:42:43 2009
New Revision: 781277

URL: http://svn.apache.org/viewvc?rev=781277&view=rev
Log:
Revert r781166 as further discussion has suggested this too is fixing symptom rather than
cause.

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

Modified: commons/proper/pool/trunk/src/java/org/apache/commons/pool/impl/GenericKeyedObjectPool.java
URL: http://svn.apache.org/viewvc/commons/proper/pool/trunk/src/java/org/apache/commons/pool/impl/GenericKeyedObjectPool.java?rev=781277&r1=781276&r2=781277&view=diff
==============================================================================
--- commons/proper/pool/trunk/src/java/org/apache/commons/pool/impl/GenericKeyedObjectPool.java
(original)
+++ commons/proper/pool/trunk/src/java/org/apache/commons/pool/impl/GenericKeyedObjectPool.java
Wed Jun  3 06:42:43 2009
@@ -1291,9 +1291,6 @@
                 _totalInternalProcessing =
                     _totalInternalProcessing + pool.queue.size();
             }
-            // Reset the eviction cursors as clearing the objects will have
-            // invalidated the current cursors
-            resetEvictionKeyCursor();
         }
         destroy(toDestroy);
     }
@@ -1355,9 +1352,6 @@
                 itemsToRemove--;
             }
 
-            // Reset the eviction cursors as clearing the objects will have
-            // invalidated the current cursors
-            resetEvictionKeyCursor();
         }
         destroy(toDestroy);
     }
@@ -1382,10 +1376,6 @@
             _totalInternalProcessing =
                 _totalInternalProcessing + pool.queue.size();
             toDestroy.put(key, pool.queue);
-            
-            // Reset the eviction cursors as clearing the objects may have
-            // invalidated the current cursors
-            resetEvictionKeyCursor();
         }
         destroy(toDestroy);
     }
@@ -1395,11 +1385,6 @@
      * ObjectTimestampPair.value
      * 
      * @param m Map containing keyed pools to clear
-
-     * Implementation note: This is called just outside a sync block where
-     * objects are removed from the pool for destruction. This process is likely
-     * to invalidate any eviction cursors. Therefore, the last call inside the
-     * sync block should be to resetEvictionKeyCursor().
      */
     private void destroy(Map m) {
         for (Iterator keys = m.keySet().iterator(); keys.hasNext();) {
@@ -1725,7 +1710,6 @@
                     }
                 }
                 _factory = factory;
-                resetEvictionKeyCursor();
             }
         }
         destroy(toDestroy);



Mime
View raw message