You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@geode.apache.org by bs...@apache.org on 2015/08/11 23:51:23 UTC

[3/4] incubator-geode git commit: enabling multicast communications and fixing a locator auto-restart problem. This disables the use of multicast for discovery and all tests that were doing that have been changed to use locators.

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3c560cb9/gemfire-core/src/main/java/com/gemstone/gemfire/internal/admin/remote/RemoteGfManagerAgent.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/admin/remote/RemoteGfManagerAgent.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/admin/remote/RemoteGfManagerAgent.java
index 53f8e02..b49b192 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/admin/remote/RemoteGfManagerAgent.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/admin/remote/RemoteGfManagerAgent.java
@@ -57,7 +57,6 @@ import com.gemstone.gemfire.internal.logging.InternalLogWriter;
 import com.gemstone.gemfire.internal.logging.LogService;
 import com.gemstone.gemfire.internal.logging.LogWriterFactory;
 import com.gemstone.gemfire.internal.logging.LoggingThreadGroup;
-import com.gemstone.gemfire.internal.logging.SecurityLogWriter;
 import com.gemstone.gemfire.internal.logging.log4j.LocalizedMessage;
 import com.gemstone.gemfire.internal.logging.log4j.LogMarker;
 import com.gemstone.gemfire.security.AuthenticationFailedException;
