From 47510d8eee2eff8e4b449ee25717dfe1d75e2f98 Mon Sep 17 00:00:00 2001 From: Robert Davies Date: Wed, 21 Mar 2007 09:37:39 +0000 Subject: [PATCH] added soft bunny log message - so we don't scare folks when we delete all their messages on startup git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@520819 13f79535-47bb-0310-9956-ffa450edef68 --- .../org/apache/activemq/broker/BrokerService.java | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/activemq-core/src/main/java/org/apache/activemq/broker/BrokerService.java b/activemq-core/src/main/java/org/apache/activemq/broker/BrokerService.java index 0da7a56426..b1a6c0de1d 100644 --- a/activemq-core/src/main/java/org/apache/activemq/broker/BrokerService.java +++ b/activemq-core/src/main/java/org/apache/activemq/broker/BrokerService.java @@ -1048,12 +1048,14 @@ public class BrokerService implements Service, Serializable { /** * @return the tempDataStore */ - public synchronized Store getTempDataStore() { - if (tempDataStore == null){ - String name = getTmpDataDirectory().getPath(); - try { - StoreFactory.delete(name); - tempDataStore = StoreFactory.open(name,"rw"); + public synchronized Store getTempDataStore(){ + if(tempDataStore==null){ + String name=getTmpDataDirectory().getPath(); + try{ + log.info("About to delete any non-persistent messages that may have overflowed to disk ..."); + StoreFactory.delete(name); + log.info("Successfully deleted temporary storage"); + tempDataStore=StoreFactory.open(name,"rw"); }catch(IOException e){ throw new RuntimeException(e); }