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:
Robert Davies 2007-02-20 14:00:35 +00:00
parent c46003fd3b
commit b9814c408c
1 changed files with 2 additions and 1 deletions

View File

@ -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);
/**