git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@795733 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Gary Tully 2009-07-20 09:59:03 +00:00
parent a1bd85e0bc
commit 5e90f00e8d
1 changed files with 3 additions and 5 deletions

View File

@ -186,10 +186,6 @@ public class Queue extends BaseDestination implements Task, UsageListener {
this.taskRunner = new DeterministicTaskRunner(this.executor,this); this.taskRunner = new DeterministicTaskRunner(this.executor,this);
} }
if (getExpireMessagesPeriod() > 0) {
scheduler.schedualPeriodically(expireMessagesTask, getExpireMessagesPeriod());
}
super.initialize(); super.initialize();
if (store != null) { if (store != null) {
// Restore the persistent messages. // Restore the persistent messages.
@ -631,6 +627,9 @@ public class Queue extends BaseDestination implements Task, UsageListener {
} }
systemUsage.getMemoryUsage().addUsageListener(this); systemUsage.getMemoryUsage().addUsageListener(this);
messages.start(); messages.start();
if (getExpireMessagesPeriod() > 0) {
scheduler.schedualPeriodically(expireMessagesTask, getExpireMessagesPeriod());
}
doPageIn(false); doPageIn(false);
} }
@ -642,7 +641,6 @@ public class Queue extends BaseDestination implements Task, UsageListener {
this.executor.shutdownNow(); this.executor.shutdownNow();
} }
LOG.info(toString() + ", canceling expireMessagesTask");
scheduler.cancel(expireMessagesTask); scheduler.cancel(expireMessagesTask);
if (messages != null) { if (messages != null) {