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);
|
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) {
|
||||||
|
|
Loading…
Reference in New Issue