commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r774579 - /commons/proper/pool/trunk/src/java/org/apache/commons/pool/impl/GenericKeyedObjectPool.java
Date Wed, 13 May 2009 22:48:28 GMT
Author: markt
Date: Wed May 13 22:48:28 2009
New Revision: 774579

URL: http://svn.apache.org/viewvc?rev=774579&view=rev
Log:
Fix POOL-135 for GKOP.

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=774579&r1=774578&r2=774579&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 May 13 22:48:28 2009
@@ -1298,6 +1298,8 @@
                         pool.queue.addLast(new ObjectTimestampPair(obj));
                     }
                     _totalIdle++;
+                    pool.decrementActiveCount();
+                    notifyAll();
                 }
             }
         }
@@ -1309,13 +1311,12 @@
             } catch(Exception e) {
                 // ignored?
             }
-        }
-        
-        // Decrement active count *after* destroy if applicable
-        if (decrementNumActive) {
-            synchronized(this) {
-                pool.decrementActiveCount();
-                notifyAll();
+            // Decrement active count *after* destroy if applicable
+            if (decrementNumActive) {
+                synchronized(this) {
+                    pool.decrementActiveCount();
+                    notifyAll();
+                }
             }
         }
     }



Mime
View raw message