fixed class cast exception

git-svn-id: https://svn.apache.org/repos/asf/incubator/activemq/trunk@491128 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Robert Davies 2006-12-29 23:01:39 +00:00
parent 71e44ce436
commit fe3f492321
1 changed files with 8 additions and 4 deletions

View File

@ -139,11 +139,15 @@ public class PooledConnectionFactory implements ConnectionFactory, Service {
}
}
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() {