activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dej...@apache.org
Subject svn commit: r1148646 - /activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/TransportConnector.java
Date Wed, 20 Jul 2011 08:17:52 GMT
Author: dejanb
Date: Wed Jul 20 08:17:51 2011
New Revision: 1148646

URL: http://svn.apache.org/viewvc?rev=1148646&view=rev
Log:
https://issues.apache.org/jira/browse/AMQ-3406 - BrokerServiceAware for DiscoveryAgent

Modified:
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/TransportConnector.java

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/TransportConnector.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/TransportConnector.java?rev=1148646&r1=1148645&r2=1148646&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/TransportConnector.java
(original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/TransportConnector.java
Wed Jul 20 08:17:51 2011
@@ -324,7 +324,13 @@ public class TransportConnector implemen
 
     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 implemen
     public int connectionCount() {
         return connections.size();
     }
-}
+}
\ No newline at end of file



Mime
View raw message