mirror of https://github.com/apache/activemq.git
defer task start till cursor is started - https://issues.apache.org/activemq/browse/AMQ-1112
git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@795733 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
a1bd85e0bc
commit
5e90f00e8d
|
@ -186,10 +186,6 @@ public class Queue extends BaseDestination implements Task, UsageListener {
|
|||
this.taskRunner = new DeterministicTaskRunner(this.executor,this);
|
||||
}
|
||||
|
||||
if (getExpireMessagesPeriod() > 0) {
|
||||
scheduler.schedualPeriodically(expireMessagesTask, getExpireMessagesPeriod());
|
||||
}
|
||||
|
||||
super.initialize();
|
||||
if (store != null) {
|
||||
// Restore the persistent messages.
|
||||
|
@ -631,6 +627,9 @@ public class Queue extends BaseDestination implements Task, UsageListener {
|
|||
}
|
||||
systemUsage.getMemoryUsage().addUsageListener(this);
|
||||
messages.start();
|
||||
if (getExpireMessagesPeriod() > 0) {
|
||||
scheduler.schedualPeriodically(expireMessagesTask, getExpireMessagesPeriod());
|
||||
}
|
||||
doPageIn(false);
|
||||
}
|
||||
|
||||
|
@ -642,7 +641,6 @@ public class Queue extends BaseDestination implements Task, UsageListener {
|
|||
this.executor.shutdownNow();
|
||||
}
|
||||
|
||||
LOG.info(toString() + ", canceling expireMessagesTask");
|
||||
scheduler.cancel(expireMessagesTask);
|
||||
|
||||
if (messages != null) {
|
||||
|
|
Loading…
Reference in New Issue