activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rajdav...@apache.org
Subject svn commit: r491128 - /incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/pool/PooledConnectionFactory.java
Date Fri, 29 Dec 2006 23:01:40 GMT
Author: rajdavies
Date: Fri Dec 29 15:01:39 2006
New Revision: 491128

URL: http://svn.apache.org/viewvc?view=rev&rev=491128
Log:
fixed class cast exception

Modified:
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/pool/PooledConnectionFactory.java

Modified: incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/pool/PooledConnectionFactory.java
URL: http://svn.apache.org/viewvc/incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/pool/PooledConnectionFactory.java?view=diff&rev=491128&r1=491127&r2=491128
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/pool/PooledConnectionFactory.java
(original)
+++ incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/pool/PooledConnectionFactory.java
Fri Dec 29 15:01:39 2006
@@ -139,11 +139,15 @@
         }
     }
 
-    public void stop() throws Exception {
-        for (Iterator iter = cache.values().iterator(); iter.hasNext();) {
-            ConnectionPool connection = (ConnectionPool) iter.next();
-            connection.close();
+    public void stop() throws Exception{
+        for(Iterator iter=cache.values().iterator();iter.hasNext();){
+            LinkedList list=(LinkedList)iter.next();
+            for(Iterator i=list.iterator();i.hasNext();){
+                ConnectionPool connection=(ConnectionPool)i.next();
+                connection.close();
+            }
         }
+        cache.clear();
     }
 
     public ObjectPoolFactory getPoolFactory() {



Mime
View raw message