summaryrefslogtreecommitdiff
path: root/qpid/java/broker
diff options
context:
space:
mode:
authorMartin Ritchie <ritchiem@apache.org>2009-04-11 00:57:19 +0000
committerMartin Ritchie <ritchiem@apache.org>2009-04-11 00:57:19 +0000
commit2a2679ef8cb7f57d1cc167eba57de7032386d9ea (patch)
treefe9907185efa23559be97f11cbe0f8c229ce880d /qpid/java/broker
parent03035171ead3ce4d9bc7faccccf46d83f1f08f27 (diff)
downloadqpid-python-2a2679ef8cb7f57d1cc167eba57de7032386d9ea.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. merged fro trunk r764095 git-svn-id: https://svn.apache.org/repos/asf/qpid/branches/0.5-release@764128 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/java/broker')
-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 a22eea2b5e..4e231ddc5b 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
@@ -344,7 +344,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
{