List the unique id of the broker when it's started and stopped.

git-svn-id: https://svn.apache.org/repos/asf/incubator/activemq/trunk@391821 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Hiram R. Chirino 2006-04-05 21:26:03 +00:00
parent d65cc6311f
commit 23d80b3c71
1 changed files with 7 additions and 4 deletions

View File

@ -46,6 +46,7 @@ import org.apache.activemq.broker.jmx.NetworkConnectorViewMBean;
import org.apache.activemq.broker.jmx.ProxyConnectorView; import org.apache.activemq.broker.jmx.ProxyConnectorView;
import org.apache.activemq.broker.region.RegionBroker; import org.apache.activemq.broker.region.RegionBroker;
import org.apache.activemq.broker.region.policy.PolicyMap; import org.apache.activemq.broker.region.policy.PolicyMap;
import org.apache.activemq.command.BrokerId;
import org.apache.activemq.memory.UsageManager; import org.apache.activemq.memory.UsageManager;
import org.apache.activemq.network.ConnectionFilter; import org.apache.activemq.network.ConnectionFilter;
import org.apache.activemq.network.DiscoveryNetworkConnector; import org.apache.activemq.network.DiscoveryNetworkConnector;
@ -119,6 +120,8 @@ public class BrokerService implements Service {
private boolean keepDurableSubsActive; private boolean keepDurableSubsActive;
private BrokerId brokerId;
/** /**
* Adds a new transport connector for the given bind address * Adds a new transport connector for the given bind address
* *
@ -364,8 +367,8 @@ public class BrokerService implements Service {
startAllConnectors(); startAllConnectors();
brokerId = broker.getBrokerId();
log.info("ActiveMQ JMS Message Broker (" + getBrokerName() + ") started"); log.info("ActiveMQ JMS Message Broker (" + getBrokerName()+", "+brokerId+") started");
} }
catch (Exception e) { catch (Exception e) {
log.error("Failed to start ActiveMQ JMS Message Broker. Reason: " + e, e); log.error("Failed to start ActiveMQ JMS Message Broker. Reason: " + e, e);
@ -377,7 +380,7 @@ public class BrokerService implements Service {
if (! started.compareAndSet(true, false)) { if (! started.compareAndSet(true, false)) {
return; return;
} }
log.info("ActiveMQ Message Broker (" + getBrokerName() + ") is shutting down"); log.info("ActiveMQ Message Broker (" + getBrokerName()+", "+brokerId+") is shutting down");
BrokerRegistry.getInstance().unbind(getBrokerName()); BrokerRegistry.getInstance().unbind(getBrokerName());
removeShutdownHook(); removeShutdownHook();
@ -433,7 +436,7 @@ public class BrokerService implements Service {
stopper.stop(getManagementContext()); stopper.stop(getManagementContext());
} }
log.info("ActiveMQ JMS Message Broker (" + getBrokerName() + ") stopped: "+broker); log.info("ActiveMQ JMS Message Broker (" + getBrokerName()+", "+brokerId+") stopped");
stopper.throwFirstException(); stopper.throwFirstException();
} }