rolled back change for AMQ-944 which breaks multicast group names

git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@515689 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
James Strachan 2007-03-07 18:37:40 +00:00
parent 2ca08ce701
commit 618396d459
1 changed files with 6 additions and 17 deletions

View File

@ -17,22 +17,18 @@
*/
package org.apache.activemq.transport.discovery.multicast;
import java.io.IOException;
import java.net.URI;
import java.util.Map;
import org.apache.activemq.transport.discovery.DiscoveryAgent;
import org.apache.activemq.transport.discovery.DiscoveryAgentFactory;
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;
import java.io.IOException;
import java.net.URI;
import java.util.Map;
public class MulticastDiscoveryAgentFactory extends DiscoveryAgentFactory {
private static final Log log = LogFactory.getLog(MulticastDiscoveryAgentFactory.class);
protected DiscoveryAgent doCreateDiscoveryAgent(URI uri) throws IOException {
try {
@ -40,15 +36,8 @@ public class MulticastDiscoveryAgentFactory extends DiscoveryAgentFactory {
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);
}
// allow the discoveryURI to be set via a query argument on the URI
// ?discoveryURI=someURI
IntrospectionSupport.setProperties(rc, options);
return rc;