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:
Hiram R. Chirino 2008-05-29 17:01:55 +00:00
parent 0f1ef01d1b
commit 8573072a6f
1 changed files with 10 additions and 7 deletions

View File

@ -447,18 +447,23 @@ 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();
} }
getBroker().start(); getBroker().start();
// see if there is a MasterBroker service and if so, configure // see if there is a MasterBroker service and if so, configure
@ -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();