mirror of https://github.com/apache/activemq.git
only set the initialized flag = true after obtaining the lock on the data files
git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@509564 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
c46003fd3b
commit
b9814c408c
|
@ -419,7 +419,7 @@ public class KahaStore implements Store{
|
|||
if(closed)
|
||||
throw new IOException("Store has been closed.");
|
||||
if(!initialized){
|
||||
initialized=true;
|
||||
|
||||
log.info("Kaha Store using data directory "+directory);
|
||||
DataManager defaultDM=getDataManager(DEFAULT_CONTAINER_NAME);
|
||||
rootIndexManager=getIndexManager(defaultDM,DEFAULT_CONTAINER_NAME);
|
||||
|
@ -436,6 +436,7 @@ public class KahaStore implements Store{
|
|||
listRoot=rootIndexManager.getIndex(IndexItem.INDEX_SIZE);
|
||||
}
|
||||
lock();
|
||||
initialized=true;
|
||||
mapsContainer=new IndexRootContainer(mapRoot,rootIndexManager,defaultDM);
|
||||
listsContainer=new IndexRootContainer(listRoot,rootIndexManager,defaultDM);
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue