git-svn-id: https://svn.apache.org/repos/asf/incubator/activemq/trunk@477570 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Jonas B. Lim 2006-11-21 08:15:10 +00:00
parent 878b9645ce
commit e34cbc1b07
1 changed files with 13 additions and 2 deletions

View File

@ -1463,9 +1463,18 @@ public class BrokerService implements Service, Serializable {
*/
protected void startAllConnectors() throws Exception{
if (!isSlave()){
ArrayList al = new ArrayList();
for (Iterator iter = getTransportConnectors().iterator(); iter.hasNext();) {
TransportConnector connector = (TransportConnector) iter.next();
startTransportConnector(connector);
al.add(startTransportConnector(connector));
}
if (al.size()>0) {
//let's clear the transportConnectors list and replace it with the started transportConnector instances
this.transportConnectors.clear();
setTransportConnectors(al);
}
for (Iterator iter = getNetworkConnectors().iterator(); iter.hasNext();) {
@ -1495,7 +1504,7 @@ public class BrokerService implements Service, Serializable {
}
}
protected void startTransportConnector(TransportConnector connector) throws Exception {
protected TransportConnector startTransportConnector(TransportConnector connector) throws Exception {
connector.setBroker(getBroker());
connector.setBrokerName(getBrokerName());
connector.setTaskRunnerFactory(getTaskRunnerFactory());
@ -1508,6 +1517,8 @@ public class BrokerService implements Service, Serializable {
connector = registerConnectorMBean(connector);
}
connector.start();
return connector;
}
/**