@@ -287,24 +286,20 @@ public
   }
   
   private void join() {
-    if (transport.isMcastDiscovery()) {
-      connectToDS();
-    } else {
-      daemon = new DSConnectionDaemon();
-      daemon.start();
-      // give the daemon some time to get us connected
-      // we don't want to wait forever since there may be no one to connect to
-      try {
-        long endTime = System.currentTimeMillis() + 2000; // wait 2 seconds
-        while (!connected && daemon.isAlive() && System.currentTimeMillis() < endTime) {
-          daemon.join(200);
-        }
-      } 
-      catch (InterruptedException ignore) {
-        Thread.currentThread().interrupt();
-        // Peremptory cancellation check, but keep going
-        this.system.getCancelCriterion().checkCancelInProgress(ignore);
+    daemon = new DSConnectionDaemon();
+    daemon.start();
+    // give the daemon some time to get us connected
+    // we don't want to wait forever since there may be no one to connect to
+    try {
+      long endTime = System.currentTimeMillis() + 2000; // wait 2 seconds
+      while (!connected && daemon.isAlive() && System.currentTimeMillis() < endTime) {
+        daemon.join(200);
       }
+    } 
+    catch (InterruptedException ignore) {
+      Thread.currentThread().interrupt();
+      // Peremptory cancellation check, but keep going
+      this.system.getCancelCriterion().checkCancelInProgress(ignore);
     }
   }
 
@@ -404,9 +399,9 @@ public
         this.system = null;
         this.connected = false;
       }
-      if (!transport.isMcastDiscovery()) {
-        daemon.shutDown();
-      }
+
+      daemon.shutDown();
+      
       if (snapshotDispatcher != null) {
         snapshotDispatcher.shutDown();
       }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3c560cb9/gemfire-core/src/main/java/com/gemstone/gemfire/internal/admin/remote/RemoteTransportConfig.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/admin/remote/RemoteTransportConfig.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/admin/remote/RemoteTransportConfig.java
index 073e245..28db8cc 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/admin/remote/RemoteTransportConfig.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/admin/remote/RemoteTransportConfig.java
@@ -7,6 +7,7 @@
  */
 package com.gemstone.gemfire.internal.admin.remote;
 
+import com.gemstone.gemfire.GemFireConfigException;
 import com.gemstone.gemfire.distributed.internal.*;
 import com.gemstone.gemfire.internal.*;
 import com.gemstone.gemfire.internal.admin.*;
@@ -26,7 +27,6 @@ import java.util.*;
 public class RemoteTransportConfig implements TransportConfig {
   
   private final boolean mcastEnabled;
-  private final boolean mcastDiscovery;
   private final boolean tcpDisabled;
   private final boolean disableAutoReconnect;
   private final DistributionLocatorId mcastId;
@@ -41,32 +41,6 @@ public class RemoteTransportConfig implements TransportConfig {
   // -------------------------------------------------------------------------
   //   Constructor(s)
   // -------------------------------------------------------------------------
-  
-  public RemoteTransportConfig(int port) {
-    this(port, null);
-  }
-  
-  /**
-   * Constructs a simple transport config that specifies just a port.
-   * The port must be the one a DistributionLocator is listening
-   * to on the local host. 
-   */
-  public RemoteTransportConfig(int port, String bindAddress) {
-    if (bindAddress == null) {
-      this.bindAddress = DistributionConfig.DEFAULT_BIND_ADDRESS;
-    } else {
-      this.bindAddress = bindAddress;
-    }
-    this.sslConfig = new SSLConfig();
-    this.mcastEnabled = false;
-    this.mcastDiscovery = false;
-    this.tcpDisabled = false;
-    this.disableAutoReconnect = false;
-    this.mcastId = null;
-    this.ids = Collections.singleton(new DistributionLocatorId(port, bindAddress));
-    this.membershipPortRange = 
-       getMembershipPortRangeString(DistributionConfig.DEFAULT_MEMBERSHIP_PORT_RANGE);
-  }
 
   /**
    * Creates a new <code>RemoteTransportConfig</code> from the
@@ -109,22 +83,11 @@ public class RemoteTransportConfig implements TransportConfig {
 
     // See what type of discovery is being used
     if (initialHosts.length() == 0) {
-      if (!this.mcastEnabled) {
-        // loner system
-        this.mcastDiscovery = false;
-        this.ids = Collections.EMPTY_SET;
-      }
-      else {
-        // multicast discovery
-        this.mcastDiscovery = true;
-        this.ids = Collections.singleton(this.mcastId);
-      }
+      // loner system
+      this.ids = Collections.EMPTY_SET;
       return;
     }
     else {
-      // locator-based discovery
-      this.mcastDiscovery = false;
-
       HashSet locators = new HashSet();
       int startIdx = 0;
       int endIdx = -1;
@@ -157,7 +120,6 @@ public class RemoteTransportConfig implements TransportConfig {
    */
   public RemoteTransportConfig(
     boolean isMcastEnabled,
-    boolean isMcastDiscovery, 
     boolean isTcpDisabled,
     boolean isAutoReconnectDisabled,
     String bindAddress, 
@@ -176,7 +138,6 @@ public class RemoteTransportConfig implements TransportConfig {
     this.sslConfig = sslConfig;
     
     this.mcastEnabled = isMcastEnabled;
-    this.mcastDiscovery = isMcastDiscovery;
     this.tcpDisabled = isTcpDisabled;
     this.disableAutoReconnect = isAutoReconnectDisabled;
     if (isMcastEnabled) {
@@ -227,13 +188,6 @@ public class RemoteTransportConfig implements TransportConfig {
   public Set getIds() {
     return this.ids;
   }
-  /**
-   * Returns true if config picked multicast.
-   * Returns false if config picked locators.
-   */
-  public boolean isMcastDiscovery() {
-    return this.mcastDiscovery;
-  }
   
   /**
    * Returns true iff multicast is enabled in this transport.
@@ -301,9 +255,6 @@ public class RemoteTransportConfig implements TransportConfig {
     if (this.tcpPort != 0) {
       props.setProperty(DistributionConfig.TCP_PORT_NAME, String.valueOf(this.tcpPort));
     }
-//System.out.println("RemoteTransportConfig.mcastEnabled=" + this.mcastEnabled);
-//System.out.println("RemoteTransportConfig.mcastDiscovery=" + this.mcastDiscovery);
-//Thread.currentThread().dumpStack();
     if (this.mcastEnabled) {
        // Fix bug 32849
        props.setProperty(DistributionConfig.MCAST_ADDRESS_NAME,
@@ -316,33 +267,32 @@ public class RemoteTransportConfig implements TransportConfig {
       props.setProperty(DistributionConfig.MCAST_PORT_NAME, 
                         String.valueOf(0));
     }
-    if (!this.mcastDiscovery) {
-      // Create locator string
-      StringBuffer locators = new StringBuffer();
-      for (Iterator iter = this.ids.iterator(); iter.hasNext(); ) {
-        DistributionLocatorId locator =
+    // Create locator string
+    StringBuffer locators = new StringBuffer();
+    for (Iterator iter = this.ids.iterator(); iter.hasNext(); ) {
+      DistributionLocatorId locator =
           (DistributionLocatorId) iter.next();
-        if (!locator.isMcastId()) {
-          String baddr = locator.getBindAddress();
-          if (baddr != null && baddr.trim().length() > 0) {
-            locators.append(baddr);
-          }
-          else {
-            locators.append(locator.getHost().getCanonicalHostName());
-          }
-          locators.append("[");
-          locators.append(locator.getPort());
-          locators.append("]");
+      if (!locator.isMcastId()) {
+        String baddr = locator.getBindAddress();
+        if (baddr != null && baddr.trim().length() > 0) {
+          locators.append(baddr);
+        }
+        else {
+          locators.append(locator.getHost().getCanonicalHostName());
+        }
+        locators.append("[");
+        locators.append(locator.getPort());
+        locators.append("]");
 
-          if (iter.hasNext()) {
-            locators.append(",");
-          }
+        if (iter.hasNext()) {
+          locators.append(",");
         }
       }
-
-      props.setProperty(DistributionConfig.LOCATORS_NAME,
-                        locators.toString());
     }
+
+    props.setProperty(DistributionConfig.LOCATORS_NAME,
+        locators.toString());
+
     this.sslConfig.toDSProperties(props);
     
     props.setProperty(DistributionConfig.DISABLE_TCP_NAME,
@@ -392,7 +342,6 @@ public class RemoteTransportConfig implements TransportConfig {
     if (o != null && o instanceof RemoteTransportConfig) {
       RemoteTransportConfig other = (RemoteTransportConfig)o;
       return (this.mcastEnabled == other.mcastEnabled)
-        && (this.mcastDiscovery == other.mcastDiscovery)
         && this.ids.equals(other.ids);
     }
     return false;
@@ -400,7 +349,7 @@ public class RemoteTransportConfig implements TransportConfig {
   
   @Override
   public int hashCode() {
-    return this.ids.hashCode() + (isMcastDiscovery() ? 1 : 0);
+    return this.ids.hashCode();
   }
   
 }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3c560cb9/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/DistributedCacheOperation.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/DistributedCacheOperation.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/DistributedCacheOperation.java
index d557be6..c30c72a 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/DistributedCacheOperation.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/DistributedCacheOperation.java
@@ -416,8 +416,8 @@ public abstract class DistributedCacheOperation {
           RemoteOperationMessage rmsg = entryEvent.getRemoteOperationMessage();
           if (rmsg != null) {
             recipients.remove(rmsg.getSender());
+            useMulticast = false; // bug #45106: can't mcast or the sender of the one-hop op will get it
           }
-          useMulticast = false; // bug #45106: can't mcast or the sender of the one-hop op will get it
         }
         
         if (logger.isDebugEnabled()) {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3c560cb9/gemfire-core/src/main/java/com/gemstone/gemfire/internal/i18n/ParentLocalizedStrings.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/i18n/ParentLocalizedStrings.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/i18n/ParentLocalizedStrings.java
index 08e47d2..875902c 100755
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/i18n/ParentLocalizedStrings.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/i18n/ParentLocalizedStrings.java
@@ -191,7 +191,7 @@ class ParentLocalizedStrings {
   public static final StringId CacheDistributionAdvisor_WAITING_FOR_CURRENT_OPERATIONS_TO_FINISH_0_ = new StringId(1178, "Waiting for current operations to finish( {0} )");
   public static final StringId CacheFactory_0_AN_OPEN_CACHE_ALREADY_EXISTS = new StringId(1179, "{0}: An open cache already exists.");
   public static final StringId InternalDistributedSystem_shutdownHook_shuttingdown = new StringId(1180, "VM is exiting - shutting down distributed system");
-  public static final StringId GroupMembershipService_entered_into_membership_in_group_0_with_id_1 = new StringId(1181, "Entered into membership with ID {0}.");
+  public static final StringId GroupMembershipService_entered_into_membership_in_group_0_with_id_1 = new StringId(1181, "Finished joining (took {}ms).");
   public static final StringId CacheServerLauncher_CACHE_SERVER_ERROR = new StringId(1182, "Cache server error");
   public static final StringId CacheXmlParser_XML_PARSER_CHARACTERS_APPENDED_CHARACTER_DATA_0 = new StringId(1183, "XML Parser characters, appended character data: {0}");
   public static final StringId CacheXmlParser_XML_PARSER_CHARACTERS_NEW_CHARACTER_DATA_0 = new StringId(1184, "XML Parser characters, new character data: {0}");

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3c560cb9/gemfire-core/src/main/java/com/gemstone/gemfire/internal/redis/RegionCache.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/redis/RegionCache.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/redis/RegionCache.java
index 68f50ba..f744f4a 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/redis/RegionCache.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/redis/RegionCache.java
@@ -260,7 +260,7 @@ public class RegionCache implements Closeable {
    */
   private Region<?, ?> createRegionGlobally(String key) {
     Region<?, ?> r = null;
-    Result result = cliCmds.createRegion(key, GemFireRedisServer.DEFAULT_REGION_TYPE, null, null, true, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null);
+    Result result = cliCmds.createRegion(key, GemFireRedisServer.DEFAULT_REGION_TYPE, null, null, true, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null);
     r = cache.getRegion(key);
     if (result.getStatus() == Status.ERROR && r == null) {
       String err = "";

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3c560cb9/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/cli/commands/CreateAlterDestroyRegionCommands.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/cli/commands/CreateAlterDestroyRegionCommands.java b/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/cli/commands/CreateAlterDestroyRegionCommands.java
index 919d6fe..1bba887 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/cli/commands/CreateAlterDestroyRegionCommands.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/cli/commands/CreateAlterDestroyRegionCommands.java
@@ -129,7 +129,8 @@ public class CreateAlterDestroyRegionCommands extends AbstractCommandsSupport {
                   help = CliStrings.CREATE_REGION__SKIPIFEXISTS__HELP)
       boolean skipIfExists,
       
-      // the following should all be in alphabetical order
+      // the following should all be in alphabetical order according to
+      // their key string
       @CliOption (key = CliStrings.CREATE_REGION__ASYNCEVENTQUEUEID,
                   help = CliStrings.CREATE_REGION__ASYNCEVENTQUEUEID__HELP)
       @CliMetaData (valueSeparator = ",") 
@@ -172,6 +173,10 @@ public class CreateAlterDestroyRegionCommands extends AbstractCommandsSupport {
                   unspecifiedDefaultValue = CliMetaData.ANNOTATION_NULL_VALUE,
                   help = CliStrings.CREATE_REGION__CONCURRENCYCHECKSENABLED__HELP)
       Boolean concurrencyChecksEnabled,
+      @CliOption (key = CliStrings.CREATE_REGION__MULTICASTENABLED,
+                  unspecifiedDefaultValue = CliMetaData.ANNOTATION_NULL_VALUE,
+                  help = CliStrings.CREATE_REGION__MULTICASTENABLED__HELP)
+      Boolean mcastEnabled,
       @CliOption (key = CliStrings.CREATE_REGION__STATISTICSENABLED,
                   unspecifiedDefaultValue = CliMetaData.ANNOTATION_NULL_VALUE,
                   help = CliStrings.CREATE_REGION__STATISTICSENABLED__HELP)
@@ -319,7 +324,7 @@ public class CreateAlterDestroyRegionCommands extends AbstractCommandsSupport {
             prColocatedWith, prLocalMaxMemory, prRecoveryDelay,
             prRedundantCopies, prStartupRecoveryDelay,
             prTotalMaxMemory, prTotalNumBuckets,
-            offHeap, hdfsStoreName , hdfsWriteOnly,  regionAttributes);
+            offHeap, hdfsStoreName , hdfsWriteOnly,  mcastEnabled, regionAttributes);
         
 
         if (regionAttributes.getPartitionAttributes() == null && regionFunctionArgs.hasPartitionAttributes()) {
@@ -339,7 +344,7 @@ public class CreateAlterDestroyRegionCommands extends AbstractCommandsSupport {
           concurrencyChecksEnabled, cloningEnabled, concurrencyLevel, 
           prColocatedWith, prLocalMaxMemory, prRecoveryDelay,
           prRedundantCopies, prStartupRecoveryDelay,
-          prTotalMaxMemory, prTotalNumBuckets, null,compressor, offHeap , hdfsStoreName , hdfsWriteOnly);
+          prTotalMaxMemory, prTotalNumBuckets, null,compressor, offHeap , hdfsStoreName , hdfsWriteOnly, mcastEnabled);
         
         if (!regionShortcut.name().startsWith("PARTITION") && regionFunctionArgs.hasPartitionAttributes()) {
           throw new IllegalArgumentException(
@@ -583,7 +588,7 @@ public class CreateAlterDestroyRegionCommands extends AbstractCommandsSupport {
       RegionFunctionArgs regionFunctionArgs = null;
       regionFunctionArgs = new RegionFunctionArgs(regionPath, null, null, false, null, null, null, entryIdle, entryTTL,
         regionIdle, regionTTL, null, null, null, null, cacheListeners, cacheLoader, cacheWriter, asyncEventQueueIds,
-        gatewaySenderIds, null, cloningEnabled, null, null, null, null, null, null, null, null, evictionMax, null, null);
+        gatewaySenderIds, null, cloningEnabled, null, null, null, null, null, null, null, null, evictionMax, null, null, null);
 
       Set<String> cacheListenersSet = regionFunctionArgs.getCacheListeners();
       if (cacheListenersSet != null && !cacheListenersSet.isEmpty()) {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3c560cb9/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/cli/functions/RegionCreateFunction.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/cli/functions/RegionCreateFunction.java b/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/cli/functions/RegionCreateFunction.java
index 74afc47..b228aec 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/cli/functions/RegionCreateFunction.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/cli/functions/RegionCreateFunction.java
@@ -279,6 +279,11 @@ public class RegionCreateFunction extends FunctionAdapter implements InternalEnt
     if (regionCreateArgs.isSetCloningEnabled()) {
       factory.setCloningEnabled(regionCreateArgs.isCloningEnabled());
     }
+    
+    // multicast enabled for replication
+    if (regionCreateArgs.isSetMcastEnabled()) {
+      factory.setMulticastEnabled(regionCreateArgs.isMcastEnabled());
+    }
 
     // Set plugins
     final Set<String> cacheListeners = regionCreateArgs.getCacheListeners();

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3c560cb9/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/cli/functions/RegionFunctionArgs.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/cli/functions/RegionFunctionArgs.java b/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/cli/functions/RegionFunctionArgs.java
index bd5e196..6cd4856 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/cli/functions/RegionFunctionArgs.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/cli/functions/RegionFunctionArgs.java
@@ -62,6 +62,8 @@ public class RegionFunctionArgs implements Serializable {
   private final boolean isSetConcurrencyChecksEnabled;
   private Boolean cloningEnabled;
   private final boolean isSetCloningEnabled;
+  private Boolean mcastEnabled;
+  private final boolean isSetMcastEnabled;
   private Integer concurrencyLevel;
   private final boolean isSetConcurrencyLevel;
   private final PartitionArgs partitionArgs;
@@ -92,7 +94,7 @@ public class RegionFunctionArgs implements Serializable {
 	      Integer prLocalMaxMemory, Long prRecoveryDelay,
 	      Integer prRedundantCopies, Long prStartupRecoveryDelay,
 	      Long prTotalMaxMemory, Integer prTotalNumBuckets, Integer evictionMax,
-	      String compressor, Boolean offHeap , String hdfsStoreName , Boolean hdfsWriteOnly) {	
+	      String compressor, Boolean offHeap , String hdfsStoreName , Boolean hdfsWriteOnly, Boolean mcastEnabled) {	
 		this(regionPath, regionShortcut, useAttributesFrom, skipIfExists,
 				keyConstraint, valueConstraint, statisticsEnabled,
 				entryExpirationIdleTime, entryExpirationTTL,
@@ -103,13 +105,14 @@ public class RegionFunctionArgs implements Serializable {
 				concurrencyChecksEnabled, cloningEnabled, concurrencyLevel,
 				prColocatedWith, prLocalMaxMemory, prRecoveryDelay,
 				prRedundantCopies, prStartupRecoveryDelay, prTotalMaxMemory,
-				prTotalNumBuckets, evictionMax, compressor, offHeap);	
+				prTotalNumBuckets, evictionMax, compressor, offHeap, mcastEnabled);	
 		this.isSetHdfsWriteOnly = hdfsWriteOnly != null;
 		if (isSetHdfsWriteOnly) {
 			this.hdfsWriteOnly = hdfsWriteOnly;
 		}
-		if (hdfsStoreName != null )
+		if (hdfsStoreName != null ) {
 		  this.hdfsStoreName = hdfsStoreName;
+		}
   }
   public RegionFunctionArgs(String regionPath,
       RegionShortcut regionShortcut, String useAttributesFrom,
@@ -127,7 +130,7 @@ public class RegionFunctionArgs implements Serializable {
       Integer prLocalMaxMemory, Long prRecoveryDelay,
       Integer prRedundantCopies, Long prStartupRecoveryDelay,
       Long prTotalMaxMemory, Integer prTotalNumBuckets, Integer evictionMax,
-      String compressor, Boolean offHeap) {
+      String compressor, Boolean offHeap, Boolean mcastEnabled) {
     this.regionPath = regionPath;
     this.regionShortcut = regionShortcut;
     this.useAttributesFrom = useAttributesFrom;
@@ -184,6 +187,10 @@ public class RegionFunctionArgs implements Serializable {
     if (this.isSetCloningEnabled) {
       this.cloningEnabled = cloningEnabled;
     }
+    this.isSetMcastEnabled = mcastEnabled != null;
+    if (isSetMcastEnabled) {
+      this.mcastEnabled = mcastEnabled;
+    }
     this.isSetConcurrencyLevel = concurrencyLevel != null;
     if (this.isSetConcurrencyLevel) {
       this.concurrencyLevel = concurrencyLevel;
@@ -220,7 +227,7 @@ public class RegionFunctionArgs implements Serializable {
       Integer prRedundantCopies, Long prStartupRecoveryDelay,
       Long prTotalMaxMemory, Integer prTotalNumBuckets, 
       Boolean offHeap, String hdfsStoreName , Boolean hdfsWriteOnly , 
-      RegionAttributes<?, ?> regionAttributes) {   
+      Boolean mcastEnabled, RegionAttributes<?, ?> regionAttributes) {   
     this(regionPath, null, useAttributesFrom, skipIfExists, keyConstraint,
         valueConstraint, statisticsEnabled, entryExpirationIdleTime,
         entryExpirationTTL, regionExpirationIdleTime, regionExpirationTTL,
@@ -230,7 +237,7 @@ public class RegionFunctionArgs implements Serializable {
         concurrencyChecksEnabled, cloningEnabled, concurrencyLevel, 
         prColocatedWith, prLocalMaxMemory, prRecoveryDelay,
         prRedundantCopies, prStartupRecoveryDelay,
-        prTotalMaxMemory, prTotalNumBuckets, null, null, offHeap , hdfsStoreName , hdfsWriteOnly);
+        prTotalMaxMemory, prTotalNumBuckets, null, null, offHeap , hdfsStoreName , hdfsWriteOnly, mcastEnabled);
     this.regionAttributes = regionAttributes;
   }
 
@@ -477,6 +484,20 @@ public class RegionFunctionArgs implements Serializable {
   }
 
   /**
+   * @return the mcastEnabled setting
+   */
+  public Boolean isMcastEnabled() {
+    return this.mcastEnabled;
+  }
+
+  /**
+   * @return the isSetCloningEnabled
+   */
+  public Boolean isSetMcastEnabled() {
+    return this.isSetMcastEnabled;
+  }
+
+  /**
    * @return the concurrencyLevel
    */
   public Integer getConcurrencyLevel() {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3c560cb9/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/cli/i18n/CliStrings.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/cli/i18n/CliStrings.java b/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/cli/i18n/CliStrings.java
index c65212f..858701d 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/cli/i18n/CliStrings.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/cli/i18n/CliStrings.java
@@ -78,7 +78,7 @@ public class CliStrings {
   public static final String TOPIC_GEMFIRE_DISKSTORE = "Disk Store";
   public static final String TOPIC_GEMFIRE_DISKSTORE__DESC = "Disk stores are used to persist data to disk as a backup to your in-memory copy or as overflow storage when memory use is too high.";
   public static final String TOPIC_GEMFIRE_LOCATOR = "Locator";
-  public static final String TOPIC_GEMFIRE_LOCATOR__DESC = "JVMs running GemFire discover each other through multicast messaging or through a TCP service named the locator.";
+  public static final String TOPIC_GEMFIRE_LOCATOR__DESC = "JVMs running GemFire discover each other through a TCP service named the locator.";
   public static final String TOPIC_GEMFIRE_SERVER = "Server";
   public static final String TOPIC_GEMFIRE_SERVER__DESC = "A server is GemFire cluster member which holds a GemFire cache. Depending on the topology used it can refer to either a system that responds to client requests or a system that is only a peer to other members.";
   public static final String TOPIC_GEMFIRE_MANAGER = "Manager";
@@ -604,6 +604,8 @@ public class CliStrings {
   public static final String CREATE_REGION__COLOCATEDWITH__HELP = "Central Region with which this region should be colocated.";
   public static final String CREATE_REGION__LOCALMAXMEMORY = "local-max-memory";
   public static final String CREATE_REGION__LOCALMAXMEMORY__HELP = "Sets the maximum amount of memory, in megabytes, to be used by the region in this process. (Default: 90% of available heap)";
+  public static final String CREATE_REGION__MULTICASTENABLED = "enable-multicast";
+  public static final String CREATE_REGION__MULTICASTENABLED__HELP = "Enables multicast messaging on the region.  Multicast must also be enabled in the cache distributed system properties.  This is primarily useful for replicated regions that are in all servers.";
   public static final String CREATE_REGION__RECOVERYDELAY = "recovery-delay";
   public static final String CREATE_REGION__RECOVERYDELAY__HELP = "Sets the delay in milliseconds that existing members will wait before satisfying redundancy after another member crashes. -1 (the default) indicates that redundancy will not be recovered after a failure.";
   public static final String CREATE_REGION__REDUNDANTCOPIES = "redundant-copies";
@@ -1725,9 +1727,9 @@ public class CliStrings {
   public static final String START_LOCATOR__LOG_LEVEL = "log-level";
   public static final String START_LOCATOR__LOG_LEVEL__HELP = "Sets the level of output logged to the Locator log file.  Possible values for log-level include: finest, finer, fine, config, info, warning, severe, none.";
   public static final String START_LOCATOR__MCAST_ADDRESS = "mcast-address";
-  public static final String START_LOCATOR__MCAST_ADDRESS__HELP = "The IP address or hostname used to bind the UPD socket for multi-cast networking so the Locator can locate other members in the GemFire cluster.  If mcast-port is zero, then mcast-address is ignored.";
+  public static final String START_LOCATOR__MCAST_ADDRESS__HELP = "The IP address or hostname used to bind the UPD socket for multi-cast networking so the Locator can communicate other members in the GemFire cluster using a common multicast address and port.  If mcast-port is zero, then mcast-address is ignored.";
   public static final String START_LOCATOR__MCAST_PORT = "mcast-port";
-  public static final String START_LOCATOR__MCAST_PORT__HELP = "Sets the port used for multi-cast networking so the Locator can locate other members of the GemFire cluster.  A zero value disables mcast.";
+  public static final String START_LOCATOR__MCAST_PORT__HELP = "Sets the port used for multi-cast networking so the Locator can communicate with other members of the GemFire cluster.  A zero value disables mcast.";
   public static final String START_LOCATOR__MEMBER_NAME = "name";
   public static final String START_LOCATOR__MEMBER_NAME__HELP = "The member name to give this Locator in the GemFire cluster.";
   public static final String START_LOCATOR__PORT = "port";
@@ -1820,9 +1822,9 @@ public class CliStrings {
   public static final String START_SERVER__MAXHEAP = "max-heap";
   public static final String START_SERVER__MAXHEAP__HELP = "Maximum size of the heap in the same format as the JVM -Xmx parameter.";
   public static final String START_SERVER__MCAST_ADDRESS = "mcast-address";
-  public static final String START_SERVER__MCAST_ADDRESS__HELP = "The IP address or hostname used to bind the UPD socket for multi-cast networking so the Cache Server can locate other members in the GemFire cluster.  If mcast-port is zero, then mcast-address is ignored.";
+  public static final String START_SERVER__MCAST_ADDRESS__HELP = "The IP address or hostname used to bind the UPD socket for multi-cast networking so the Cache Server can communicate with other members in the GemFire cluster.  If mcast-port is zero, then mcast-address is ignored.";
   public static final String START_SERVER__MCAST_PORT = "mcast-port";
-  public static final String START_SERVER__MCAST_PORT__HELP = "Sets the port used for multi-cast networking so the Cache Server can locate other members of the GemFire cluster.  A zero value disables mcast.";
+  public static final String START_SERVER__MCAST_PORT__HELP = "Sets the port used for multi-cast networking so the Cache Server can communicate with other members of the GemFire cluster.  A zero value disables mcast.";
   public static final String START_SERVER__NAME = "name";
   public static final String START_SERVER__NAME__HELP = "The member name to give this Cache Server in the GemFire cluster.";
   public static final String START_SERVER__MEMCACHED_PORT = "memcached-port";

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3c560cb9/gemfire-core/src/main/resources/com/gemstone/gemfire/distributed/internal/jgroups-config.xml
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/resources/com/gemstone/gemfire/distributed/internal/jgroups-config.xml b/gemfire-core/src/main/resources/com/gemstone/gemfire/distributed/internal/jgroups-config.xml
index 186a523..5bae9e6 100755
--- a/gemfire-core/src/main/resources/com/gemstone/gemfire/distributed/internal/jgroups-config.xml
+++ b/gemfire-core/src/main/resources/com/gemstone/gemfire/distributed/internal/jgroups-config.xml
@@ -1,51 +1,55 @@
 <config xmlns="urn:org:jgroups"
-        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-        xsi:schemaLocation="urn:org:jgroups http://www.jgroups.org/schema/jgroups.xsd">
-  <UDP
-         BIND_ADDR_SETTING
-         bind_port="MEMBERSHIP_PORT_RANGE_START"
-         port_range="MEMBERSHIP_PORT_RANGE_END"
-         mcast_port="0"
-         tos="16"
-         ip_mcast="false"
-         ignore_dont_bundle="false"
-         ucast_recv_buf_size="UDP_RECV_BUFFER_SIZE"
-         ucast_send_buf_size="UDP_SEND_BUFFER_SIZE"
-         thread_naming_pattern="UDP Message Handler"
-         enable_batching="false"
-         enable_diagnostics="false"
-         disable_loopback="false"
-         
-         timer_type="new3"
-         timer.min_threads="1"
-         timer.max_threads="4"
-         timer.keep_alive_time="3000"
-         timer.queue_max_size="500"
+  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:schemaLocation="urn:org:jgroups http://www.jgroups.org/schema/jgroups.xsd">
+<UDP
+  BIND_ADDR_SETTING
+  bind_port="MEMBERSHIP_PORT_RANGE_START"
+  port_range="MEMBERSHIP_PORT_RANGE_END"
+  mcast_port="0"
+  tos="16"
+  ip_mcast="false"
+  ignore_dont_bundle="false"
+  ucast_recv_buf_size="UDP_RECV_BUFFER_SIZE"
+  ucast_send_buf_size="UDP_SEND_BUFFER_SIZE"
+  thread_naming_pattern="UDP Message Handler"
+  enable_batching="false"
+  enable_diagnostics="false"
+  disable_loopback="false"
+  
+  timer_type="new3"
+  timer.min_threads="1"
+  timer.max_threads="4"
+  timer.keep_alive_time="3000"
+  timer.queue_max_size="500"
 
-         thread_pool.enabled="true"
-         thread_pool.min_threads="1"
-         thread_pool.max_threads="4"
-         thread_pool.keep_alive_time="5000"
-         thread_pool.queue_enabled="true"
-         thread_pool.queue_max_size="10000"
-         thread_pool.rejection_policy="discard"
+  thread_pool.enabled="true"
+  thread_pool.min_threads="1"
+  thread_pool.max_threads="4"
+  thread_pool.keep_alive_time="5000"
+  thread_pool.queue_enabled="true"
+  thread_pool.queue_max_size="10000"
+  thread_pool.rejection_policy="discard"
 
-         oob_thread_pool.enabled="true"
-         oob_thread_pool.min_threads="1"
-         oob_thread_pool.max_threads="4"
-         oob_thread_pool.keep_alive_time="5000"
-         oob_thread_pool.queue_enabled="false"
-         oob_thread_pool.queue_max_size="100"
-         oob_thread_pool.rejection_policy="discard"
-         />
-  <com.gemstone.gemfire.distributed.internal.membership.gms.messenger.AddressManager/>
-  <UNICAST3
-          xmit_interval="500"
-          xmit_table_num_rows="100"
-          xmit_table_msgs_per_row="2000"
-          xmit_table_max_compaction_time="60000"
-          conn_expiry_timeout="0"
-          max_msg_batch_size="500"/>
-  <!-- do we need UFC? -->
-  <FRAG2 frag_size="UDP_FRAGMENT_SIZE"/>
+  oob_thread_pool.enabled="true"
+  oob_thread_pool.min_threads="1"
+  oob_thread_pool.max_threads="4"
+  oob_thread_pool.keep_alive_time="5000"
+  oob_thread_pool.queue_enabled="false"
+  oob_thread_pool.queue_max_size="100"
+  oob_thread_pool.rejection_policy="discard"
+  />
+<com.gemstone.gemfire.distributed.internal.membership.gms.messenger.AddressManager/>
+<UNICAST3
+  xmit_interval="500"
+  xmit_table_num_rows="100"
+  xmit_table_msgs_per_row="2000"
+  xmit_table_max_compaction_time="60000"
+  conn_expiry_timeout="0"
+  max_msg_batch_size="500"/>
+<UFC
+  max_credits="FC_MAX_CREDITS"
+  min_threshold="FC_THRESHOLD"
+  max_block_time="FC_MAX_BLOCK"/>
+<FRAG2
+  frag_size="UDP_FRAGMENT_SIZE"/>
 </config>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3c560cb9/gemfire-core/src/main/resources/com/gemstone/gemfire/distributed/internal/jgroups-mcast.xml
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/resources/com/gemstone/gemfire/distributed/internal/jgroups-mcast.xml b/gemfire-core/src/main/resources/com/gemstone/gemfire/distributed/internal/jgroups-mcast.xml
index 510af6b..fe657e6 100755
--- a/gemfire-core/src/main/resources/com/gemstone/gemfire/distributed/internal/jgroups-mcast.xml
+++ b/gemfire-core/src/main/resources/com/gemstone/gemfire/distributed/internal/jgroups-mcast.xml
@@ -1,55 +1,81 @@
 <config xmlns="urn:org:jgroups"
-        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-        xsi:schemaLocation="urn:org:jgroups http://www.jgroups.org/schema/jgroups.xsd">
-  <UDP
-         BIND_ADDR_SETTING
-         bind_port="MEMBERSHIP_PORT_RANGE_START"
-         port_range="MEMBERSHIP_PORT_RANGE_END"
-         mcast_port="MCAST_PORT"
-         tos="16"
-         ip_mcast="true"
-         ttl="MCAST_TTL"
-         ignore_dont_bundle="false"
-         ucast_recv_buf_size="UDP_RECV_BUFFER_SIZE"
-         ucast_send_buf_size="UDP_SEND_BUFFER_SIZE"
-         thread_naming_pattern="UDP Message Handler"
-         enable_batching="false"
-         enable_diagnostics="false"
-         disable_loopback="false"
-         
-         timer_type="new3"
-         timer.min_threads="1"
-         timer.max_threads="4"
-         timer.keep_alive_time="3000"
-         timer.queue_max_size="500"
+  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:schemaLocation="urn:org:jgroups http://www.jgroups.org/schema/jgroups.xsd">
+<UDP
+  BIND_ADDR_SETTING
+  bind_port="MEMBERSHIP_PORT_RANGE_START"
+  port_range="MEMBERSHIP_PORT_RANGE_END"
 
-         thread_pool.enabled="true"
-         thread_pool.min_threads="1"
-         thread_pool.max_threads="4"
-         thread_pool.keep_alive_time="5000"
-         thread_pool.queue_enabled="true"
-         thread_pool.queue_max_size="10000"
-         thread_pool.rejection_policy="discard"
+  mcast_addr="MCAST_ADDRESS"
+  mcast_port="MCAST_PORT"
+  tos="16"
+  ip_mcast="true"
+  ip_ttl="MCAST_TTL"
+  
+  ucast_recv_buf_size="UDP_RECV_BUFFER_SIZE"
+  ucast_send_buf_size="UDP_SEND_BUFFER_SIZE"
+  mcast_recv_buf_size="MCAST_RECV_BUFFER_SIZE"
+  mcast_send_buf_size="MCAST_SEND_BUFFER_SIZE"
 
-         oob_thread_pool.enabled="true"
-         oob_thread_pool.min_threads="1"
-         oob_thread_pool.max_threads="4"
-         oob_thread_pool.keep_alive_time="5000"
-         oob_thread_pool.queue_enabled="false"
-         oob_thread_pool.queue_max_size="100"
-         oob_thread_pool.rejection_policy="discard"
-         />
-  <com.gemstone.gemfire.distributed.internal.membership.gms.messenger.AddressManager/>
-  <BARRIER/>
-  <UNICAST3
-          xmit_interval="500"
-          xmit_table_num_rows="100"
-          xmit_table_msgs_per_row="2000"
-          xmit_table_max_compaction_time="60000"
-          conn_expiry_timeout="0"
-          max_msg_batch_size="500"/>
-  NAKACK3
-  STABLE
-  <!-- do we need UFC? MFC? -->
-  <FRAG2 frag_size="UDP_FRAGMENT_SIZE"/>
+  enable_batching="false"
+  ignore_dont_bundle="false"
+  max_bundle_timeout="30"
+  
+  thread_naming_pattern="UDP Message Handler"
+  enable_diagnostics="false"
+  disable_loopback="false"
+  
+  timer_type="new3"
+  timer.min_threads="1"
+  timer.max_threads="4"
+  timer.keep_alive_time="3000"
+  timer.queue_max_size="500"
+
+  thread_pool.enabled="true"
+  thread_pool.min_threads="1"
+  thread_pool.max_threads="4"
+  thread_pool.keep_alive_time="5000"
+  thread_pool.queue_enabled="true"
+  thread_pool.queue_max_size="10000"
+  thread_pool.rejection_policy="discard"
+
+  oob_thread_pool.enabled="true"
+  oob_thread_pool.min_threads="1"
+  oob_thread_pool.max_threads="4"
+  oob_thread_pool.keep_alive_time="5000"
+  oob_thread_pool.queue_enabled="false"
+  oob_thread_pool.queue_max_size="100"
+  oob_thread_pool.rejection_policy="discard"/>
+
+<com.gemstone.gemfire.distributed.internal.membership.gms.messenger.AddressManager/>
+
+<pbcast.NAKACK2
+  xmit_interval="MCAST_RETRANSMIT_INTERVAL"
+  xmit_table_num_rows="100"
+  xmit_table_msgs_per_row="2000"
+  xmit_table_max_compaction_time="30000"
+  max_msg_batch_size="500"
+  use_mcast_xmit="false"
+  discard_delivered_msgs="true"/>
+<UNICAST3
+  xmit_interval="500"
+  xmit_table_num_rows="100"
+  xmit_table_msgs_per_row="2000"
+  xmit_table_max_compaction_time="60000"
+  conn_expiry_timeout="0"
+  max_msg_batch_size="500"/>
+<pbcast.STABLE
+  stability_delay="50"
+  desired_avg_gossip="2000"
+  max_bytes="400000"/>
+<UFC
+  max_credits="FC_MAX_CREDITS"
+  min_threshold="FC_THRESHOLD"
+  max_block_time="FC_MAX_BLOCK"/>
+<MFC
+  max_credits="FC_MAX_CREDITS"
+  min_threshold="FC_THRESHOLD"
+  max_block_time="FC_MAX_BLOCK"/>
+<FRAG2
+  frag_size="UDP_FRAGMENT_SIZE"/>
 </config>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3c560cb9/gemfire-core/src/test/java/com/gemstone/gemfire/cache/client/internal/AutoConnectionSourceWithUDPDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/cache/client/internal/AutoConnectionSourceWithUDPDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/cache/client/internal/AutoConnectionSourceWithUDPDUnitTest.java
deleted file mode 100644
index 8509c54..0000000
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/cache/client/internal/AutoConnectionSourceWithUDPDUnitTest.java
+++ /dev/null
@@ -1,140 +0,0 @@
-/*=========================================================================
- * Copyright (c) 2002-2014 Pivotal Software, Inc. All Rights Reserved.
- * This product is protected by U.S. and international copyright
- * and intellectual property laws. Pivotal products are covered by
- * more patents listed at http://www.pivotal.io/patents.
- *=========================================================================
- */
-package com.gemstone.gemfire.cache.client.internal;
-
-import java.io.File;
-import java.io.IOException;
-import java.util.Properties;
-import java.net.InetAddress;
-import java.net.UnknownHostException;
-
-import junit.framework.Assert;
-
-import com.gemstone.gemfire.cache.AttributesFactory;
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.cache.DataPolicy;
-import com.gemstone.gemfire.cache.RegionAttributes;
-import com.gemstone.gemfire.cache.Scope;
-import com.gemstone.gemfire.cache.util.BridgeServer;
-import com.gemstone.gemfire.distributed.DistributedSystem;
-import com.gemstone.gemfire.distributed.Locator;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
-import com.gemstone.gemfire.internal.AvailablePort;
-import com.gemstone.gemfire.internal.AvailablePortHelper;
-
-import dunit.Host;
-import dunit.SerializableCallable;
-import dunit.SerializableRunnable;
-import dunit.VM;
-
-/**
- * Same tests as the auto connection source test, but the
- * system is using multicast for membership discovery, and
- * the locator is only used for peer discovery.
- * @author dsmith
- *
- */
-public class AutoConnectionSourceWithUDPDUnitTest extends
-    AutoConnectionSourceDUnitTest {
-
-  protected int mCastPort;
-
-  public AutoConnectionSourceWithUDPDUnitTest(String name) {
-    super(name);
-  }
-  
-  public void testStartLocatorLater() throws InterruptedException {
-    final Host host = Host.getHost(0);
-    VM vm0 = host.getVM(0);
-    VM vm1 = host.getVM(1);
-    VM vm2 = host.getVM(2);
-    
-    startBridgeServerInVM(vm1, null, null);
-    
-    int locatorPort = AvailablePort.getRandomAvailablePort(AvailablePort.SOCKET);
-    startLocatorInVM(vm0, locatorPort, "");
-    
-    startBridgeClientInVM(vm2, null, getServerHostName(vm0.getHost()), locatorPort);
-    putAndWaitForSuccess(vm2, REGION_NAME, "key", "value");
-    Assert.assertEquals("value", getInVM(vm1, "key"));
-  }
-  
-  public void setUp() throws Exception {
-    super.setUp();
-    mCastPort = AvailablePort.getRandomAvailablePort(AvailablePort.JGROUPS);
-    addExpectedException("java.net.SocketException");
-  }
-
-  protected int startBridgeServerInVM(VM vm, final String[] groups, String locators,
-      final String[] regions) {
-    SerializableCallable connect =
-      new SerializableCallable("Start bridge server") {
-          public Object call() throws IOException  {
-            Properties props = new Properties();
-            props.setProperty(DistributionConfig.MCAST_PORT_NAME, String.valueOf(mCastPort));
-            props.setProperty(DistributionConfig.MCAST_ADDRESS_NAME, DistributionConfig.DEFAULT_MCAST_ADDRESS.getHostAddress());
-            props.setProperty(DistributionConfig.LOCATORS_NAME, "");
-            DistributedSystem ds = getSystem(props);
-            Cache cache = CacheFactory.create(ds);
-            AttributesFactory factory = new AttributesFactory();
-            factory.setScope(Scope.DISTRIBUTED_ACK);
-            factory.setEnableBridgeConflation(true);
-            factory.setDataPolicy(DataPolicy.REPLICATE);
-            RegionAttributes attrs = factory.create();
-            for(int i = 0; i < regions.length; i++) {
-              cache.createRegion(regions[i], attrs);
-            }
-            BridgeServer server = cache.addBridgeServer();
-            final int serverPort = AvailablePortHelper.getRandomAvailableTCPPort();
-            server.setPort(serverPort);
-            server.setGroups(groups);
-            server.start();
-            
-            remoteObjects.put(CACHE_KEY, cache);
-            
-            return new Integer(serverPort);
-          }
-        };
-    Integer port = (Integer) vm.invoke(connect);
-    return port.intValue();
-  }
-
-  public void startLocatorInVM(final VM vm, final int locatorPort, final String otherLocators) {
-    vm.invoke(new SerializableRunnable("Create Locator") {
-
-      final String testName= getUniqueName();
-      public void run() {
-        disconnectFromDS();
-        Properties props = new Properties();
-        props.setProperty(DistributionConfig.MCAST_PORT_NAME, String.valueOf(mCastPort));
-        props.setProperty(DistributionConfig.MCAST_ADDRESS_NAME, DistributionConfig.DEFAULT_MCAST_ADDRESS.getHostAddress());
-        props.setProperty(DistributionConfig.LOCATORS_NAME, "");
-        props.setProperty(DistributionConfig.LOG_LEVEL_NAME, getDUnitLogLevel());
-        props.setProperty(DistributionConfig.ENABLE_CLUSTER_CONFIGURATION_NAME, "false");
-        InetAddress bindAddr = null;
-        try {
-          bindAddr = InetAddress.getByName(getServerHostName(vm.getHost()));
-        } catch (UnknownHostException uhe) {
-          fail("While resolving bind address ", uhe);
-        }
-        try {
-          File logFile = new File(testName + "-locator" + locatorPort
-              + ".log");
-          Locator locator = Locator.startLocatorAndDS(locatorPort, logFile, bindAddr, props, false, true, null);
-          remoteObjects.put(LOCATOR_KEY, locator);
-        } catch (IOException ex) {
-          fail("While starting locator on port " + locatorPort, ex);
-        }
-      }
-    });
-  }
-  
-  
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3c560cb9/gemfire-core/src/test/java/com/gemstone/gemfire/cache/management/MemoryThresholdsDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/cache/management/MemoryThresholdsDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/cache/management/MemoryThresholdsDUnitTest.java
index 37f9744..65046e9 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/cache/management/MemoryThresholdsDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/cache/management/MemoryThresholdsDUnitTest.java
@@ -198,7 +198,7 @@ public class MemoryThresholdsDUnitTest extends BridgeTestCase {
 
     ServerPorts ports1 = startCacheServer(server1, 0f, 0f,
         regionName, false/*createPR*/, false/*notifyBySubscription*/, 0);
-    ServerPorts ports2 = startCacheServer(server2, ports1.getMcastPort(), 0f, 90f,
+    ServerPorts ports2 = startCacheServer(server2, 0f, 90f,
         regionName, false/*createPR*/, false/*notifyBySubscription*/, 0);
 
     registerTestMemoryThresholdListener(server1);
@@ -300,7 +300,7 @@ public class MemoryThresholdsDUnitTest extends BridgeTestCase {
     final String regionName = "rejectRemoteClientOp";
 
     ServerPorts ports1 = startCacheServer(server1, 0f, 0f, regionName, false/*createPR*/, false/*notifyBySubscription*/, 0);
-    ServerPorts ports2 = startCacheServer(server2, ports1.getMcastPort(), 0f, 90f,
+    ServerPorts ports2 = startCacheServer(server2, 0f, 90f,
         regionName, false/*createPR*/, false/*notifyBySubscription*/, 0);
 
     startClient(client, server1, ports1.getPort(), regionName);
@@ -340,7 +340,7 @@ public class MemoryThresholdsDUnitTest extends BridgeTestCase {
     final String regionName = "disableThresholdPr";
 
     ServerPorts ports1 = startCacheServer(server1, 0f, 0f, regionName, true/*createPR*/, false/*notifyBySubscription*/, 0);
-    ServerPorts ports2 = startCacheServer(server2, ports1.getMcastPort(), 0f, 0f,
+    ServerPorts ports2 = startCacheServer(server2, 0f, 0f,
         regionName, true/*createPR*/, false/*notifyBySubscription*/, 0);
 
     registerTestMemoryThresholdListener(server1);
@@ -393,7 +393,7 @@ public class MemoryThresholdsDUnitTest extends BridgeTestCase {
     final String regionName = "testEventDelivery";
 
     ServerPorts ports1 = startCacheServer(server1, 0f, 0f, regionName, false/*createPR*/, false/*notifyBySubscription*/, 0);
-    ServerPorts ports2 = startCacheServer(server2, ports1.getMcastPort(), 80f, 90f,
+    ServerPorts ports2 = startCacheServer(server2, 80f, 90f,
         regionName, false/*createPR*/, false/*notifyBySubscription*/, 0);
 
     registerTestMemoryThresholdListener(server1);
@@ -491,7 +491,7 @@ public class MemoryThresholdsDUnitTest extends BridgeTestCase {
     final String regionName = "testEventOrger";
 
     ServerPorts ports1 = startCacheServer(server1, 0f, 0f, regionName, false/*createPR*/, false/*notifyBySubscription*/, 0);
-    ServerPorts ports2 = startCacheServer(server2, ports1.getMcastPort(), 0f, 0f,
+    ServerPorts ports2 = startCacheServer(server2, 0f, 0f,
         regionName, false/*createPR*/, false/*notifyBySubscription*/, 0);
 
     verifyProfiles(server1, 1);
@@ -506,7 +506,7 @@ public class MemoryThresholdsDUnitTest extends BridgeTestCase {
 
     verifyProfiles(server1, 0);
 
-    startCacheServer(server3, ports1.getMcastPort(), 0f, 0f,
+    startCacheServer(server3, 0f, 0f,
         regionName, false/*createPR*/, false/*notifyBySubscription*/, 0);
 
     verifyProfiles(server1, 1);
@@ -548,13 +548,13 @@ public class MemoryThresholdsDUnitTest extends BridgeTestCase {
     final int redundancy = 1;
 
     final ServerPorts ports1 = startCacheServer(server1, 80f, 90f, regionName, true/*createPR*/, false/*notifyBySubscription*/, redundancy);
-    ServerPorts ports2 = startCacheServer(server2, ports1.getMcastPort(), 80f, 90f,
+    ServerPorts ports2 = startCacheServer(server2, 80f, 90f,
         regionName, true/*createPR*/, false/*notifyBySubscription*/, redundancy);
-    ServerPorts ports3 = startCacheServer(server3, ports1.getMcastPort(), 80f, 90f,
+    ServerPorts ports3 = startCacheServer(server3, 80f, 90f,
         regionName, true/*createPR*/, false/*notifyBySubscription*/, redundancy);
     accessor.invoke(new SerializableCallable() {
       public Object call() throws Exception {
-        getSystem(getServerProperties(ports1.getMcastPort()));
+        getSystem(getServerProperties());
         getCache();
         AttributesFactory factory = new AttributesFactory();        
         PartitionAttributesFactory paf = new PartitionAttributesFactory();
@@ -692,9 +692,9 @@ public class MemoryThresholdsDUnitTest extends BridgeTestCase {
 
     final ServerPorts ports1 = startCacheServer(server1, 80f, 90f,
         regionName, true/*createPR*/, false/*notifyBySubscription*/, redundancy);
-    ServerPorts ports2 = startCacheServer(server2, ports1.getMcastPort(), 80f, 90f,
+    ServerPorts ports2 = startCacheServer(server2, 80f, 90f,
         regionName, true/*createPR*/, false/*notifyBySubscription*/, redundancy);
-    ServerPorts ports3 = startCacheServer(server3, ports1.getMcastPort(), 80f, 90f,
+    ServerPorts ports3 = startCacheServer(server3, 80f, 90f,
         regionName, true/*createPR*/, false/*notifyBySubscription*/, redundancy);
     
     registerTestMemoryThresholdListener(server1);
@@ -703,7 +703,7 @@ public class MemoryThresholdsDUnitTest extends BridgeTestCase {
     
     accessor.invoke(new SerializableCallable() {
       public Object call() throws Exception {
-        getSystem(getServerProperties(ports1.getMcastPort()));
+        getSystem(getServerProperties());
         getCache();
         AttributesFactory factory = new AttributesFactory();        
         PartitionAttributesFactory paf = new PartitionAttributesFactory();
@@ -794,7 +794,7 @@ public class MemoryThresholdsDUnitTest extends BridgeTestCase {
     final String regionName = "drFuncRej";
 
     ServerPorts ports1 = startCacheServer(server1, 80f, 90f, regionName, false/*createPR*/, false/*notifyBySubscription*/, 0);
-    ServerPorts ports2 = startCacheServer(server2, ports1.getMcastPort(), 80f, 90f,
+    ServerPorts ports2 = startCacheServer(server2, 80f, 90f,
         regionName, false/*createPR*/, false/*notifyBySubscription*/, 0);
 
     startClient(client, server1, ports1.getPort(), regionName);
@@ -909,11 +909,11 @@ public class MemoryThresholdsDUnitTest extends BridgeTestCase {
     final String regionName = "prFuncRej";
 
     final ServerPorts ports1 = startCacheServer(server1, 80f, 90f, regionName, true/*createPR*/, false/*notifyBySubscription*/, 0);
-    ServerPorts ports2 = startCacheServer(server2, ports1.getMcastPort(), 80f, 90f,
+    ServerPorts ports2 = startCacheServer(server2, 80f, 90f,
         regionName, true/*createPR*/, false/*notifyBySubscription*/, 0);
     accessor.invoke(new SerializableCallable() {
       public Object call() throws Exception {
-        getSystem(getServerProperties(ports1.getMcastPort()));
+        getSystem(getServerProperties());
         getCache();
         AttributesFactory factory = new AttributesFactory();
         PartitionAttributesFactory paf = new PartitionAttributesFactory();
@@ -1103,7 +1103,7 @@ public class MemoryThresholdsDUnitTest extends BridgeTestCase {
     final String regionName = "FuncRej";
 
     ServerPorts ports1 = startCacheServer(server1, 80f, 90f, regionName, false/*createPR*/, false/*notifyBySubscription*/, 0);
-    ServerPorts ports2 = startCacheServer(server2, ports1.getMcastPort(), 80f, 90f,
+    ServerPorts ports2 = startCacheServer(server2, 80f, 90f,
         regionName, false/*createPR*/, false/*notifyBySubscription*/, 0);
 
     startClient(client, server1, ports1.getPort(), regionName);
@@ -1198,52 +1198,6 @@ public class MemoryThresholdsDUnitTest extends BridgeTestCase {
   };
 
   /**
-   * Starts up a CacheServer with an already allocated JGroups mcast port.
-   * @return a {@link ServerPorts} containing the CacheServer ports.
-   */
-  private ServerPorts startCacheServer(VM server, final int mcastPort, final float evictionThreshold, final float criticalThreshold, final String regionName,
-      final boolean createPR, final boolean notifyBySubscription, final int prRedundancy) throws Exception {
-
-    return (ServerPorts) server.invoke(new SerializableCallable() {
-      public Object call() throws Exception {
-        getSystem(getServerProperties(mcastPort));
-        GemFireCacheImpl cache = (GemFireCacheImpl)getCache();
-
-        InternalResourceManager irm = cache.getResourceManager();
-        HeapMemoryMonitor hmm = irm.getHeapMonitor();
-        hmm.setTestMaxMemoryBytes(1000);
-        HeapMemoryMonitor.setTestBytesUsedForThresholdSet(500);
-        irm.setEvictionHeapPercentage(evictionThreshold);
-        irm.setCriticalHeapPercentage(criticalThreshold);
-
-        AttributesFactory factory = new AttributesFactory();
-        if (createPR) {
-          PartitionAttributesFactory paf = new PartitionAttributesFactory();
-          paf.setRedundantCopies(prRedundancy);
-          paf.setTotalNumBuckets(11);
-          factory.setPartitionAttributes(paf.create());
-        } else {
-          factory.setScope(Scope.DISTRIBUTED_ACK);
-          factory.setDataPolicy(DataPolicy.REPLICATE);
-        }
-        Region region = createRegion(regionName, factory.create());
-        if (createPR) {
-          assertTrue(region instanceof PartitionedRegion);
-        } else {
-          assertTrue(region instanceof DistributedRegion);
-        }
-        CacheServer cacheServer = getCache().addCacheServer();
-        int port = AvailablePortHelper.getRandomAvailableTCPPorts(1)[0];
-        cacheServer.setPort(port);
-        cacheServer.setNotifyBySubscription(notifyBySubscription);
-        cacheServer.start();
-        
-        return new ServerPorts(port, mcastPort);
-      }
-    });
-  }
-
-  /**
    * Starts up a CacheServer.
    * @return a {@link ServerPorts} containing the CacheServer ports.
    */
@@ -1252,8 +1206,7 @@ public class MemoryThresholdsDUnitTest extends BridgeTestCase {
 
     return (ServerPorts) server.invoke(new SerializableCallable() {
       public Object call() throws Exception {
-        int mcastPort = AvailablePortHelper.getRandomAvailableUDPPort();
-        getSystem(getServerProperties(mcastPort));
+        getSystem(getServerProperties());
         GemFireCacheImpl cache = (GemFireCacheImpl)getCache();
 
         InternalResourceManager irm = cache.getResourceManager();
@@ -1285,7 +1238,7 @@ public class MemoryThresholdsDUnitTest extends BridgeTestCase {
         cacheServer.setNotifyBySubscription(notifyBySubscription);
         cacheServer.start();
         
-        return new ServerPorts(port, mcastPort);
+        return new ServerPorts(port);
       }
     });
   }
@@ -1576,10 +1529,9 @@ public class MemoryThresholdsDUnitTest extends BridgeTestCase {
     return p;
   }
 
-  protected Properties getServerProperties(int mcastPort) {
+  protected Properties getServerProperties() {
     Properties p = new Properties();
-    p.setProperty(DistributionConfig.MCAST_PORT_NAME, mcastPort+"");
-    p.setProperty(DistributionConfig.LOCATORS_NAME, "");
+    p.setProperty(DistributionConfig.LOCATORS_NAME, "localhost["+getDUnitLocatorPort()+"]");
     return p;
   }
 
@@ -2322,19 +2274,14 @@ public class MemoryThresholdsDUnitTest extends BridgeTestCase {
    */
   private static final class ServerPorts implements Serializable {
     private final int port;
-    private final int mcastPort;
     
-    ServerPorts(int port,int mcastPort) {
+    ServerPorts(int port) {
       this.port = port;
-      this.mcastPort = mcastPort;
     }
     
     int getPort() {
       return this.port;
     }
     
-    int getMcastPort() {
-      return this.mcastPort;
-    }
   }
 }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3c560cb9/gemfire-core/src/test/java/com/gemstone/gemfire/cache/management/MemoryThresholdsOffHeapDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/cache/management/MemoryThresholdsOffHeapDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/cache/management/MemoryThresholdsOffHeapDUnitTest.java
index 0b704a6..c8ab961 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/cache/management/MemoryThresholdsOffHeapDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/cache/management/MemoryThresholdsOffHeapDUnitTest.java
@@ -132,12 +132,11 @@ public class MemoryThresholdsOffHeapDUnitTest extends BridgeTestCase {
     final int[] ports = AvailablePortHelper.getRandomAvailableTCPPorts(2);
     final int port1 = ports[0];
     final int port2 = ports[1];
-    final int mcastPort = AvailablePortHelper.getRandomAvailableUDPPort();
     final String regionName = "offHeapEventDelivery";
 
-    startCacheServer(server1, port1, mcastPort, 0f, 0f,
+    startCacheServer(server1, port1, 0f, 0f,
         regionName, false/*createPR*/, false/*notifyBySubscription*/, 0);
-    startCacheServer(server2, port2, mcastPort, 70f, 90f,
+    startCacheServer(server2, port2, 70f, 90f,
         regionName, false/*createPR*/, false/*notifyBySubscription*/, 0);
 
     registerTestMemoryThresholdListener(server1);
@@ -233,12 +232,11 @@ public class MemoryThresholdsOffHeapDUnitTest extends BridgeTestCase {
     final int[] ports = AvailablePortHelper.getRandomAvailableTCPPorts(2);
     final int port1 = ports[0];
     final int port2 = ports[1];
-    final int mcastPort = AvailablePortHelper.getRandomAvailableUDPPort();
     final String regionName = "offHeapDisabledThresholds";
 
-    startCacheServer(server1, port1, mcastPort, 0f, 0f,
+    startCacheServer(server1, port1, 0f, 0f,
         regionName, false/*createPR*/, false/*notifyBySubscription*/, 0);
-    startCacheServer(server2, port2, mcastPort, 0f, 0f,
+    startCacheServer(server2, port2, 0f, 0f,
         regionName, false/*createPR*/, false/*notifyBySubscription*/, 0);
 
     registerTestMemoryThresholdListener(server1);
@@ -351,12 +349,11 @@ public class MemoryThresholdsOffHeapDUnitTest extends BridgeTestCase {
     final int[] ports = AvailablePortHelper.getRandomAvailableTCPPorts(2);
     final int port1 = ports[0];
     final int port2 = ports[1];
-    final int mcastPort = AvailablePortHelper.getRandomAvailableUDPPort();
     final String regionName = "offHeapDRRemoteClientPutReject";
 
-    startCacheServer(server1, port1, mcastPort, 0f, 0f,
+    startCacheServer(server1, port1, 0f, 0f,
         regionName, false/*createPR*/, false/*notifyBySubscription*/, 0);
-    startCacheServer(server2, port2, mcastPort, 0f, 90f,
+    startCacheServer(server2, port2, 0f, 90f,
         regionName, false/*createPR*/, false/*notifyBySubscription*/, 0);
 
     startClient(client, server1, port1, regionName);
@@ -397,7 +394,7 @@ public class MemoryThresholdsOffHeapDUnitTest extends BridgeTestCase {
   }
   
   public void testGettersAndSetters() {
-    getSystem(getServerProperties(0));
+    getSystem(getServerProperties());
     ResourceManager rm = getCache().getResourceManager();
     assertEquals(0.0f, rm.getCriticalOffHeapPercentage());
     assertEquals(0.0f, rm.getEvictionOffHeapPercentage());
@@ -428,12 +425,11 @@ public class MemoryThresholdsOffHeapDUnitTest extends BridgeTestCase {
     final int[] ports = AvailablePortHelper.getRandomAvailableTCPPorts(2);
     final int port1 = ports[0];
     final int port2 = ports[1];
-    final int mcastPort = AvailablePortHelper.getRandomAvailableUDPPort();
     final String regionName = "offHeapDRRemotePutRejection";
 
-    startCacheServer(server1, port1, mcastPort, 0f, 0f,
+    startCacheServer(server1, port1, 0f, 0f,
         regionName, false/*createPR*/, false/*notifyBySubscription*/, 0);
-    startCacheServer(server2, port2, mcastPort, 0f, 90f,
+    startCacheServer(server2, port2, 0f, 90f,
         regionName, false/*createPR*/, false/*notifyBySubscription*/, 0);
 
     registerTestMemoryThresholdListener(server1);
@@ -514,7 +510,6 @@ public class MemoryThresholdsOffHeapDUnitTest extends BridgeTestCase {
     final VM replicate1 = host.getVM(1);
     final VM replicate2 = host.getVM(2);
     final String rName = getUniqueName();
-    final int mcastPort = AvailablePortHelper.getRandomAvailableUDPPort();
     
     // Make sure the desired VMs will have a fresh DS.
     AsyncInvocation d1 = replicate1.invokeAsync(DistributedTestCase.class, "disconnectFromDS");
@@ -527,7 +522,7 @@ public class MemoryThresholdsOffHeapDUnitTest extends BridgeTestCase {
       @SuppressWarnings("synthetic-access")
       @Override
       public void run2() throws CacheException {
-        getSystem(getServerProperties(mcastPort));
+        getSystem(getServerProperties());
       }
     };
     replicate1.invoke(establishConnectivity);
@@ -537,7 +532,7 @@ public class MemoryThresholdsOffHeapDUnitTest extends BridgeTestCase {
       @Override
       public void run2() throws CacheException {
         // Assert some level of connectivity
-        InternalDistributedSystem ds = getSystem(getServerProperties(mcastPort));
+        InternalDistributedSystem ds = getSystem(getServerProperties());
         assertTrue(ds.getDistributionManager().getNormalDistributionManagerIds().size() >= 1);
 
         InternalResourceManager irm = (InternalResourceManager)getCache().getResourceManager();
@@ -752,19 +747,18 @@ public class MemoryThresholdsOffHeapDUnitTest extends BridgeTestCase {
     servers[2] = host.getVM(3);
 
     final int[] ports = AvailablePortHelper.getRandomAvailableTCPPorts(3);
-    final int mcastPort = AvailablePortHelper.getRandomAvailableUDPPort();
     final String regionName = "offHeapPRRemotePutRejection";
     final int redundancy = 1;
 
-    startCacheServer(servers[0], ports[0], mcastPort, 0f, 90f,
+    startCacheServer(servers[0], ports[0], 0f, 90f,
         regionName, true/*createPR*/, false/*notifyBySubscription*/, redundancy);
-    startCacheServer(servers[1], ports[1], mcastPort, 0f, 90f,
+    startCacheServer(servers[1], ports[1], 0f, 90f,
         regionName, true/*createPR*/, false/*notifyBySubscription*/, redundancy);
-    startCacheServer(servers[2], ports[2], mcastPort, 0f, 90f,
+    startCacheServer(servers[2], ports[2], 0f, 90f,
         regionName, true/*createPR*/, false/*notifyBySubscription*/, redundancy);
     accessor.invoke(new SerializableCallable() {
       public Object call() throws Exception {
-        getSystem(getServerProperties(mcastPort));
+        getSystem(getServerProperties());
         getCache();
         AttributesFactory factory = new AttributesFactory();        
         PartitionAttributesFactory paf = new PartitionAttributesFactory();
@@ -920,7 +914,6 @@ public class MemoryThresholdsOffHeapDUnitTest extends BridgeTestCase {
     final VM accessor = host.getVM(1);
     final VM ds1 = host.getVM(2);
     final String rName = getUniqueName();
-    final int mcastPort = AvailablePortHelper.getRandomAvailableUDPPort();
 
     // Make sure the desired VMs will have a fresh DS.
     AsyncInvocation d0 = accessor.invokeAsync(DistributedTestCase.class, "disconnectFromDS");
@@ -936,8 +929,8 @@ public class MemoryThresholdsOffHeapDUnitTest extends BridgeTestCase {
     ds1.invoke(establishConnectivity);
     accessor.invoke(establishConnectivity);
 
-    ds1.invoke(createPR(rName, false, mcastPort));
-    accessor.invoke(createPR(rName, true, mcastPort));
+    ds1.invoke(createPR(rName, false));
+    accessor.invoke(createPR(rName, true));
     
     final AtomicInteger expectedInvocations = new AtomicInteger(0);
 
@@ -1102,12 +1095,12 @@ public class MemoryThresholdsOffHeapDUnitTest extends BridgeTestCase {
     ds1.invoke(removeExpectedException);
   }
   
-  private CacheSerializableRunnable createPR(final String rName, final boolean accessor, final int mcastPort) {
+  private CacheSerializableRunnable createPR(final String rName, final boolean accessor) {
     return new CacheSerializableRunnable("create PR accessor") {
     @Override
     public void run2() throws CacheException {
       // Assert some level of connectivity
-      getSystem(getServerProperties(mcastPort));      
+      getSystem(getServerProperties());      
       InternalResourceManager irm = (InternalResourceManager)getCache().getResourceManager();
       irm.setCriticalOffHeapPercentage(90f);
       AttributesFactory<Integer, String> af = new AttributesFactory<Integer, String>();
@@ -1146,14 +1139,13 @@ public class MemoryThresholdsOffHeapDUnitTest extends BridgeTestCase {
     final Host host = Host.getHost(0);
     final VM vm = host.getVM(2);
     final String rName = getUniqueName();
-    final int mcastPort = AvailablePortHelper.getRandomAvailableUDPPort();
 
     vm.invoke(DistributedTestCase.class, "disconnectFromDS");
     
     vm.invoke(new CacheSerializableRunnable("test LocalRegion load passthrough when critical") {
       @Override
       public void run2() throws CacheException {
-        getSystem(getServerProperties(mcastPort));
+        getSystem(getServerProperties());
         InternalResourceManager irm = (InternalResourceManager)getCache().getResourceManager();
         final OffHeapMemoryMonitor ohmm = irm.getOffHeapMonitor();
         irm.setCriticalOffHeapPercentage(90f);
@@ -1270,12 +1262,11 @@ public class MemoryThresholdsOffHeapDUnitTest extends BridgeTestCase {
     final int port1 = ports[0];
     final int port2 = ports[1];
     final int port3 = ports[2];
-    final int mcastPort = AvailablePortHelper.getRandomAvailableUDPPort();
     final String regionName = "testEventOrger";
 
-    startCacheServer(server1, port1, mcastPort, 0f, 0f,
+    startCacheServer(server1, port1, 0f, 0f,
         regionName, false/*createPR*/, false/*notifyBySubscription*/, 0);
-    startCacheServer(server2, port2, mcastPort, 0f, 0f,
+    startCacheServer(server2, port2, 0f, 0f,
         regionName, false/*createPR*/, false/*notifyBySubscription*/, 0);
 
     verifyProfiles(server1, 1);
@@ -1290,7 +1281,7 @@ public class MemoryThresholdsOffHeapDUnitTest extends BridgeTestCase {
 
     verifyProfiles(server1, 0);
 
-    startCacheServer(server3, port3, mcastPort, 0f, 0f,
+    startCacheServer(server3, port3, 0f, 0f,
         regionName, false/*createPR*/, false/*notifyBySubscription*/, 0);
 
     verifyProfiles(server1, 1);
@@ -1385,8 +1376,7 @@ public class MemoryThresholdsOffHeapDUnitTest extends BridgeTestCase {
     final VM client = host.getVM(1);
 
     final int port = AvailablePortHelper.getRandomAvailableTCPPort();
-    final int mcastPort = AvailablePortHelper.getRandomAvailableUDPPort();
-    startCacheServer(server, port, mcastPort, 0f, 90f,
+    startCacheServer(server, port, 0f, 90f,
         regionName, createPR, false, 0);
     startClient(client, server, port, regionName);
     doPuts(client, regionName, false/*catchServerException*/,
@@ -1489,13 +1479,13 @@ public class MemoryThresholdsOffHeapDUnitTest extends BridgeTestCase {
     });
   }
 
-  private void startCacheServer(VM server, final int port, final int mcastPort,
+  private void startCacheServer(VM server, final int port,
       final float evictionThreshold, final float criticalThreshold, final String regionName,
       final boolean createPR, final boolean notifyBySubscription, final int prRedundancy) throws Exception {
 
     server.invoke(new SerializableCallable() {
       public Object call() throws Exception {
-        getSystem(getServerProperties(mcastPort));
+        getSystem(getServerProperties());
         GemFireCacheImpl cache = (GemFireCacheImpl)getCache();
 
         InternalResourceManager irm = cache.getResourceManager();
@@ -1698,11 +1688,9 @@ public class MemoryThresholdsOffHeapDUnitTest extends BridgeTestCase {
     });
   }
   
-  private Properties getServerProperties(int mcastPort) {
+  private Properties getServerProperties() {
     Properties p = new Properties();
-    p.setProperty(DistributionConfig.MCAST_PORT_NAME, mcastPort + "");
-    p.setProperty(DistributionConfig.MCAST_TTL_NAME, "0");
-    p.setProperty(DistributionConfig.LOCATORS_NAME, "");
+    p.setProperty(DistributionConfig.LOCATORS_NAME, "localhost["+getDUnitLocatorPort()+"]");
     p.setProperty(DistributionConfig.OFF_HEAP_MEMORY_SIZE_NAME, "1m");
     return p;
   }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3c560cb9/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/dunit/QueryUsingPoolDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/dunit/QueryUsingPoolDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/dunit/QueryUsingPoolDUnitTest.java
index 0e982bf..cd6a24a 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/dunit/QueryUsingPoolDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/dunit/QueryUsingPoolDUnitTest.java
@@ -161,8 +161,7 @@ public class QueryUsingPoolDUnitTest extends CacheTestCase {
     vm0.invoke(new CacheSerializableRunnable("Create Bridge Server") {
       public void run2() throws CacheException {
         Properties config = new Properties();
-        int unusedPort = AvailablePort.getRandomAvailablePort(AvailablePort.JGROUPS);
-        config.setProperty("mcast-port", String.valueOf(unusedPort));
+        config.setProperty("locators", "localhost["+getDUnitLocatorPort()+"]");
         system = (InternalDistributedSystem) DistributedSystem.connect(config);
         AttributesFactory factory = new AttributesFactory();
         factory.setScope(Scope.LOCAL);
@@ -299,8 +298,7 @@ public class QueryUsingPoolDUnitTest extends CacheTestCase {
     vm0.invoke(new CacheSerializableRunnable("Create Bridge Server") {
       public void run2() throws CacheException {
         Properties config = new Properties();
-        int unusedPort = AvailablePort.getRandomAvailablePort(AvailablePort.JGROUPS);
-        config.setProperty("mcast-port", String.valueOf(unusedPort));
+        config.setProperty("locators", "localhost["+getDUnitLocatorPort()+"]");
         system = (InternalDistributedSystem) DistributedSystem.connect(config);
         AttributesFactory factory = new AttributesFactory();
         factory.setScope(Scope.LOCAL);
@@ -432,8 +430,7 @@ public class QueryUsingPoolDUnitTest extends CacheTestCase {
     vm0.invoke(new CacheSerializableRunnable("Create Bridge Server") {
       public void run2() throws CacheException {
         Properties config = new Properties();
-        int unusedPort = AvailablePort.getRandomAvailablePort(AvailablePort.JGROUPS);
-        config.setProperty("mcast-port", String.valueOf(unusedPort));
+        config.setProperty("locators", "localhost["+getDUnitLocatorPort()+"]");
         system = (InternalDistributedSystem) DistributedSystem.connect(config);
         AttributesFactory factory = new AttributesFactory();
         factory.setScope(Scope.LOCAL);
@@ -629,8 +626,7 @@ public class QueryUsingPoolDUnitTest extends CacheTestCase {
     vm0.invoke(new CacheSerializableRunnable("Create Bridge Server") {
       public void run2() throws CacheException {
         Properties config = new Properties();
-        int unusedPort = AvailablePort.getRandomAvailablePort(AvailablePort.JGROUPS);
-        config.setProperty("mcast-port", String.valueOf(unusedPort));
+        config.setProperty("locators", "localhost["+getDUnitLocatorPort()+"]");
         system = (InternalDistributedSystem) DistributedSystem.connect(config);
         AttributesFactory factory = new AttributesFactory();
         factory.setScope(Scope.LOCAL);
@@ -1660,8 +1656,7 @@ public class QueryUsingPoolDUnitTest extends CacheTestCase {
     vm0.invoke(new CacheSerializableRunnable("Create Bridge Server") {
       public void run2() throws CacheException {
         Properties config = new Properties();
-        int unusedPort = AvailablePort.getRandomAvailablePort(AvailablePort.JGROUPS);
-        config.setProperty("mcast-port", String.valueOf(unusedPort));
+        config.setProperty("locators", "localhost["+getDUnitLocatorPort()+"]");
         system = (InternalDistributedSystem) DistributedSystem.connect(config);
         AttributesFactory factory = new AttributesFactory();
         factory.setScope(Scope.LOCAL);
@@ -1764,8 +1759,7 @@ public class QueryUsingPoolDUnitTest extends CacheTestCase {
     vm0.invoke(new CacheSerializableRunnable("Create Bridge Server") {
       public void run2() throws CacheException {
         Properties config = new Properties();
-        int unusedPort = AvailablePort.getRandomAvailablePort(AvailablePort.JGROUPS);
-        config.setProperty("mcast-port", String.valueOf(unusedPort));
+        config.setProperty("locators", "localhost["+getDUnitLocatorPort()+"]");
         system = (InternalDistributedSystem) DistributedSystem.connect(config);
         AttributesFactory factory = new AttributesFactory();
         factory.setScope(Scope.LOCAL);
@@ -1903,8 +1897,7 @@ public class QueryUsingPoolDUnitTest extends CacheTestCase {
     vm0.invoke(new CacheSerializableRunnable("Create Bridge Server") {
       public void run2() throws CacheException {
         Properties config = new Properties();
-        int unusedPort = AvailablePort.getRandomAvailablePort(AvailablePort.JGROUPS);
-        config.setProperty("mcast-port", String.valueOf(unusedPort));
+        config.setProperty("locators", "localhost["+getDUnitLocatorPort()+"]");
         system = (InternalDistributedSystem) DistributedSystem.connect(config);
 
         pause(1000);
@@ -2000,8 +1993,7 @@ public class QueryUsingPoolDUnitTest extends CacheTestCase {
     vm0.invoke(new CacheSerializableRunnable("Create Bridge Server") {
       public void run2() throws CacheException {
         Properties config = new Properties();
-        int unusedPort = AvailablePort.getRandomAvailablePort(AvailablePort.JGROUPS);
-        config.setProperty("mcast-port", String.valueOf(unusedPort));
+        config.setProperty("locators", "localhost["+getDUnitLocatorPort()+"]");
         system = (InternalDistributedSystem) DistributedSystem.connect(config);
         AttributesFactory factory = new AttributesFactory();
         factory.setScope(Scope.LOCAL);
@@ -2159,8 +2151,7 @@ public class QueryUsingPoolDUnitTest extends CacheTestCase {
     vm0.invoke(new CacheSerializableRunnable("Create Bridge Server") {
       public void run2() throws CacheException {
         Properties config = new Properties();
-        int unusedPort = AvailablePort.getRandomAvailablePort(AvailablePort.JGROUPS);
-        config.setProperty("mcast-port", String.valueOf(unusedPort));
+        config.setProperty("locators", "localhost["+getDUnitLocatorPort()+"]");
         system = (InternalDistributedSystem) DistributedSystem.connect(config);
 
         pause(1000);
@@ -2376,8 +2367,7 @@ public class QueryUsingPoolDUnitTest extends CacheTestCase {
 
   protected void configAndStartBridgeServer() {
     Properties config = new Properties();
-    int unusedPort = AvailablePort.getRandomAvailablePort(AvailablePort.JGROUPS);
-    config.setProperty("mcast-port", String.valueOf(unusedPort));
+    config.setProperty("locators", "localhost["+getDUnitLocatorPort()+"]");
     system = (InternalDistributedSystem) DistributedSystem.connect(config);
     AttributesFactory factory = new AttributesFactory();
     factory.setScope(Scope.LOCAL);

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3c560cb9/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/dunit/RemoteQueryDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/dunit/RemoteQueryDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/dunit/RemoteQueryDUnitTest.java
index 0028540..4227677 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/dunit/RemoteQueryDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/dunit/RemoteQueryDUnitTest.java
@@ -83,8 +83,7 @@ public class RemoteQueryDUnitTest extends CacheTestCase {
     vm0.invoke(new CacheSerializableRunnable("Create Bridge Server") {
         public void run2() throws CacheException {
           Properties config = new Properties();
-          int unusedPort = AvailablePort.getRandomAvailablePort(AvailablePort.JGROUPS);
-          config.setProperty("mcast-port", String.valueOf(unusedPort));
+          config.setProperty("locators", "localhost["+getDUnitLocatorPort()+"]");
           system = (InternalDistributedSystem) DistributedSystem.connect(config);
           AttributesFactory factory = new AttributesFactory();
           factory.setScope(Scope.LOCAL);
@@ -227,8 +226,7 @@ public class RemoteQueryDUnitTest extends CacheTestCase {
     vm0.invoke(new CacheSerializableRunnable("Create Bridge Server") {
         public void run2() throws CacheException {
           Properties config = new Properties();
-          int unusedPort = AvailablePort.getRandomAvailablePort(AvailablePort.JGROUPS);
-          config.setProperty("mcast-port", String.valueOf(unusedPort));
+          config.setProperty("locators", "localhost["+getDUnitLocatorPort()+"]");
           system = (InternalDistributedSystem) DistributedSystem.connect(config);
           AttributesFactory factory = new AttributesFactory();
           factory.setScope(Scope.LOCAL);
@@ -356,8 +354,7 @@ public class RemoteQueryDUnitTest extends CacheTestCase {
     vm0.invoke(new CacheSerializableRunnable("Create Bridge Server") {
         public void run2() throws CacheException {
           Properties config = new Properties();
-          int unusedPort = AvailablePort.getRandomAvailablePort(AvailablePort.JGROUPS);
-          config.setProperty("mcast-port", String.valueOf(unusedPort));
+          config.setProperty("locators", "localhost["+getDUnitLocatorPort()+"]");
           system = (InternalDistributedSystem) DistributedSystem.connect(config);
           AttributesFactory factory = new AttributesFactory();
           factory.setScope(Scope.LOCAL);
@@ -483,8 +480,7 @@ public class RemoteQueryDUnitTest extends CacheTestCase {
     vm0.invoke(new CacheSerializableRunnable("Create Bridge Server") {
         public void run2() throws CacheException {
           Properties config = new Properties();
-          int unusedPort = AvailablePort.getRandomAvailablePort(AvailablePort.JGROUPS);
-          config.setProperty("mcast-port", String.valueOf(unusedPort));
+          config.setProperty("locators", "localhost["+getDUnitLocatorPort()+"]");
           system = (InternalDistributedSystem) DistributedSystem.connect(config);
           AttributesFactory factory = new AttributesFactory();
           factory.setScope(Scope.LOCAL);
@@ -678,8 +674,7 @@ public class RemoteQueryDUnitTest extends CacheTestCase {
     vm0.invoke(new CacheSerializableRunnable("Create Bridge Server") {
         public void run2() throws CacheException {
           Properties config = new Properties();
-          int unusedPort = AvailablePort.getRandomAvailablePort(AvailablePort.JGROUPS);
-          config.setProperty("mcast-port", String.valueOf(unusedPort));
+          config.setProperty("locators", "localhost["+getDUnitLocatorPort()+"]");
           system = (InternalDistributedSystem) DistributedSystem.connect(config);
           AttributesFactory factory = new AttributesFactory();
           factory.setScope(Scope.LOCAL);
@@ -844,8 +839,7 @@ public class RemoteQueryDUnitTest extends CacheTestCase {
     vm0.invoke(new CacheSerializableRunnable("Create Bridge Server") {
         public void run2() throws CacheException {
           Properties config = new Properties();
-          int unusedPort = AvailablePort.getRandomAvailablePort(AvailablePort.JGROUPS);
-          config.setProperty("mcast-port", String.valueOf(unusedPort));
+          config.setProperty("locators", "localhost["+getDUnitLocatorPort()+"]");
           system = (InternalDistributedSystem) DistributedSystem.connect(config);
           AttributesFactory factory = new AttributesFactory();
           factory.setScope(Scope.LOCAL);
@@ -946,8 +940,7 @@ public class RemoteQueryDUnitTest extends CacheTestCase {
     vm0.invoke(new CacheSerializableRunnable("Create Bridge Server") {
         public void run2() throws CacheException {
           Properties config = new Properties();
-          int unusedPort = AvailablePort.getRandomAvailablePort(AvailablePort.JGROUPS);
-          config.setProperty("mcast-port", String.valueOf(unusedPort));
+          config.setProperty("locators", "localhost["+getDUnitLocatorPort()+"]");
           system = (InternalDistributedSystem) DistributedSystem.connect(config);
           AttributesFactory factory = new AttributesFactory();
           factory.setScope(Scope.LOCAL);
@@ -1121,8 +1114,7 @@ public class RemoteQueryDUnitTest extends CacheTestCase {
      vm0.invoke(new CacheSerializableRunnable("Create Bridge Server") {
          public void run2() throws CacheException {
            Properties config = new Properties();
-           int unusedPort = AvailablePort.getRandomAvailablePort(AvailablePort.JGROUPS);
-           config.setProperty("mcast-port", String.valueOf(unusedPort));
+           config.setProperty("locators", "localhost["+getDUnitLocatorPort()+"]");
            system = (InternalDistributedSystem) DistributedSystem.connect(config);
            AttributesFactory factory = new AttributesFactory();
            factory.setScope(Scope.LOCAL);
@@ -1234,8 +1226,7 @@ public class RemoteQueryDUnitTest extends CacheTestCase {
       vm0.invoke(new CacheSerializableRunnable("Create Bridge Server") {
           public void run2() throws CacheException {
             Properties config = new Properties();
-            int unusedPort = AvailablePort.getRandomAvailablePort(AvailablePort.JGROUPS);
-            config.setProperty("mcast-port", String.valueOf(unusedPort));
+            config.setProperty("locators", "localhost["+getDUnitLocatorPort()+"]");
             system = (InternalDistributedSystem) DistributedSystem.connect(config);
             AttributesFactory factory = new AttributesFactory();
             factory.setScope(Scope.LOCAL);