mirror of https://github.com/apache/activemq.git
https://issues.apache.org/jira/browse/AMQ-3406 - BrokerServiceAware for DiscoveryAgent
git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@1148646 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
5f99d5c98a
commit
1b97cdd3c0
|
@ -324,7 +324,13 @@ public class TransportConnector implements Connector, BrokerServiceAware {
|
|||
|
||||
protected DiscoveryAgent createDiscoveryAgent() throws IOException {
|
||||
if (discoveryUri != null) {
|
||||
return DiscoveryAgentFactory.createDiscoveryAgent(discoveryUri);
|
||||
DiscoveryAgent agent = DiscoveryAgentFactory.createDiscoveryAgent(discoveryUri);
|
||||
|
||||
if( agent!=null && agent instanceof BrokerServiceAware ) {
|
||||
((BrokerServiceAware)agent).setBrokerService(brokerService);
|
||||
}
|
||||
|
||||
return agent;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
@ -551,4 +557,4 @@ public class TransportConnector implements Connector, BrokerServiceAware {
|
|||
public int connectionCount() {
|
||||
return connections.size();
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue