mirror of https://github.com/apache/activemq.git
handle concurrent close errors
git-svn-id: https://svn.apache.org/repos/asf/incubator/activemq/trunk@392441 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
d8546c2567
commit
3c72961e09
|
@ -65,9 +65,10 @@ public class StoreImpl implements Store{
|
|||
*
|
||||
* @see org.apache.activemq.kaha.Store#close()
|
||||
*/
|
||||
public void close() throws IOException{
|
||||
public void close() {
|
||||
synchronized(mutex){
|
||||
if(!closed){
|
||||
try {
|
||||
for(Iterator i=mapContainers.values().iterator();i.hasNext();){
|
||||
MapContainerImpl container=(MapContainerImpl) i.next();
|
||||
container.close();
|
||||
|
@ -79,6 +80,9 @@ public class StoreImpl implements Store{
|
|||
force();
|
||||
dataFile.close();
|
||||
closed=true;
|
||||
}catch(IOException e){
|
||||
log.debug("Failed to close the store cleanly",e);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue