activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jstrac...@apache.org
Subject svn commit: r515556 - /activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/discovery/multicast/MulticastDiscoveryAgentFactory.java
Date Wed, 07 Mar 2007 13:04:21 GMT
Author: jstrachan
Date: Wed Mar  7 05:04:19 2007
New Revision: 515556

URL: http://svn.apache.org/viewvc?view=rev&rev=515556
Log:
applied patch for AMQ-944

Modified:
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/discovery/multicast/MulticastDiscoveryAgentFactory.java

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/discovery/multicast/MulticastDiscoveryAgentFactory.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/discovery/multicast/MulticastDiscoveryAgentFactory.java?view=diff&rev=515556&r1=515555&r2=515556
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/discovery/multicast/MulticastDiscoveryAgentFactory.java
(original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/discovery/multicast/MulticastDiscoveryAgentFactory.java
Wed Mar  7 05:04:19 2007
@@ -26,15 +26,29 @@
 import org.apache.activemq.util.IOExceptionSupport;
 import org.apache.activemq.util.IntrospectionSupport;
 import org.apache.activemq.util.URISupport;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
 
 public class MulticastDiscoveryAgentFactory extends DiscoveryAgentFactory {
 
+    private static final Log log = LogFactory.getLog(MulticastDiscoveryAgentFactory.class);
+    
     protected DiscoveryAgent doCreateDiscoveryAgent(URI uri) throws IOException {
         try {
             
             Map options = URISupport.parseParamters(uri);
             MulticastDiscoveryAgent rc = new MulticastDiscoveryAgent();
             rc.setGroup(uri.getHost());
+
+            if ("default".equals(uri.getHost())) {
+                log.info("Using default discovery uri " + uri);
+
+            } else {
+                // only set the discovery URI if a non-default multicast IP/port endpoint
is being used.
+                log.info("Setting discovery uri to " + uri);
+                rc.setDiscoveryURI(uri);
+            }
+            
             IntrospectionSupport.setProperties(rc, options);
             return rc;
             



Mime
View raw message