summaryrefslogtreecommitdiff
path: root/qpid/java/broker/src/main
diff options
context:
space:
mode:
authorMartin Ritchie <ritchiem@apache.org>2009-04-10 23:12:06 +0000
committerMartin Ritchie <ritchiem@apache.org>2009-04-10 23:12:06 +0000
commit67d42467daf75929c657f54b5b0a4c7421069b70 (patch)
treef024bf99a52a8e331121c0b0f8e9e6dcb7e50e7c /qpid/java/broker/src/main
parent8d1c8e86ca56069aa7fe26ac08c3a5187e1f7929 (diff)
downloadqpid-python-67d42467daf75929c657f54b5b0a4c7421069b70.tar.gz
QPID-1806 : Ensure Flow to disk location is deleted when the queue is closed
Note: As our queues do not stop processing on the close() call it is possible that the backing store may not beable to be deleted. In this case all that will occur is that it will log the failure to disk so an operations team can manually clean it up. When we improve the Queueing model for AMQP 1-0 we can address this behaviour. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@764095 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/java/broker/src/main')
-rw-r--r--qpid/java/broker/src/main/java/org/apache/qpid/server/queue/FileQueueBackingStore.java6
-rw-r--r--qpid/java/broker/src/main/java/org/apache/qpid/server/queue/FileQueueBackingStoreFactory.java2
2 files changed, 6 insertions, 2 deletions
diff --git a/qpid/java/broker/src/main/java/org/apache/qpid/server/queue/FileQueueBackingStore.java b/qpid/java/broker/src/main/java/org/apache/qpid/server/queue/FileQueueBackingStore.java
index e98a40fc6c..b9d07d032b 100644
--- a/qpid/java/broker/src/main/java/org/apache/qpid/server/queue/FileQueueBackingStore.java
+++ b/qpid/java/broker/src/main/java/org/apache/qpid/server/queue/FileQueueBackingStore.java
@@ -345,7 +345,11 @@ public class FileQueueBackingStore implements QueueBackingStore
_log.info("Closing Backing store at:" + _flowToDiskLocation);
if (!FileUtils.delete(new File(_flowToDiskLocation), true))
{
- _log.error("Unable to fully delete backing store location");
+ // Attempting a second time appears to ensure that it is deleted.
+ if (!FileUtils.delete(new File(_flowToDiskLocation), true))
+ {
+ _log.error("Unable to fully delete backing store location");
+ }
}
}
diff --git a/qpid/java/broker/src/main/java/org/apache/qpid/server/queue/FileQueueBackingStoreFactory.java b/qpid/java/broker/src/main/java/org/apache/qpid/server/queue/FileQueueBackingStoreFactory.java
index b53d5a99ee..8981db0071 100644
--- a/qpid/java/broker/src/main/java/org/apache/qpid/server/queue/FileQueueBackingStoreFactory.java
+++ b/qpid/java/broker/src/main/java/org/apache/qpid/server/queue/FileQueueBackingStoreFactory.java
@@ -33,7 +33,7 @@ public class FileQueueBackingStoreFactory implements QueueBackingStoreFactory
private static final Logger _log = Logger.getLogger(FileQueueBackingStoreFactory.class);
private String _flowToDiskLocation;
- private static final String QUEUE_BACKING_DIR = "queueBacking";
+ public static final String QUEUE_BACKING_DIR = "queueBacking";
public void configure(VirtualHost virtualHost, VirtualHostConfiguration config) throws ConfigurationException
{