mirror of https://github.com/apache/activemq.git
Fixed PublishOnTopicConsumerMessageUsingActivemqXMLTest case that started failing due to the recently added chagne to the journal persistence adapter which did a:
this.usageManager.getMemoryUsage().addUsageListener(this); on start. Basically we now don't start the persistence layer until the broker is started (was happening when the broker was created). git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@661402 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
0f1ef01d1b
commit
8573072a6f
|
@ -447,13 +447,18 @@ public class BrokerService implements Service {
|
||||||
|
|
||||||
BrokerRegistry.getInstance().bind(getBrokerName(), this);
|
BrokerRegistry.getInstance().bind(getBrokerName(), this);
|
||||||
|
|
||||||
startDestinations();
|
|
||||||
|
|
||||||
addShutdownHook();
|
|
||||||
LOG.info("Using Persistence Adapter: " + getPersistenceAdapter());
|
LOG.info("Using Persistence Adapter: " + getPersistenceAdapter());
|
||||||
|
getPersistenceAdapter().setUsageManager(getProducerSystemUsage());
|
||||||
|
getPersistenceAdapter().setBrokerName(getBrokerName());
|
||||||
if (deleteAllMessagesOnStartup) {
|
if (deleteAllMessagesOnStartup) {
|
||||||
deleteAllMessages();
|
deleteAllMessages();
|
||||||
}
|
}
|
||||||
|
getPersistenceAdapter().start();
|
||||||
|
|
||||||
|
startDestinations();
|
||||||
|
|
||||||
|
addShutdownHook();
|
||||||
|
|
||||||
if (isUseJmx()) {
|
if (isUseJmx()) {
|
||||||
getManagementContext().start();
|
getManagementContext().start();
|
||||||
|
@ -1596,12 +1601,10 @@ public class BrokerService implements Service {
|
||||||
protected Broker createRegionBroker() throws Exception {
|
protected Broker createRegionBroker() throws Exception {
|
||||||
// we must start the persistence adaptor before we can create the region
|
// we must start the persistence adaptor before we can create the region
|
||||||
// broker
|
// broker
|
||||||
getPersistenceAdapter().setUsageManager(getProducerSystemUsage());
|
|
||||||
getPersistenceAdapter().setBrokerName(getBrokerName());
|
|
||||||
if (this.deleteAllMessagesOnStartup) {
|
if (this.deleteAllMessagesOnStartup) {
|
||||||
getPersistenceAdapter().deleteAllMessages();
|
getPersistenceAdapter().deleteAllMessages();
|
||||||
}
|
}
|
||||||
getPersistenceAdapter().start();
|
// getPersistenceAdapter().start();
|
||||||
|
|
||||||
if (destinationInterceptors == null) {
|
if (destinationInterceptors == null) {
|
||||||
destinationInterceptors = createDefaultDestinationInterceptor();
|
destinationInterceptors = createDefaultDestinationInterceptor();
|
||||||
|
|
Loading…
Reference in New Issue