mirror of https://github.com/apache/activemq.git
- Perform the actual setup of the connectors when it is actually started.
git-svn-id: https://svn.apache.org/repos/asf/incubator/activemq/trunk@386603 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
a876eb3789
commit
635e6e7445
|
@ -154,18 +154,6 @@ public class BrokerService implements Service {
|
||||||
*/
|
*/
|
||||||
public TransportConnector addConnector(TransportConnector connector) throws Exception {
|
public TransportConnector addConnector(TransportConnector connector) throws Exception {
|
||||||
|
|
||||||
connector.setBroker(getBroker());
|
|
||||||
connector.setBrokerName(getBrokerName());
|
|
||||||
connector.setTaskRunnerFactory(getTaskRunnerFactory());
|
|
||||||
MessageAuthorizationPolicy policy = getMessageAuthorizationPolicy();
|
|
||||||
if (policy != null) {
|
|
||||||
connector.setMessageAuthorizationPolicy(policy);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (isUseJmx()) {
|
|
||||||
connector = connector.asManagedConnector(getManagementContext().getMBeanServer(), getBrokerObjectName());
|
|
||||||
registerConnectorMBean(connector);
|
|
||||||
}
|
|
||||||
transportConnectors.add(connector);
|
transportConnectors.add(connector);
|
||||||
|
|
||||||
return connector;
|
return connector;
|
||||||
|
@ -1056,7 +1044,7 @@ public class BrokerService implements Service {
|
||||||
if (!isSlave()){
|
if (!isSlave()){
|
||||||
for (Iterator iter = getTransportConnectors().iterator(); iter.hasNext();) {
|
for (Iterator iter = getTransportConnectors().iterator(); iter.hasNext();) {
|
||||||
TransportConnector connector = (TransportConnector) iter.next();
|
TransportConnector connector = (TransportConnector) iter.next();
|
||||||
connector.start();
|
startTransportConnector(connector);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (Iterator iter = getNetworkConnectors().iterator(); iter.hasNext();) {
|
for (Iterator iter = getNetworkConnectors().iterator(); iter.hasNext();) {
|
||||||
|
@ -1078,6 +1066,22 @@ public class BrokerService implements Service {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected void startTransportConnector(TransportConnector connector) throws Exception {
|
||||||
|
connector.setBroker(getBroker());
|
||||||
|
connector.setBrokerName(getBrokerName());
|
||||||
|
connector.setTaskRunnerFactory(getTaskRunnerFactory());
|
||||||
|
MessageAuthorizationPolicy policy = getMessageAuthorizationPolicy();
|
||||||
|
if (policy != null) {
|
||||||
|
connector.setMessageAuthorizationPolicy(policy);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (isUseJmx()) {
|
||||||
|
connector = connector.asManagedConnector(getManagementContext().getMBeanServer(), getBrokerObjectName());
|
||||||
|
registerConnectorMBean(connector);
|
||||||
|
}
|
||||||
|
connector.start();
|
||||||
|
}
|
||||||
|
|
||||||
public boolean isDeleteAllMessagesOnStartup() {
|
public boolean isDeleteAllMessagesOnStartup() {
|
||||||
return deleteAllMessagesOnStartup;
|
return deleteAllMessagesOnStartup;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue