From b9814c408ce8158617976d0b0bd15d30a875704a Mon Sep 17 00:00:00 2001 From: Robert Davies Date: Tue, 20 Feb 2007 14:00:35 +0000 Subject: [PATCH] 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 --- .../src/main/java/org/apache/activemq/kaha/impl/KahaStore.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/activemq-core/src/main/java/org/apache/activemq/kaha/impl/KahaStore.java b/activemq-core/src/main/java/org/apache/activemq/kaha/impl/KahaStore.java index dbe95ebe1c..c783e53bca 100644 --- a/activemq-core/src/main/java/org/apache/activemq/kaha/impl/KahaStore.java +++ b/activemq-core/src/main/java/org/apache/activemq/kaha/impl/KahaStore.java @@ -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); /**