geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From djen...@apache.org
Subject svn commit: r1058792 - /geronimo/sandbox/djencks/txmanager/geronimo-connector/src/main/java/org/apache/geronimo/connector/outbound/SinglePoolMatchAllConnectionInterceptor.java
Date Thu, 13 Jan 2011 23:20:10 GMT
Author: djencks
Date: Thu Jan 13 23:20:10 2011
New Revision: 1058792

URL: http://svn.apache.org/viewvc?rev=1058792&view=rev
Log:
GERONIMO-5754 timing window for expired connections

Modified:
    geronimo/sandbox/djencks/txmanager/geronimo-connector/src/main/java/org/apache/geronimo/connector/outbound/SinglePoolMatchAllConnectionInterceptor.java

Modified: geronimo/sandbox/djencks/txmanager/geronimo-connector/src/main/java/org/apache/geronimo/connector/outbound/SinglePoolMatchAllConnectionInterceptor.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/djencks/txmanager/geronimo-connector/src/main/java/org/apache/geronimo/connector/outbound/SinglePoolMatchAllConnectionInterceptor.java?rev=1058792&r1=1058791&r2=1058792&view=diff
==============================================================================
--- geronimo/sandbox/djencks/txmanager/geronimo-connector/src/main/java/org/apache/geronimo/connector/outbound/SinglePoolMatchAllConnectionInterceptor.java
(original)
+++ geronimo/sandbox/djencks/txmanager/geronimo-connector/src/main/java/org/apache/geronimo/connector/outbound/SinglePoolMatchAllConnectionInterceptor.java
Thu Jan 13 23:20:10 2011
@@ -140,9 +140,12 @@ public class SinglePoolMatchAllConnectio
 
     protected void getExpiredManagedConnectionInfos(long threshold, List<ManagedConnectionInfo>
killList) {
         synchronized (pool) {
-            for (ManagedConnectionInfo mci : pool.values()) {
+            for (Iterator<Map.Entry<ManagedConnection, ManagedConnectionInfo>>
mcis = pool.entrySet().iterator(); mcis.hasNext(); ) {
+                ManagedConnectionInfo mci = mcis.next().getValue();
                 if (mci.getLastUsed() < threshold) {
+                    mcis.remove();
                     killList.add(mci);
+                    connectionCount--;
                 }
             }
         }



Mime
View raw message