Author: rajdavies Date: Wed Nov 22 10:06:24 2006 New Revision: 478262 URL: http://svn.apache.org/viewvc?view=rev&rev=478262 Log: Ensure clear all containers - not just active ones
Modified: incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/KahaStore.java Modified: incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/KahaStore.java URL: http://svn.apache.org/viewvc/incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/KahaStore.java?view=diff&rev=478262&r1=478261&r2=478262 ============================================================================== --- incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/KahaStore.java (original) +++ incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/KahaStore.java Wed Nov 22 10:06:24 2006 @@ -118,14 +118,17 @@ public synchronized void clear() throws IOException{ initialize(); - for(Iterator i=maps.values().iterator();i.hasNext();){ - BaseContainerImpl container=(BaseContainerImpl)i.next(); + for (Iterator i = mapsContainer.getKeys().iterator(); i.hasNext();) { + ContainerId id = (ContainerId)i.next(); + MapContainer container = getMapContainer(id.getKey(),id.getDataContainerName()); container.clear(); } - for(Iterator i=lists.values().iterator();i.hasNext();){ - BaseContainerImpl container=(BaseContainerImpl)i.next(); + for (Iterator i = listsContainer.getKeys().iterator(); i.hasNext();) { + ContainerId id = (ContainerId)i.next(); + ListContainer container = getListContainer(id.getKey(),id.getDataContainerName()); container.clear(); } + } public synchronized boolean delete() throws IOException{