You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@geode.apache.org by ud...@apache.org on 2016/09/13 19:11:48 UTC

[01/50] [abbrv] incubator-geode git commit: GEODE-420: amended tests to fix tests

Repository: incubator-geode
Updated Branches:
  refs/heads/develop 74e773299 -> a325d074f


GEODE-420: amended tests to fix tests


Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/887f1df3
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/887f1df3
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/887f1df3

Branch: refs/heads/develop
Commit: 887f1df370eeabd583bec2010928725a78212006
Parents: bc2868a
Author: Udo Kohlmeyer <uk...@pivotal.io>
Authored: Tue Aug 16 08:32:29 2016 +1000
Committer: Udo Kohlmeyer <uk...@pivotal.io>
Committed: Tue Aug 16 08:32:29 2016 +1000

----------------------------------------------------------------------
 .../distributed/internal/AbstractDistributionConfig.java      | 1 +
 .../distributed/internal/DistributionConfigJUnitTest.java     | 7 +++++--
 2 files changed, 6 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/887f1df3/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/AbstractDistributionConfig.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/AbstractDistributionConfig.java b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/AbstractDistributionConfig.java
index e070cf4..ce835c5 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/AbstractDistributionConfig.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/AbstractDistributionConfig.java
@@ -996,6 +996,7 @@ public abstract class AbstractDistributionConfig extends AbstractConfig implemen
     m.put(SSL_KEYSTORE_PASSWORD, "Password to access the private key from the keystore.");
     m.put(SSL_TRUSTSTORE, "Location of the Java keystore file containing the collection of trusted certificates.");
     m.put(SSL_TRUSTSTORE_PASSWORD, "Password to unlock the truststore.");
+    m.put(SSL_DEFAULT_ALIAS, "The default certificate alias to be used in a multi-key keystore");
 
     dcAttDescriptions = Collections.unmodifiableMap(m);
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/887f1df3/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/DistributionConfigJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/DistributionConfigJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/DistributionConfigJUnitTest.java
index 08a1726..ad10f0c 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/DistributionConfigJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/DistributionConfigJUnitTest.java
@@ -78,7 +78,7 @@ public class DistributionConfigJUnitTest {
   @Test
   public void testGetAttributeNames() {
     String[] attNames = AbstractDistributionConfig._getAttNames();
-    assertEquals(attNames.length, 153);
+    assertEquals(attNames.length, 154);
 
     List boolList = new ArrayList();
     List intList = new ArrayList();
@@ -113,7 +113,7 @@ public class DistributionConfigJUnitTest {
     //TODO - This makes no sense. One has no idea what the correct expected number of attributes are.
     assertEquals(28, boolList.size());
     assertEquals(33, intList.size());
-    assertEquals(83, stringList.size());
+    assertEquals(84, stringList.size());
     assertEquals(5, fileList.size());
     assertEquals(4, otherList.size());
   }
@@ -279,6 +279,7 @@ public class DistributionConfigJUnitTest {
   @Test(expected = UnmodifiableException.class)
   public void testSetUnmodifiableAttributeObject() {
     config.setAttributeObject(ARCHIVE_DISK_SPACE_LIMIT, 0, ConfigSource.api());
+    config.checkAttribute(ARCHIVE_DISK_SPACE_LIMIT, 0);
   }
 
   @Test
@@ -290,6 +291,7 @@ public class DistributionConfigJUnitTest {
   @Test(expected = IllegalArgumentException.class)
   public void testOutOfRangeAttributeObject() {
     config.setAttributeObject(HTTP_SERVICE_PORT, -1, ConfigSource.api());
+    config.checkAttribute(HTTP_SERVICE_PORT, -1);
   }
 
   @Test
@@ -316,6 +318,7 @@ public class DistributionConfigJUnitTest {
     config.modifiable = true;
 //    config.setStartLocator(address);
     config.setAttributeObject(START_LOCATOR,address,ConfigSource.api());
+    config.checkAttribute(START_LOCATOR,address);
   }
 
   @Test


[23/50] [abbrv] incubator-geode git commit: GEODE-420: Bug fixes from precheckin

Posted by ud...@apache.org.
GEODE-420: Bug fixes from precheckin


Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/7addcd95
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/7addcd95
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/7addcd95

Branch: refs/heads/develop
Commit: 7addcd9538ec3c7742e468e70c306c45eaaedd3e
Parents: 2552028
Author: Udo Kohlmeyer <uk...@pivotal.io>
Authored: Thu Aug 25 07:50:58 2016 +1000
Committer: Udo Kohlmeyer <uk...@pivotal.io>
Committed: Thu Aug 25 07:50:58 2016 +1000

----------------------------------------------------------------------
 .../client/internal/ConnectionFactoryImpl.java  |   4 +-
 .../distributed/internal/InternalLocator.java   |   4 +-
 .../membership/gms/fd/GMSHealthMonitor.java     |   4 +-
 .../internal/tcpserver/TcpClient.java           |   2 +-
 .../internal/tcpserver/TcpServer.java           |   2 +-
 .../cache/tier/sockets/AcceptorImpl.java        |   5 +-
 .../gemfire/internal/i18n/LocalizedStrings.java |   6 +-
 .../internal/net/SocketCreatorFactory.java      |  30 +----
 .../internal/security/SecurableComponent.java   |   5 +
 .../gemfire/internal/tcp/TCPConduit.java        |  27 ++--
 .../management/internal/ManagementAgent.java    |   3 +-
 .../LocatorLauncherLocalIntegrationTest.java    |   4 +-
 .../LocatorLauncherRemoteIntegrationTest.java   |   5 +-
 .../ServerLauncherLocalIntegrationTest.java     |   6 +-
 .../ServerLauncherRemoteIntegrationTest.java    |   6 +-
 .../InternalDistributedSystemJUnitTest.java     |   5 +-
 .../gms/fd/GMSHealthMonitorJUnitTest.java       |   5 +-
 .../internal/tcpserver/TcpServerJUnitTest.java  |  16 +++
 .../internal/net/JSSESocketJUnitTest.java       |  12 +-
 .../net/SocketCreatorFactoryJUnitTest.java      | 133 +++++++++----------
 .../internal/JUnit4DistributedTestCase.java     |   3 +-
 21 files changed, 146 insertions(+), 141 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/7addcd95/geode-core/src/main/java/com/gemstone/gemfire/cache/client/internal/ConnectionFactoryImpl.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/cache/client/internal/ConnectionFactoryImpl.java b/geode-core/src/main/java/com/gemstone/gemfire/cache/client/internal/ConnectionFactoryImpl.java
index 5f286af..70ec538 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/cache/client/internal/ConnectionFactoryImpl.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/cache/client/internal/ConnectionFactoryImpl.java
@@ -96,13 +96,13 @@ public class ConnectionFactoryImpl implements ConnectionFactory {
     this.cancelCriterion = cancelCriterion;
     this.pool = pool;
     if (this.usedByGateway || (this.gatewaySender != null)) {
-      this.socketCreator = SocketCreatorFactory.getSSLSocketCreatorForComponent(SecurableComponent.GATEWAY);
+      this.socketCreator = SocketCreatorFactory.getSocketCreatorForComponent(SecurableComponent.GATEWAY);
       if (sender!= null && !sender.getGatewayTransportFilters().isEmpty()) {
         this.socketCreator.initializeTransportFilterClientSocketFactory(sender);
       }
     } else {
       //If configured use SSL properties for cache-server
-      this.socketCreator = SocketCreatorFactory.getSSLSocketCreatorForComponent(SecurableComponent.SERVER);
+      this.socketCreator = SocketCreatorFactory.getSocketCreatorForComponent(SecurableComponent.SERVER);
     }
   }
   

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/7addcd95/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/InternalLocator.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/InternalLocator.java b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/InternalLocator.java
index f1eb629..23ee38e 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/InternalLocator.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/InternalLocator.java
@@ -562,6 +562,8 @@ public class InternalLocator extends Locator implements ConnectListener {
       securityLogWriter.fine("SecurityLogWriter for locator is created.");
     }
 
+    SocketCreatorFactory.setDistributionConfig(this.config);
+
     this.locatorListener = WANServiceProvider.createLocatorMembershipListener();
     if (locatorListener != null) {
       // We defer setting the port until the handler is init'd - that way we'll have an actual port in the
@@ -573,7 +575,7 @@ public class InternalLocator extends Locator implements ConnectListener {
     ThreadGroup group = LoggingThreadGroup.createThreadGroup("Distribution locators", logger);
     stats = new LocatorStats();
 
-    SocketCreatorFactory.setDistributionConfig(this.config);
+
     server = new TcpServer(port, this.bindAddress, null, this.config, this.handler, new DelayedPoolStatHelper(), group, this.toString());
   }
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/7addcd95/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/fd/GMSHealthMonitor.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/fd/GMSHealthMonitor.java b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/fd/GMSHealthMonitor.java
index 00175d9..fd94153 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/fd/GMSHealthMonitor.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/fd/GMSHealthMonitor.java
@@ -489,7 +489,7 @@ public class GMSHealthMonitor implements HealthMonitor, MessageHandler {
     InternalDistributedSystem internalDistributedSystem = InternalDistributedSystem.getConnectedInstance();
     try {
       logger.debug("Checking member {} with TCP socket connection {}:{}.", suspectMember, suspectMember.getInetAddress(), port);
-      clientSocket = SocketCreatorFactory.getSSLSocketCreatorForComponent(SecurableComponent.CLUSTER).connect(suspectMember.getInetAddress(), port,
+      clientSocket = SocketCreatorFactory.getSocketCreatorForComponent(SecurableComponent.CLUSTER).connect(suspectMember.getInetAddress(), port,
           (int)memberTimeout, new ConnectTimeoutTask(services.getTimer(), memberTimeout), false, -1, false);
       clientSocket.setTcpNoDelay(true);
       return doTCPCheckMember(suspectMember, clientSocket);
@@ -635,7 +635,7 @@ public class GMSHealthMonitor implements HealthMonitor, MessageHandler {
   ServerSocket createServerSocket(InetAddress socketAddress, int[] portRange) {
     ServerSocket serverSocket;
     try {
-      serverSocket = SocketCreatorFactory.getSSLSocketCreatorForComponent(SecurableComponent.CLUSTER).createServerSocketUsingPortRange(socketAddress, 50/*backlog*/,
+      serverSocket = SocketCreatorFactory.getSocketCreatorForComponent(SecurableComponent.CLUSTER).createServerSocketUsingPortRange(socketAddress, 50/*backlog*/,
         true/*isBindAddress*/, false/*useNIO*/, 65536/*tcpBufferSize*/, portRange, false);
       socketPort = serverSocket.getLocalPort();
     } catch (IOException | SystemConnectException e) {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/7addcd95/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/tcpserver/TcpClient.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/tcpserver/TcpClient.java b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/tcpserver/TcpClient.java
index d4dac0c..78c6d95 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/tcpserver/TcpClient.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/tcpserver/TcpClient.java
@@ -61,7 +61,7 @@ public class TcpClient {
    * SocketCreatorFactory should be initialized before invoking this method.
    */
   public TcpClient() {
-    this(SocketCreatorFactory.getSSLSocketCreatorForComponent(SecurableComponent.LOCATOR));
+    this(SocketCreatorFactory.getSocketCreatorForComponent(SecurableComponent.LOCATOR));
   }
 
   /**

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/7addcd95/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/tcpserver/TcpServer.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/tcpserver/TcpServer.java b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/tcpserver/TcpServer.java
index 45d61ab..29d1d35 100755
--- a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/tcpserver/TcpServer.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/tcpserver/TcpServer.java
@@ -167,7 +167,7 @@ public class TcpServer {
     }
 
     if (this.socketCreator == null) {
-      this.socketCreator = SocketCreatorFactory.getSSLSocketCreatorForComponent(SecurableComponent.LOCATOR);
+      this.socketCreator = SocketCreatorFactory.getSocketCreatorForComponent(SecurableComponent.LOCATOR);
     } else {
       throw new RuntimeException("The socket Creator already exists");
     }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/7addcd95/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/AcceptorImpl.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/AcceptorImpl.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/AcceptorImpl.java
index 335ce24..0ad87ed 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/AcceptorImpl.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/AcceptorImpl.java
@@ -88,7 +88,6 @@ import com.gemstone.gemfire.internal.logging.log4j.LocalizedMessage;
 import com.gemstone.gemfire.internal.security.IntegratedSecurityService;
 import com.gemstone.gemfire.internal.security.SecurableComponent;
 import com.gemstone.gemfire.internal.security.SecurityService;
-import com.gemstone.gemfire.internal.security.GeodeSecurityUtil;
 import com.gemstone.gemfire.internal.net.SocketCreatorFactory;
 import com.gemstone.gemfire.internal.tcp.ConnectionTable;
 import com.gemstone.gemfire.internal.util.ArrayUtils;
@@ -389,9 +388,9 @@ public class AcceptorImpl extends Acceptor implements Runnable
     {
       if(!isGatewayReceiver) {
         //If configured use SSL properties for cache-server
-        this.socketCreator = SocketCreatorFactory.getSSLSocketCreatorForComponent(SecurableComponent.SERVER);
+        this.socketCreator = SocketCreatorFactory.getSocketCreatorForComponent(SecurableComponent.SERVER);
       } else {
-        this.socketCreator = SocketCreatorFactory.getSSLSocketCreatorForComponent(SecurableComponent.GATEWAY);
+        this.socketCreator = SocketCreatorFactory.getSocketCreatorForComponent(SecurableComponent.GATEWAY);
       }
       
       final GemFireCacheImpl gc;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/7addcd95/geode-core/src/main/java/com/gemstone/gemfire/internal/i18n/LocalizedStrings.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/i18n/LocalizedStrings.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/i18n/LocalizedStrings.java
index de646a2..2f1bdf6 100755
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/i18n/LocalizedStrings.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/i18n/LocalizedStrings.java
@@ -3745,6 +3745,10 @@ public class LocalizedStrings {
   public static final StringId ColocationHelper_REGION_SPECIFIED_IN_COLOCATEDWITH_DOES_NOT_EXIST = new StringId(6640, "Region specified in ''colocated-with'' ({0}) for region {1} does not exist. It should be created before setting ''colocated-with'' attribute for this region.");
   public static final StringId ColocationLogger_PERSISTENT_DATA_RECOVERY_OF_REGION_PREVENTED_BY_OFFLINE_COLOCATED_CHILDREN = new StringId(6641, "Persistent data recovery for region {0} is prevented by offline colocated region{1}");
 
+  public static StringId AbstractDistributionConfig_LOCATOR_SSL_ALIAS_0 = new StringId(6642, "SSL locator communications uses this alias when determining the " + "key to use from the keystore for SSL. Defaults to \"{0}\".");
+
+  public static StringId AbstractDistributionConfig_SSL_ENABLED_COMPONENTS_INVALID_ALIAS_OPTIONS = new StringId(6643, "The alias options for the SSL options provided seem to be invalid. Please check that all required aliases are set");
+
   /** Testing strings, messageId 90000-99999 **/
 
   /**
@@ -3758,7 +3762,5 @@ public class LocalizedStrings {
 
   public static final StringId DistributedRegion_INITIALIZING_REGION_COMPLETED_0 = new StringId(90005, "Initialization of region {0} completed");
 
-  public static StringId AbstractDistributionConfig_LOCATOR_SSL_ALIAS_0 = new StringId(6640, "SSL locator communications uses this alias when determining the " + "key to use from the keystore for SSL. Defaults to \"{0}\".");
 
-  public static StringId AbstractDistributionConfig_SSL_ENABLED_COMPONENTS_INVALID_ALIAS_OPTIONS = new StringId(6641, "The alias options for the SSL options provided seem to be invalid. Please check that all required aliases are set");
 }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/7addcd95/geode-core/src/main/java/com/gemstone/gemfire/internal/net/SocketCreatorFactory.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/net/SocketCreatorFactory.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/net/SocketCreatorFactory.java
index 4686fe2..96e8d77 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/net/SocketCreatorFactory.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/net/SocketCreatorFactory.java
@@ -65,7 +65,7 @@ public class SocketCreatorFactory {
     return getInstance(false);
   }
 
-  public static SocketCreator getSSLSocketCreatorForComponent(SecurableComponent sslEnabledComponent) {
+  public static SocketCreator getSocketCreatorForComponent(SecurableComponent sslEnabledComponent) {
     SSLConfig sslConfigForComponent = SSLConfigurationFactory.getSSLConfigForComponent(sslEnabledComponent);
     return getInstance().getOrCreateSocketCreatorForSSLEnabledComponent(sslEnabledComponent, sslConfigForComponent);
   }
@@ -83,7 +83,7 @@ public class SocketCreatorFactory {
 
 
   private SocketCreator getOrCreateSocketCreatorForSSLEnabledComponent(final SecurableComponent sslEnabledComponent, final SSLConfig sslConfig) {
-    SocketCreator socketCreator = getSocketCreatorForComponent(sslEnabledComponent);
+    SocketCreator socketCreator = getRegisteredSocketCreatorForComponent(sslEnabledComponent);
     if (socketCreator == null) {
       return getSSLSocketCreator(sslEnabledComponent, sslConfig);
     } else {
@@ -95,42 +95,26 @@ public class SocketCreatorFactory {
     SocketCreator socketCreator = null;
     if (sslConfig.isEnabled()) {
       socketCreator = new SocketCreator(sslConfig);
-      addSocketCreatorForComponent(sslEnableComponent, socketCreator);
+      registerSocketCreatorForComponent(sslEnableComponent, socketCreator);
     } else {
-      socketCreator = getSocketCreatorForComponent(SecurableComponent.NONE);
+      socketCreator = getRegisteredSocketCreatorForComponent(SecurableComponent.NONE);
       if (socketCreator == null) {
         socketCreator = new SocketCreator(sslConfig);
-        addSocketCreatorForComponent(SecurableComponent.NONE, socketCreator);
+        registerSocketCreatorForComponent(SecurableComponent.NONE, socketCreator);
       }
     }
     return socketCreator;
   }
 
-  private synchronized void addSocketCreatorForComponent(SecurableComponent sslEnabledComponent, SocketCreator socketCreator) {
+  private synchronized void registerSocketCreatorForComponent(SecurableComponent sslEnabledComponent, SocketCreator socketCreator) {
     socketCreators.put(sslEnabledComponent, socketCreator);
   }
 
-  private synchronized SocketCreator getSocketCreatorForComponent(SecurableComponent sslEnabledComponent) {
+  private synchronized SocketCreator getRegisteredSocketCreatorForComponent(SecurableComponent sslEnabledComponent) {
     return socketCreators.get(sslEnabledComponent);
   }
 
   /**
-   * Read an array of values from a string, whitespace separated.
-   */
-  private static String[] createStringArrayFromString(final String text) {
-    if (text == null || text.trim().equals("")) {
-      return null;
-    }
-
-    StringTokenizer st = new StringTokenizer(text);
-    Vector v = new Vector();
-    while (st.hasMoreTokens()) {
-      v.add(st.nextToken());
-    }
-    return (String[]) v.toArray(new String[v.size()]);
-  }
-
-  /**
    * This a legacy SocketCreator initializer.
    * @param useSSL
    * @param needClientAuth

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/7addcd95/geode-core/src/main/java/com/gemstone/gemfire/internal/security/SecurableComponent.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/security/SecurableComponent.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/security/SecurableComponent.java
index d3c57aa..f14b268 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/security/SecurableComponent.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/security/SecurableComponent.java
@@ -51,4 +51,9 @@ public enum SecurableComponent {
   public String getConstant() {
     return constant;
   }
+
+  @Override
+  public String toString() {
+    return constant;
+  }
 }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/7addcd95/geode-core/src/main/java/com/gemstone/gemfire/internal/tcp/TCPConduit.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/tcp/TCPConduit.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/tcp/TCPConduit.java
index d97a479..aa60101 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/tcp/TCPConduit.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/tcp/TCPConduit.java
@@ -49,7 +49,6 @@ import com.gemstone.gemfire.distributed.internal.DM;
 import com.gemstone.gemfire.distributed.internal.DMStats;
 import com.gemstone.gemfire.distributed.internal.DistributionConfig;
 import com.gemstone.gemfire.distributed.internal.DistributionMessage;
-import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem;
 import com.gemstone.gemfire.distributed.internal.LonerDistributionManager;
 import com.gemstone.gemfire.distributed.internal.direct.DirectChannel;
 import com.gemstone.gemfire.distributed.internal.membership.InternalDistributedMember;
@@ -282,8 +281,8 @@ public class TCPConduit implements Runnable {
         }
       }
     }
-    
-    this.socketCreator = SocketCreatorFactory.getSSLSocketCreatorForComponent(SecurableComponent.CLUSTER);
+
+    this.socketCreator = SocketCreatorFactory.getSocketCreatorForComponent(SecurableComponent.CLUSTER);
 
     startAcceptor();
   }
@@ -450,9 +449,7 @@ public class TCPConduit implements Runnable {
             int newSize = socket.getReceiveBufferSize();
             if (newSize != tcpBufferSize) {
               logger.info(LocalizedMessage.create(LocalizedStrings.TCPConduit_0_IS_1_INSTEAD_OF_THE_REQUESTED_2, new Object[] {
-                "Listener receiverBufferSize",
-                Integer.valueOf(newSize),
-                Integer.valueOf(tcpBufferSize)
+                "Listener receiverBufferSize", Integer.valueOf(newSize), Integer.valueOf(tcpBufferSize)
               }));
             }
           } catch (SocketException ex) {
@@ -470,9 +467,7 @@ public class TCPConduit implements Runnable {
           int newSize = socket.getReceiveBufferSize();
           if (newSize != this.tcpBufferSize) {
             logger.info(LocalizedMessage.create(LocalizedStrings.TCPConduit_0_IS_1_INSTEAD_OF_THE_REQUESTED_2, new Object[] {
-              "Listener receiverBufferSize",
-              Integer.valueOf(newSize),
-              Integer.valueOf(this.tcpBufferSize)
+              "Listener receiverBufferSize", Integer.valueOf(newSize), Integer.valueOf(this.tcpBufferSize)
             }));
           }
         } catch (SocketException ex) {
@@ -482,7 +477,10 @@ public class TCPConduit implements Runnable {
       }
       port = socket.getLocalPort();
     } catch (IOException io) {
-      throw new ConnectionException(LocalizedStrings.TCPConduit_EXCEPTION_CREATING_SERVERSOCKET.toLocalizedString(new Object[] { Integer.valueOf(p), bindAddress }), io);
+      throw new ConnectionException(LocalizedStrings.TCPConduit_EXCEPTION_CREATING_SERVERSOCKET.toLocalizedString(new Object[] {
+        Integer.valueOf(p),
+        bindAddress
+      }), io);
     }
   }
 
@@ -672,7 +670,7 @@ public class TCPConduit implements Runnable {
         }
 
         acceptConnection(othersock);
-        
+
       } catch (ClosedByInterruptException cbie) {
         //safe to ignore
       } catch (ClosedChannelException e) {
@@ -776,8 +774,7 @@ public class TCPConduit implements Runnable {
         {
           this.stats.incFailedAccept();
           logger.warn(LocalizedMessage.create(LocalizedStrings.TCPConduit_FAILED_TO_ACCEPT_CONNECTION_FROM_0_BECAUSE_1, new Object[] {
-            othersock.getInetAddress(),
-            e
+            othersock.getInetAddress(), e
           }), e);
         }
       }
@@ -1027,8 +1024,7 @@ public class TCPConduit implements Runnable {
           // to have m defined for a nice message...
           if (memberInTrouble == null) {
             logger.warn(LocalizedMessage.create(LocalizedStrings.TCPConduit_ERROR_SENDING_MESSAGE_TO_0_WILL_REATTEMPT_1, new Object[] {
-              memberAddress,
-              problem
+              memberAddress, problem
             }));
             memberInTrouble = memberAddress;
           } else {
@@ -1184,6 +1180,7 @@ public class TCPConduit implements Runnable {
   protected SocketCreator getSocketCreator() {
     return socketCreator;
   }
+
   /**
    * ARB: Called by Connection before handshake reply is sent.
    * Returns true if member is part of view, false if membership is not confirmed before timeout.

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/7addcd95/geode-core/src/main/java/com/gemstone/gemfire/management/internal/ManagementAgent.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/management/internal/ManagementAgent.java b/geode-core/src/main/java/com/gemstone/gemfire/management/internal/ManagementAgent.java
index dc17391..5f0d497 100755
--- a/geode-core/src/main/java/com/gemstone/gemfire/management/internal/ManagementAgent.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/management/internal/ManagementAgent.java
@@ -24,7 +24,6 @@ import java.net.ServerSocket;
 import java.net.Socket;
 import java.net.UnknownHostException;
 import java.rmi.AlreadyBoundException;
-import java.rmi.Remote;
 import java.rmi.registry.LocateRegistry;
 import java.rmi.registry.Registry;
 import java.rmi.server.RMIClientSocketFactory;
@@ -357,7 +356,7 @@ public class ManagementAgent {
       bindAddr = InetAddress.getByName(hostname);
     }
 
-    final SocketCreator socketCreator = SocketCreatorFactory.getSSLSocketCreatorForComponent(SecurableComponent.JMX);
+    final SocketCreator socketCreator = SocketCreatorFactory.getSocketCreatorForComponent(SecurableComponent.JMX);
 
     final boolean ssl = socketCreator.useSSL();
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/7addcd95/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorLauncherLocalIntegrationTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorLauncherLocalIntegrationTest.java b/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorLauncherLocalIntegrationTest.java
index 9d3556e..a3623f6 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorLauncherLocalIntegrationTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorLauncherLocalIntegrationTest.java
@@ -327,7 +327,7 @@ public class LocatorLauncherLocalIntegrationTest extends AbstractLocatorLauncher
       return;
     }
 
-    this.socket = SocketCreatorFactory.getSSLSocketCreatorForComponent(SecurableComponent.CLUSTER).createServerSocket(this.locatorPort, 50, null, -1);
+    this.socket = SocketCreatorFactory.getSocketCreatorForComponent(SecurableComponent.CLUSTER).createServerSocket(this.locatorPort, 50, null, -1);
     assertTrue(this.socket.isBound());
     assertFalse(this.socket.isClosed());
     assertFalse(AvailablePort.isPortAvailable(this.locatorPort, AvailablePort.SOCKET));
@@ -544,7 +544,7 @@ public class LocatorLauncherLocalIntegrationTest extends AbstractLocatorLauncher
     }
 
     // generate one free port and then use it instead of default
-    this.socket = SocketCreatorFactory.getSSLSocketCreatorForComponent(SecurableComponent.CLUSTER).createServerSocket(this.locatorPort, 50, null, -1);
+    this.socket = SocketCreatorFactory.getSocketCreatorForComponent(SecurableComponent.CLUSTER).createServerSocket(this.locatorPort, 50, null, -1);
     
     this.launcher = new Builder()
         .setMemberName(getUniqueName())

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/7addcd95/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorLauncherRemoteIntegrationTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorLauncherRemoteIntegrationTest.java b/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorLauncherRemoteIntegrationTest.java
index a788b1d..7154b8f 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorLauncherRemoteIntegrationTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorLauncherRemoteIntegrationTest.java
@@ -50,7 +50,6 @@ import java.lang.management.ManagementFactory;
 import java.net.InetAddress;
 import java.util.ArrayList;
 import java.util.List;
-import java.util.Properties;
 import java.util.concurrent.atomic.AtomicBoolean;
 
 import static com.gemstone.gemfire.distributed.ConfigurationProperties.MCAST_PORT;
@@ -399,7 +398,7 @@ public class LocatorLauncherRemoteIntegrationTest extends AbstractLocatorLaunche
 
   @Test
   public void testStartUsingPortInUseFails() throws Throwable {
-    this.socket = SocketCreatorFactory.getSSLSocketCreatorForComponent(SecurableComponent.CLUSTER).createServerSocket(this.locatorPort, 50, null, -1);
+    this.socket = SocketCreatorFactory.createNonDefaultInstance(false,false,null,null,System.getProperties()).createServerSocket(this.locatorPort, 50, null, -1);
     this.locatorPort = this.socket.getLocalPort();
 
     final List<String> jvmArguments = getJvmArguments();
@@ -471,7 +470,7 @@ public class LocatorLauncherRemoteIntegrationTest extends AbstractLocatorLaunche
     String expectedString = "java.net.BindException";
     AtomicBoolean outputContainedExpectedString = new AtomicBoolean();
 
-    this.socket = SocketCreatorFactory.getSSLSocketCreatorForComponent(SecurableComponent.CLUSTER).createServerSocket(this.locatorPort, 50, null, -1);
+    this.socket = SocketCreatorFactory.createNonDefaultInstance(false,false,null,null,System.getProperties()).createServerSocket(this.locatorPort, 50, null, -1);
     this.locatorPort = this.socket.getLocalPort();
 
     assertFalse(AvailablePort.isPortAvailable(this.locatorPort, AvailablePort.SOCKET));

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/7addcd95/geode-core/src/test/java/com/gemstone/gemfire/distributed/ServerLauncherLocalIntegrationTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/distributed/ServerLauncherLocalIntegrationTest.java b/geode-core/src/test/java/com/gemstone/gemfire/distributed/ServerLauncherLocalIntegrationTest.java
index 32ed996..129e727 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/distributed/ServerLauncherLocalIntegrationTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/distributed/ServerLauncherLocalIntegrationTest.java
@@ -350,7 +350,7 @@ public class ServerLauncherLocalIntegrationTest extends AbstractServerLauncherIn
     String rootFolder = this.temporaryFolder.getRoot().getCanonicalPath();
 
     // generate one free port and then use TEST_OVERRIDE_DEFAULT_PORT_PROPERTY
-    this.socket = SocketCreatorFactory.getSSLSocketCreatorForComponent(SecurableComponent.CLUSTER).createServerSocket(this.serverPort, 50, null, -1);
+    this.socket = SocketCreatorFactory.createNonDefaultInstance(false,false,null,null,System.getProperties()).createServerSocket(this.serverPort, 50, null, -1);
     assertFalse(AvailablePort.isPortAvailable(this.serverPort, AvailablePort.SOCKET));
     
     // build and start the server
@@ -609,7 +609,7 @@ public class ServerLauncherLocalIntegrationTest extends AbstractServerLauncherIn
     String rootFolder = this.temporaryFolder.getRoot().getCanonicalPath();
 
     // generate one free port and then use TEST_OVERRIDE_DEFAULT_PORT_PROPERTY
-    this.socket = SocketCreatorFactory.getSSLSocketCreatorForComponent(SecurableComponent.CLUSTER).createServerSocket(this.serverPort, 50, null, -1);
+    this.socket = SocketCreatorFactory.getSocketCreatorForComponent(SecurableComponent.CLUSTER).createServerSocket(this.serverPort, 50, null, -1);
     assertFalse(AvailablePort.isPortAvailable(this.serverPort, AvailablePort.SOCKET));
     
     // build and start the server
@@ -770,7 +770,7 @@ public class ServerLauncherLocalIntegrationTest extends AbstractServerLauncherIn
 
     // generate one free port and then use TEST_OVERRIDE_DEFAULT_PORT_PROPERTY
     final int freeTCPPort = AvailablePort.getRandomAvailablePort(AvailablePort.SOCKET);
-    this.socket = SocketCreatorFactory.getSSLSocketCreatorForComponent(SecurableComponent.CLUSTER).createServerSocket(freeTCPPort, 50, null, -1);
+    this.socket = SocketCreatorFactory.getSocketCreatorForComponent(SecurableComponent.CLUSTER).createServerSocket(freeTCPPort, 50, null, -1);
     
     // build and start the server
     final Builder builder = new Builder()

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/7addcd95/geode-core/src/test/java/com/gemstone/gemfire/distributed/ServerLauncherRemoteIntegrationTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/distributed/ServerLauncherRemoteIntegrationTest.java b/geode-core/src/test/java/com/gemstone/gemfire/distributed/ServerLauncherRemoteIntegrationTest.java
index 6483a9b..fe26d93 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/distributed/ServerLauncherRemoteIntegrationTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/distributed/ServerLauncherRemoteIntegrationTest.java
@@ -428,7 +428,7 @@ public class ServerLauncherRemoteIntegrationTest extends AbstractServerLauncherR
   @Test
   public void testStartUsingDisableDefaultServerSkipsPortCheck() throws Throwable {
     // make serverPort in use
-    this.socket = SocketCreatorFactory.getSSLSocketCreatorForComponent(SecurableComponent.CLUSTER).createServerSocket(this.serverPort, 50, null, -1);
+    this.socket = SocketCreatorFactory.createNonDefaultInstance(false,false,null,null,System.getProperties()).createServerSocket(this.serverPort, 50, null, -1);
     assertFalse(AvailablePort.isPortAvailable(this.serverPort, AvailablePort.SOCKET));
     
     // build and start the server
@@ -552,7 +552,7 @@ public class ServerLauncherRemoteIntegrationTest extends AbstractServerLauncherR
   @Test
   public void testStartUsingServerPortInUseFails() throws Throwable {
     // make serverPort in use
-    this.socket = SocketCreatorFactory.getSSLSocketCreatorForComponent(SecurableComponent.CLUSTER).createServerSocket(this.serverPort, 50, null, -1);
+    this.socket = SocketCreatorFactory.createNonDefaultInstance(false,false,null,null,System.getProperties()).createServerSocket(this.serverPort, 50, null, -1);
     assertFalse(AvailablePort.isPortAvailable(this.serverPort, AvailablePort.SOCKET));
     
     final List<String> jvmArguments = getJvmArguments();
@@ -799,7 +799,7 @@ public class ServerLauncherRemoteIntegrationTest extends AbstractServerLauncherR
     AtomicBoolean outputContainedExpectedString = new AtomicBoolean();
 
     // make serverPort in use
-    this.socket = SocketCreatorFactory.getSSLSocketCreatorForComponent(SecurableComponent.CLUSTER).createServerSocket(this.serverPort, 50, null, -1);
+    this.socket = SocketCreatorFactory.createNonDefaultInstance(false,false,null,null,System.getProperties()).createServerSocket(this.serverPort, 50, null, -1);
     assertFalse(AvailablePort.isPortAvailable(this.serverPort, AvailablePort.SOCKET));
     
     // launch server

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/7addcd95/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/InternalDistributedSystemJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/InternalDistributedSystemJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/InternalDistributedSystemJUnitTest.java
index d285d98..6695371 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/InternalDistributedSystemJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/InternalDistributedSystemJUnitTest.java
@@ -58,7 +58,6 @@ import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
  */
 @Category(IntegrationTest.class)
 public class InternalDistributedSystemJUnitTest
-  //implements DistributionConfig
 {
 
   /**
@@ -721,13 +720,13 @@ public class InternalDistributedSystemJUnitTest
   @Rule
   public ExpectedException illegalArgumentException = ExpectedException.none();
 
-  @Test(expected = GemFireConfigException.class)
+  @Test(expected = IllegalArgumentException.class)
   public void testSSLEnabledComponentsWrongComponentName() {
     Properties props = getCommonProperties();
     props.setProperty(SSL_ENABLED_COMPONENTS, "testing");
     new DistributionConfigImpl(props, false);
     illegalArgumentException.expect(IllegalArgumentException.class);
-    illegalArgumentException.expectMessage("\"testing\" is not in the valid set of options \"all,cluster,server,gateway,jmx,http\"");
+    illegalArgumentException.expectMessage("There is no registered component for the name: testing");
   }
 
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/7addcd95/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/gms/fd/GMSHealthMonitorJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/gms/fd/GMSHealthMonitorJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/gms/fd/GMSHealthMonitorJUnitTest.java
index e487e39..c0b9aac 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/gms/fd/GMSHealthMonitorJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/gms/fd/GMSHealthMonitorJUnitTest.java
@@ -33,6 +33,7 @@ import com.gemstone.gemfire.distributed.internal.membership.gms.messages.Suspect
 import com.gemstone.gemfire.distributed.internal.membership.gms.messages.SuspectRequest;
 import com.gemstone.gemfire.internal.net.SocketCreator;
 import com.gemstone.gemfire.internal.Version;
+import com.gemstone.gemfire.internal.net.SocketCreatorFactory;
 import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
 import org.jgroups.util.UUID;
 import org.junit.After;
@@ -96,7 +97,8 @@ public class GMSHealthMonitorJUnitTest {
     nonDefault.put(LOG_LEVEL, "fine");
     nonDefault.put(MEMBER_TIMEOUT, "2000");
     nonDefault.put(LOCATORS, "localhost[10344]");
-    DM dm = mock(DM.class);    
+    DM dm = mock(DM.class);
+    SocketCreatorFactory.setDistributionConfig(new DistributionConfigImpl(new Properties()));
     InternalDistributedSystem system = InternalDistributedSystem.newInstanceForTesting(dm, nonDefault);
 
     when(mockConfig.getDistributionConfig()).thenReturn(mockDistConfig);
@@ -132,6 +134,7 @@ public class GMSHealthMonitorJUnitTest {
   @After
   public void tearDown() {
     gmsHealthMonitor.stop();
+    SocketCreatorFactory.close();
     //System.getProperties().remove("gemfire.bind-address");
   }
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/7addcd95/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/tcpserver/TcpServerJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/tcpserver/TcpServerJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/tcpserver/TcpServerJUnitTest.java
index 59f5cc22..758d8cf 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/tcpserver/TcpServerJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/tcpserver/TcpServerJUnitTest.java
@@ -29,15 +29,19 @@ import java.util.concurrent.TimeUnit;
 import java.util.concurrent.atomic.AtomicBoolean;
 import java.util.concurrent.atomic.AtomicInteger;
 
+import org.junit.After;
+import org.junit.Before;
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
 
 import com.gemstone.gemfire.DataSerializable;
 import com.gemstone.gemfire.cache.GemFireCache;
 import com.gemstone.gemfire.distributed.DistributedSystem;
+import com.gemstone.gemfire.distributed.internal.DistributionConfigImpl;
 import com.gemstone.gemfire.distributed.internal.PoolStatHelper;
 import com.gemstone.gemfire.distributed.internal.SharedConfiguration;
 import com.gemstone.gemfire.internal.AvailablePort;
+import com.gemstone.gemfire.internal.net.SocketCreatorFactory;
 import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
 
 @Category(IntegrationTest.class)
@@ -48,6 +52,18 @@ public class TcpServerJUnitTest {
   private SimpleStats stats;
   private TcpServer server;
 
+  @Before
+  public void setup()
+  {
+    SocketCreatorFactory.setDistributionConfig(new DistributionConfigImpl(new Properties()));
+  }
+
+  @After
+  public void teardown()
+  {
+    SocketCreatorFactory.close();
+  }
+
   private void start(TcpHandler handler) throws IOException {
     localhost = InetAddress.getLocalHost();
     port = AvailablePort.getRandomAvailablePort(AvailablePort.SOCKET);

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/7addcd95/geode-core/src/test/java/com/gemstone/gemfire/internal/net/JSSESocketJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/net/JSSESocketJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/net/JSSESocketJUnitTest.java
index 1d7d66a..313f797 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/net/JSSESocketJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/net/JSSESocketJUnitTest.java
@@ -127,13 +127,13 @@ public class JSSESocketJUnitTest {
       DistributionConfigImpl distributionConfig = new DistributionConfigImpl(new Properties());
 
       SocketCreatorFactory.setDistributionConfig(distributionConfig);
-      assertTrue(SocketCreatorFactory.getSSLSocketCreatorForComponent(SecurableComponent.CLUSTER).useSSL());
+      assertTrue(SocketCreatorFactory.getSocketCreatorForComponent(SecurableComponent.CLUSTER).useSSL());
 
-      final ServerSocket serverSocket = SocketCreatorFactory.getSSLSocketCreatorForComponent(SecurableComponent.CLUSTER).createServerSocket(randport, 0, InetAddress.getByName("localhost"));
+      final ServerSocket serverSocket = SocketCreatorFactory.getSocketCreatorForComponent(SecurableComponent.CLUSTER).createServerSocket(randport, 0, InetAddress.getByName("localhost"));
 
       Thread serverThread = startServer(serverSocket, receiver);
 
-      Socket client = SocketCreatorFactory.getSSLSocketCreatorForComponent(SecurableComponent.CLUSTER).connectForServer(InetAddress.getByName("localhost"), randport);
+      Socket client = SocketCreatorFactory.getSocketCreatorForComponent(SecurableComponent.CLUSTER).connectForServer(InetAddress.getByName("localhost"), randport);
 
       ObjectOutputStream oos = new ObjectOutputStream(client.getOutputStream());
       String expected = new String("testing " + name.getMethodName());
@@ -186,7 +186,7 @@ public class JSSESocketJUnitTest {
     factoryInvoked = false;
     try {
       try {
-        Socket sock = SocketCreatorFactory.getSSLSocketCreatorForComponent(SecurableComponent.CLUSTER).connectForClient("localhost", 12345, 0);
+        Socket sock = SocketCreatorFactory.getSocketCreatorForComponent(SecurableComponent.CLUSTER).connectForClient("localhost", 12345, 0);
         sock.close();
         fail("socket factory was invoked");
       } catch (IOException e) {
@@ -194,7 +194,7 @@ public class JSSESocketJUnitTest {
       }
     } finally {
       System.getProperties().remove(DistributionConfig.GEMFIRE_PREFIX + "clientSocketFactory");
-      SocketCreatorFactory.getSSLSocketCreatorForComponent(SecurableComponent.CLUSTER).initializeClientSocketFactory();
+      SocketCreatorFactory.getSocketCreatorForComponent(SecurableComponent.CLUSTER).initializeClientSocketFactory();
     }
   }
 
@@ -222,7 +222,7 @@ public class JSSESocketJUnitTest {
       public void run() {
         try {
           Socket s = serverSocket.accept();
-          SocketCreatorFactory.getSSLSocketCreatorForComponent(SecurableComponent.CLUSTER).configureServerSSLSocket(s);
+          SocketCreatorFactory.getSocketCreatorForComponent(SecurableComponent.CLUSTER).configureServerSSLSocket(s);
           ObjectInputStream ois = new ObjectInputStream(s.getInputStream());
           receiver[0] = ois.readObject();
           server = s;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/7addcd95/geode-core/src/test/java/com/gemstone/gemfire/internal/net/SocketCreatorFactoryJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/net/SocketCreatorFactoryJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/net/SocketCreatorFactoryJUnitTest.java
index d406755..c55c661 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/net/SocketCreatorFactoryJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/net/SocketCreatorFactoryJUnitTest.java
@@ -22,7 +22,6 @@ import java.io.File;
 import java.io.IOException;
 import java.util.Properties;
 
-import org.junit.After;
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
 
@@ -42,12 +41,12 @@ public class SocketCreatorFactoryJUnitTest extends JSSESocketJUnitTest {
     DistributionConfigImpl distributionConfig = new DistributionConfigImpl(properties);
     SocketCreatorFactory.setDistributionConfig(distributionConfig);
 
-    Assert.assertTrue(SocketCreatorFactory.getSSLSocketCreatorForComponent(SecurableComponent.LOCATOR).useSSL());
-    Assert.assertFalse(SocketCreatorFactory.getSSLSocketCreatorForComponent(SecurableComponent.CLUSTER).useSSL());
-    Assert.assertFalse(SocketCreatorFactory.getSSLSocketCreatorForComponent(SecurableComponent.GATEWAY).useSSL());
-    Assert.assertFalse(SocketCreatorFactory.getSSLSocketCreatorForComponent(SecurableComponent.JMX).useSSL());
-    Assert.assertFalse(SocketCreatorFactory.getSSLSocketCreatorForComponent(SecurableComponent.SERVER).useSSL());
-    Assert.assertFalse(SocketCreatorFactory.getSSLSocketCreatorForComponent(SecurableComponent.HTTP_SERVICE).useSSL());
+    Assert.assertTrue(SocketCreatorFactory.getSocketCreatorForComponent(SecurableComponent.LOCATOR).useSSL());
+    Assert.assertFalse(SocketCreatorFactory.getSocketCreatorForComponent(SecurableComponent.CLUSTER).useSSL());
+    Assert.assertFalse(SocketCreatorFactory.getSocketCreatorForComponent(SecurableComponent.GATEWAY).useSSL());
+    Assert.assertFalse(SocketCreatorFactory.getSocketCreatorForComponent(SecurableComponent.JMX).useSSL());
+    Assert.assertFalse(SocketCreatorFactory.getSocketCreatorForComponent(SecurableComponent.SERVER).useSSL());
+    Assert.assertFalse(SocketCreatorFactory.getSocketCreatorForComponent(SecurableComponent.HTTP_SERVICE).useSSL());
   }
 
   @Test
@@ -57,12 +56,12 @@ public class SocketCreatorFactoryJUnitTest extends JSSESocketJUnitTest {
     DistributionConfigImpl distributionConfig = new DistributionConfigImpl(properties);
     SocketCreatorFactory.setDistributionConfig(distributionConfig);
 
-    Assert.assertTrue(SocketCreatorFactory.getSSLSocketCreatorForComponent(SecurableComponent.CLUSTER).useSSL());
-    Assert.assertTrue(SocketCreatorFactory.getSSLSocketCreatorForComponent(SecurableComponent.LOCATOR).useSSL());
-    Assert.assertTrue(SocketCreatorFactory.getSSLSocketCreatorForComponent(SecurableComponent.GATEWAY).useSSL());
-    Assert.assertTrue(SocketCreatorFactory.getSSLSocketCreatorForComponent(SecurableComponent.JMX).useSSL());
-    Assert.assertTrue(SocketCreatorFactory.getSSLSocketCreatorForComponent(SecurableComponent.SERVER).useSSL());
-    Assert.assertTrue(SocketCreatorFactory.getSSLSocketCreatorForComponent(SecurableComponent.HTTP_SERVICE).useSSL());
+    Assert.assertTrue(SocketCreatorFactory.getSocketCreatorForComponent(SecurableComponent.CLUSTER).useSSL());
+    Assert.assertTrue(SocketCreatorFactory.getSocketCreatorForComponent(SecurableComponent.LOCATOR).useSSL());
+    Assert.assertTrue(SocketCreatorFactory.getSocketCreatorForComponent(SecurableComponent.GATEWAY).useSSL());
+    Assert.assertTrue(SocketCreatorFactory.getSocketCreatorForComponent(SecurableComponent.JMX).useSSL());
+    Assert.assertTrue(SocketCreatorFactory.getSocketCreatorForComponent(SecurableComponent.SERVER).useSSL());
+    Assert.assertTrue(SocketCreatorFactory.getSocketCreatorForComponent(SecurableComponent.HTTP_SERVICE).useSSL());
   }
 
   @Test
@@ -72,12 +71,12 @@ public class SocketCreatorFactoryJUnitTest extends JSSESocketJUnitTest {
     DistributionConfigImpl distributionConfig = new DistributionConfigImpl(properties);
     SocketCreatorFactory.setDistributionConfig(distributionConfig);
 
-    Assert.assertTrue(SocketCreatorFactory.getSSLSocketCreatorForComponent(SecurableComponent.CLUSTER).useSSL());
-    Assert.assertFalse(SocketCreatorFactory.getSSLSocketCreatorForComponent(SecurableComponent.GATEWAY).useSSL());
-    Assert.assertFalse(SocketCreatorFactory.getSSLSocketCreatorForComponent(SecurableComponent.JMX).useSSL());
-    Assert.assertFalse(SocketCreatorFactory.getSSLSocketCreatorForComponent(SecurableComponent.SERVER).useSSL());
-    Assert.assertFalse(SocketCreatorFactory.getSSLSocketCreatorForComponent(SecurableComponent.HTTP_SERVICE).useSSL());
-    Assert.assertFalse(SocketCreatorFactory.getSSLSocketCreatorForComponent(SecurableComponent.LOCATOR).useSSL());
+    Assert.assertTrue(SocketCreatorFactory.getSocketCreatorForComponent(SecurableComponent.CLUSTER).useSSL());
+    Assert.assertFalse(SocketCreatorFactory.getSocketCreatorForComponent(SecurableComponent.GATEWAY).useSSL());
+    Assert.assertFalse(SocketCreatorFactory.getSocketCreatorForComponent(SecurableComponent.JMX).useSSL());
+    Assert.assertFalse(SocketCreatorFactory.getSocketCreatorForComponent(SecurableComponent.SERVER).useSSL());
+    Assert.assertFalse(SocketCreatorFactory.getSocketCreatorForComponent(SecurableComponent.HTTP_SERVICE).useSSL());
+    Assert.assertFalse(SocketCreatorFactory.getSocketCreatorForComponent(SecurableComponent.LOCATOR).useSSL());
   }
 
   @Test
@@ -87,12 +86,12 @@ public class SocketCreatorFactoryJUnitTest extends JSSESocketJUnitTest {
     DistributionConfigImpl distributionConfig = new DistributionConfigImpl(properties);
     SocketCreatorFactory.setDistributionConfig(distributionConfig);
 
-    Assert.assertFalse(SocketCreatorFactory.getSSLSocketCreatorForComponent(SecurableComponent.CLUSTER).useSSL());
-    Assert.assertTrue(SocketCreatorFactory.getSSLSocketCreatorForComponent(SecurableComponent.GATEWAY).useSSL());
-    Assert.assertFalse(SocketCreatorFactory.getSSLSocketCreatorForComponent(SecurableComponent.JMX).useSSL());
-    Assert.assertFalse(SocketCreatorFactory.getSSLSocketCreatorForComponent(SecurableComponent.SERVER).useSSL());
-    Assert.assertFalse(SocketCreatorFactory.getSSLSocketCreatorForComponent(SecurableComponent.HTTP_SERVICE).useSSL());
-    Assert.assertFalse(SocketCreatorFactory.getSSLSocketCreatorForComponent(SecurableComponent.LOCATOR).useSSL());
+    Assert.assertFalse(SocketCreatorFactory.getSocketCreatorForComponent(SecurableComponent.CLUSTER).useSSL());
+    Assert.assertTrue(SocketCreatorFactory.getSocketCreatorForComponent(SecurableComponent.GATEWAY).useSSL());
+    Assert.assertFalse(SocketCreatorFactory.getSocketCreatorForComponent(SecurableComponent.JMX).useSSL());
+    Assert.assertFalse(SocketCreatorFactory.getSocketCreatorForComponent(SecurableComponent.SERVER).useSSL());
+    Assert.assertFalse(SocketCreatorFactory.getSocketCreatorForComponent(SecurableComponent.HTTP_SERVICE).useSSL());
+    Assert.assertFalse(SocketCreatorFactory.getSocketCreatorForComponent(SecurableComponent.LOCATOR).useSSL());
   }
 
   @Test
@@ -102,12 +101,12 @@ public class SocketCreatorFactoryJUnitTest extends JSSESocketJUnitTest {
     DistributionConfigImpl distributionConfig = new DistributionConfigImpl(properties);
     SocketCreatorFactory.setDistributionConfig(distributionConfig);
 
-    Assert.assertFalse(SocketCreatorFactory.getSSLSocketCreatorForComponent(SecurableComponent.CLUSTER).useSSL());
-    Assert.assertFalse(SocketCreatorFactory.getSSLSocketCreatorForComponent(SecurableComponent.GATEWAY).useSSL());
-    Assert.assertFalse(SocketCreatorFactory.getSSLSocketCreatorForComponent(SecurableComponent.JMX).useSSL());
-    Assert.assertFalse(SocketCreatorFactory.getSSLSocketCreatorForComponent(SecurableComponent.SERVER).useSSL());
-    Assert.assertTrue(SocketCreatorFactory.getSSLSocketCreatorForComponent(SecurableComponent.HTTP_SERVICE).useSSL());
-    Assert.assertFalse(SocketCreatorFactory.getSSLSocketCreatorForComponent(SecurableComponent.LOCATOR).useSSL());
+    Assert.assertFalse(SocketCreatorFactory.getSocketCreatorForComponent(SecurableComponent.CLUSTER).useSSL());
+    Assert.assertFalse(SocketCreatorFactory.getSocketCreatorForComponent(SecurableComponent.GATEWAY).useSSL());
+    Assert.assertFalse(SocketCreatorFactory.getSocketCreatorForComponent(SecurableComponent.JMX).useSSL());
+    Assert.assertFalse(SocketCreatorFactory.getSocketCreatorForComponent(SecurableComponent.SERVER).useSSL());
+    Assert.assertTrue(SocketCreatorFactory.getSocketCreatorForComponent(SecurableComponent.HTTP_SERVICE).useSSL());
+    Assert.assertFalse(SocketCreatorFactory.getSocketCreatorForComponent(SecurableComponent.LOCATOR).useSSL());
   }
 
   @Test
@@ -117,12 +116,12 @@ public class SocketCreatorFactoryJUnitTest extends JSSESocketJUnitTest {
     DistributionConfigImpl distributionConfig = new DistributionConfigImpl(properties);
     SocketCreatorFactory.setDistributionConfig(distributionConfig);
 
-    Assert.assertFalse(SocketCreatorFactory.getSSLSocketCreatorForComponent(SecurableComponent.CLUSTER).useSSL());
-    Assert.assertFalse(SocketCreatorFactory.getSSLSocketCreatorForComponent(SecurableComponent.GATEWAY).useSSL());
-    Assert.assertTrue(SocketCreatorFactory.getSSLSocketCreatorForComponent(SecurableComponent.JMX).useSSL());
-    Assert.assertFalse(SocketCreatorFactory.getSSLSocketCreatorForComponent(SecurableComponent.SERVER).useSSL());
-    Assert.assertFalse(SocketCreatorFactory.getSSLSocketCreatorForComponent(SecurableComponent.HTTP_SERVICE).useSSL());
-    Assert.assertFalse(SocketCreatorFactory.getSSLSocketCreatorForComponent(SecurableComponent.LOCATOR).useSSL());
+    Assert.assertFalse(SocketCreatorFactory.getSocketCreatorForComponent(SecurableComponent.CLUSTER).useSSL());
+    Assert.assertFalse(SocketCreatorFactory.getSocketCreatorForComponent(SecurableComponent.GATEWAY).useSSL());
+    Assert.assertTrue(SocketCreatorFactory.getSocketCreatorForComponent(SecurableComponent.JMX).useSSL());
+    Assert.assertFalse(SocketCreatorFactory.getSocketCreatorForComponent(SecurableComponent.SERVER).useSSL());
+    Assert.assertFalse(SocketCreatorFactory.getSocketCreatorForComponent(SecurableComponent.HTTP_SERVICE).useSSL());
+    Assert.assertFalse(SocketCreatorFactory.getSocketCreatorForComponent(SecurableComponent.LOCATOR).useSSL());
   }
 
   @Test
@@ -133,12 +132,12 @@ public class SocketCreatorFactoryJUnitTest extends JSSESocketJUnitTest {
 
     SocketCreatorFactory.setDistributionConfig(distributionConfig);
 
-    Assert.assertFalse(SocketCreatorFactory.getSSLSocketCreatorForComponent(SecurableComponent.CLUSTER).useSSL());
-    Assert.assertFalse(SocketCreatorFactory.getSSLSocketCreatorForComponent(SecurableComponent.GATEWAY).useSSL());
-    Assert.assertFalse(SocketCreatorFactory.getSSLSocketCreatorForComponent(SecurableComponent.JMX).useSSL());
-    Assert.assertTrue(SocketCreatorFactory.getSSLSocketCreatorForComponent(SecurableComponent.SERVER).useSSL());
-    Assert.assertFalse(SocketCreatorFactory.getSSLSocketCreatorForComponent(SecurableComponent.HTTP_SERVICE).useSSL());
-    Assert.assertFalse(SocketCreatorFactory.getSSLSocketCreatorForComponent(SecurableComponent.LOCATOR).useSSL());
+    Assert.assertFalse(SocketCreatorFactory.getSocketCreatorForComponent(SecurableComponent.CLUSTER).useSSL());
+    Assert.assertFalse(SocketCreatorFactory.getSocketCreatorForComponent(SecurableComponent.GATEWAY).useSSL());
+    Assert.assertFalse(SocketCreatorFactory.getSocketCreatorForComponent(SecurableComponent.JMX).useSSL());
+    Assert.assertTrue(SocketCreatorFactory.getSocketCreatorForComponent(SecurableComponent.SERVER).useSSL());
+    Assert.assertFalse(SocketCreatorFactory.getSocketCreatorForComponent(SecurableComponent.HTTP_SERVICE).useSSL());
+    Assert.assertFalse(SocketCreatorFactory.getSocketCreatorForComponent(SecurableComponent.LOCATOR).useSSL());
   }
 
   @Test
@@ -148,12 +147,12 @@ public class SocketCreatorFactoryJUnitTest extends JSSESocketJUnitTest {
     DistributionConfigImpl distributionConfig = new DistributionConfigImpl(properties);
     SocketCreatorFactory.setDistributionConfig(distributionConfig);
 
-    Assert.assertTrue(SocketCreatorFactory.getSSLSocketCreatorForComponent(SecurableComponent.CLUSTER).useSSL());
-    Assert.assertFalse(SocketCreatorFactory.getSSLSocketCreatorForComponent(SecurableComponent.GATEWAY).useSSL());
-    Assert.assertFalse(SocketCreatorFactory.getSSLSocketCreatorForComponent(SecurableComponent.JMX).useSSL());
-    Assert.assertTrue(SocketCreatorFactory.getSSLSocketCreatorForComponent(SecurableComponent.SERVER).useSSL());
-    Assert.assertFalse(SocketCreatorFactory.getSSLSocketCreatorForComponent(SecurableComponent.HTTP_SERVICE).useSSL());
-    Assert.assertFalse(SocketCreatorFactory.getSSLSocketCreatorForComponent(SecurableComponent.LOCATOR).useSSL());
+    Assert.assertTrue(SocketCreatorFactory.getSocketCreatorForComponent(SecurableComponent.CLUSTER).useSSL());
+    Assert.assertFalse(SocketCreatorFactory.getSocketCreatorForComponent(SecurableComponent.GATEWAY).useSSL());
+    Assert.assertFalse(SocketCreatorFactory.getSocketCreatorForComponent(SecurableComponent.JMX).useSSL());
+    Assert.assertTrue(SocketCreatorFactory.getSocketCreatorForComponent(SecurableComponent.SERVER).useSSL());
+    Assert.assertFalse(SocketCreatorFactory.getSocketCreatorForComponent(SecurableComponent.HTTP_SERVICE).useSSL());
+    Assert.assertFalse(SocketCreatorFactory.getSocketCreatorForComponent(SecurableComponent.LOCATOR).useSSL());
   }
 
   @Test
@@ -163,12 +162,12 @@ public class SocketCreatorFactoryJUnitTest extends JSSESocketJUnitTest {
     DistributionConfigImpl distributionConfig = new DistributionConfigImpl(properties);
     SocketCreatorFactory.setDistributionConfig(distributionConfig);
 
-    Assert.assertTrue(SocketCreatorFactory.getSSLSocketCreatorForComponent(SecurableComponent.CLUSTER).useSSL());
-    Assert.assertFalse(SocketCreatorFactory.getSSLSocketCreatorForComponent(SecurableComponent.GATEWAY).useSSL());
-    Assert.assertTrue(SocketCreatorFactory.getSSLSocketCreatorForComponent(SecurableComponent.JMX).useSSL());
-    Assert.assertTrue(SocketCreatorFactory.getSSLSocketCreatorForComponent(SecurableComponent.SERVER).useSSL());
-    Assert.assertTrue(SocketCreatorFactory.getSSLSocketCreatorForComponent(SecurableComponent.HTTP_SERVICE).useSSL());
-    Assert.assertFalse(SocketCreatorFactory.getSSLSocketCreatorForComponent(SecurableComponent.LOCATOR).useSSL());
+    Assert.assertTrue(SocketCreatorFactory.getSocketCreatorForComponent(SecurableComponent.CLUSTER).useSSL());
+    Assert.assertFalse(SocketCreatorFactory.getSocketCreatorForComponent(SecurableComponent.GATEWAY).useSSL());
+    Assert.assertTrue(SocketCreatorFactory.getSocketCreatorForComponent(SecurableComponent.JMX).useSSL());
+    Assert.assertTrue(SocketCreatorFactory.getSocketCreatorForComponent(SecurableComponent.SERVER).useSSL());
+    Assert.assertTrue(SocketCreatorFactory.getSocketCreatorForComponent(SecurableComponent.HTTP_SERVICE).useSSL());
+    Assert.assertFalse(SocketCreatorFactory.getSocketCreatorForComponent(SecurableComponent.LOCATOR).useSSL());
   }
 
   @Test
@@ -184,12 +183,12 @@ public class SocketCreatorFactoryJUnitTest extends JSSESocketJUnitTest {
     DistributionConfigImpl distributionConfig = new DistributionConfigImpl(properties);
     SocketCreatorFactory.setDistributionConfig(distributionConfig);
 
-    Assert.assertTrue(SocketCreatorFactory.getSSLSocketCreatorForComponent(SecurableComponent.CLUSTER).useSSL());
-    Assert.assertTrue(SocketCreatorFactory.getSSLSocketCreatorForComponent(SecurableComponent.GATEWAY).useSSL());
-    Assert.assertTrue(SocketCreatorFactory.getSSLSocketCreatorForComponent(SecurableComponent.JMX).useSSL());
-    Assert.assertTrue(SocketCreatorFactory.getSSLSocketCreatorForComponent(SecurableComponent.SERVER).useSSL());
-    Assert.assertTrue(SocketCreatorFactory.getSSLSocketCreatorForComponent(SecurableComponent.HTTP_SERVICE).useSSL());
-    Assert.assertTrue(SocketCreatorFactory.getSSLSocketCreatorForComponent(SecurableComponent.LOCATOR).useSSL());
+    Assert.assertTrue(SocketCreatorFactory.getSocketCreatorForComponent(SecurableComponent.CLUSTER).useSSL());
+    Assert.assertTrue(SocketCreatorFactory.getSocketCreatorForComponent(SecurableComponent.GATEWAY).useSSL());
+    Assert.assertTrue(SocketCreatorFactory.getSocketCreatorForComponent(SecurableComponent.JMX).useSSL());
+    Assert.assertTrue(SocketCreatorFactory.getSocketCreatorForComponent(SecurableComponent.SERVER).useSSL());
+    Assert.assertTrue(SocketCreatorFactory.getSocketCreatorForComponent(SecurableComponent.HTTP_SERVICE).useSSL());
+    Assert.assertTrue(SocketCreatorFactory.getSocketCreatorForComponent(SecurableComponent.LOCATOR).useSSL());
   }
 
   @Test
@@ -202,12 +201,12 @@ public class SocketCreatorFactoryJUnitTest extends JSSESocketJUnitTest {
     DistributionConfigImpl distributionConfig = new DistributionConfigImpl(properties);
     SocketCreatorFactory.setDistributionConfig(distributionConfig);
 
-    Assert.assertTrue(SocketCreatorFactory.getSSLSocketCreatorForComponent(SecurableComponent.CLUSTER).useSSL());
-    Assert.assertTrue(SocketCreatorFactory.getSSLSocketCreatorForComponent(SecurableComponent.GATEWAY).useSSL());
-    Assert.assertTrue(SocketCreatorFactory.getSSLSocketCreatorForComponent(SecurableComponent.JMX).useSSL());
-    Assert.assertTrue(SocketCreatorFactory.getSSLSocketCreatorForComponent(SecurableComponent.SERVER).useSSL());
-    Assert.assertTrue(SocketCreatorFactory.getSSLSocketCreatorForComponent(SecurableComponent.HTTP_SERVICE).useSSL());
-    Assert.assertTrue(SocketCreatorFactory.getSSLSocketCreatorForComponent(SecurableComponent.LOCATOR).useSSL());
+    Assert.assertTrue(SocketCreatorFactory.getSocketCreatorForComponent(SecurableComponent.CLUSTER).useSSL());
+    Assert.assertTrue(SocketCreatorFactory.getSocketCreatorForComponent(SecurableComponent.GATEWAY).useSSL());
+    Assert.assertTrue(SocketCreatorFactory.getSocketCreatorForComponent(SecurableComponent.JMX).useSSL());
+    Assert.assertTrue(SocketCreatorFactory.getSocketCreatorForComponent(SecurableComponent.SERVER).useSSL());
+    Assert.assertTrue(SocketCreatorFactory.getSocketCreatorForComponent(SecurableComponent.HTTP_SERVICE).useSSL());
+    Assert.assertTrue(SocketCreatorFactory.getSocketCreatorForComponent(SecurableComponent.LOCATOR).useSSL());
   }
 
   private Properties configureSSLProperties(String sslComponents) {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/7addcd95/geode-core/src/test/java/com/gemstone/gemfire/test/dunit/internal/JUnit4DistributedTestCase.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/test/dunit/internal/JUnit4DistributedTestCase.java b/geode-core/src/test/java/com/gemstone/gemfire/test/dunit/internal/JUnit4DistributedTestCase.java
index 87cd557..4020491 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/test/dunit/internal/JUnit4DistributedTestCase.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/test/dunit/internal/JUnit4DistributedTestCase.java
@@ -494,7 +494,7 @@ public abstract class JUnit4DistributedTestCase implements DistributedTestFixtur
     if (!getDistributedSystemProperties().isEmpty()) {
       disconnectAllFromDS();
     }
-    Invoke.invokeInEveryVM("SocketCreateFactory.reset", () -> SocketCreatorFactory.close());
+
   }
 
   /**
@@ -578,6 +578,7 @@ public abstract class JUnit4DistributedTestCase implements DistributedTestFixtur
     }
 
     IgnoredException.removeAllExpectedExceptions();
+    SocketCreatorFactory.close();
   }
 
   private static final void closeCache() { // TODO: this should move to CacheTestCase


[32/50] [abbrv] incubator-geode git commit: GEODE-420: Updating imports for JGroupsMessenger.java

Posted by ud...@apache.org.
GEODE-420: Updating imports for JGroupsMessenger.java


Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/284fe744
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/284fe744
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/284fe744

Branch: refs/heads/develop
Commit: 284fe744f54ff3f14cd4a5566927792fa14672ff
Parents: a3a5a04
Author: Udo Kohlmeyer <uk...@pivotal.io>
Authored: Tue Aug 30 13:03:11 2016 +1000
Committer: Udo Kohlmeyer <uk...@pivotal.io>
Committed: Tue Aug 30 13:03:11 2016 +1000

----------------------------------------------------------------------
 .../internal/membership/gms/messenger/JGroupsMessenger.java       | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/284fe744/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/messenger/JGroupsMessenger.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/messenger/JGroupsMessenger.java b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/messenger/JGroupsMessenger.java
index 310c1ad..f999c94 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/messenger/JGroupsMessenger.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/messenger/JGroupsMessenger.java
@@ -88,7 +88,7 @@ import com.gemstone.gemfire.internal.ClassPathLoader;
 import com.gemstone.gemfire.internal.HeapDataOutputStream;
 import com.gemstone.gemfire.internal.InternalDataSerializer;
 import com.gemstone.gemfire.internal.OSProcess;
-import com.gemstone.gemfire.internal.SocketCreator;
+import com.gemstone.gemfire.internal.net.SocketCreator;
 import com.gemstone.gemfire.internal.Version;
 import com.gemstone.gemfire.internal.VersionedDataInputStream;
 import com.gemstone.gemfire.internal.admin.remote.RemoteTransportConfig;
@@ -97,7 +97,6 @@ import com.gemstone.gemfire.internal.cache.DistributedCacheOperation;
 import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
 import com.gemstone.gemfire.internal.logging.log4j.AlertAppender;
 import com.gemstone.gemfire.internal.logging.log4j.LocalizedMessage;
-import com.gemstone.gemfire.internal.net.SocketCreator;
 import com.gemstone.gemfire.internal.tcp.MemberShunnedException;
 
 import it.unimi.dsi.fastutil.ints.Int2ObjectOpenHashMap;


[38/50] [abbrv] incubator-geode git commit: GEODE-1792: ssl-ciphers and ssl-protocols are comma delimited. Changed JMX_MANAGER_SSL_ALIAS -> JMX_SSL_ALIAS

Posted by ud...@apache.org.
GEODE-1792: ssl-ciphers and ssl-protocols are comma delimited.
Changed JMX_MANAGER_SSL_ALIAS -> JMX_SSL_ALIAS


Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/156d2d15
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/156d2d15
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/156d2d15

Branch: refs/heads/develop
Commit: 156d2d151c714ece94604f1ac0f0563af096fd8c
Parents: c6f5997
Author: Udo Kohlmeyer <uk...@pivotal.io>
Authored: Tue Sep 6 15:50:18 2016 +1000
Committer: Udo Kohlmeyer <uk...@pivotal.io>
Committed: Tue Sep 6 15:50:18 2016 +1000

----------------------------------------------------------------------
 .../distributed/ConfigurationProperties.java    |   6 +-
 .../internal/AbstractDistributionConfig.java    |   2 +-
 .../internal/DistributionConfig.java            |  16 +-
 .../internal/DistributionConfigImpl.java        |  18 ++-
 .../internal/net/SSLConfigurationFactory.java   |   2 +-
 .../gemfire/internal/net/SocketCreator.java     |   3 +-
 .../gemfire/management/GemFireProperties.java   | 161 ++++++++++++++++++-
 .../internal/beans/BeanUtilFuncs.java           |  17 ++
 .../gemfire/distributed/LocatorDUnitTest.java   |   5 +-
 .../net/SSLConfigurationFactoryTest.java        |   2 +-
 .../net/SocketCreatorFactoryJUnitTest.java      |   4 +-
 .../gemfire/management/JMXMBeanDUnitTest.java   |   6 +-
 12 files changed, 206 insertions(+), 36 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/156d2d15/geode-core/src/main/java/com/gemstone/gemfire/distributed/ConfigurationProperties.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/distributed/ConfigurationProperties.java b/geode-core/src/main/java/com/gemstone/gemfire/distributed/ConfigurationProperties.java
index df85aca..6db4142 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/distributed/ConfigurationProperties.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/distributed/ConfigurationProperties.java
@@ -849,7 +849,7 @@ public interface ConfigurationProperties {
    * <U>Default</U>: "" </p>
    * <U>Since</U>: Geode 1.0
    */
-  String SSL_JMX_MANAGER_ALIAS = "ssl-jmx-alias";
+  String SSL_JMX_ALIAS = "ssl-jmx-alias";
   /**
    * The static String definition of the <i>"jmx-manager-ssl-ciphers"</i> property
    * <a name="jmx-manager-ssl-ciphers"/a></p>
@@ -871,7 +871,7 @@ public interface ConfigurationProperties {
    * Ignored if jmx-manager is false.
    * </p>
    * <U>Default</U>: "false"
-   * @deprecated Since Geode 1.0 use {@link #SSL_ENABLED_COMPONENTS} with optional {@link #SSL_JMX_MANAGER_ALIAS}
+   * @deprecated Since Geode 1.0 use {@link #SSL_ENABLED_COMPONENTS} with optional {@link #SSL_JMX_ALIAS}
    */
   @Deprecated
   String JMX_MANAGER_SSL_ENABLED = "jmx-manager-ssl-enabled";
@@ -1813,7 +1813,7 @@ public interface ConfigurationProperties {
    *
    * <U>Description</U>This property will be set when using multi-key keystores. This will define the alias that
    * the ssl connection factory would use when no alias has been set for the different component aliases.
-   * {@link #SSL_CLUSTER_ALIAS}, {@link #SSL_SERVER_ALIAS},{@link #SSL_LOCATOR_ALIAS},{@link #SSL_GATEWAY_ALIAS},{@link #SSL_JMX_MANAGER_ALIAS} , {@link #SSL_HTTP_SERVICE_ALIAS}
+   * {@link #SSL_CLUSTER_ALIAS}, {@link #SSL_SERVER_ALIAS},{@link #SSL_LOCATOR_ALIAS},{@link #SSL_GATEWAY_ALIAS},{@link #SSL_JMX_ALIAS} , {@link #SSL_HTTP_SERVICE_ALIAS}
    * </p>
    * <U>Default</U>: ""</p>
    * <U>Since</U>: Geode 1.0

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/156d2d15/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/AbstractDistributionConfig.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/AbstractDistributionConfig.java b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/AbstractDistributionConfig.java
index f92511e..ce77c5e 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/AbstractDistributionConfig.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/AbstractDistributionConfig.java
@@ -885,7 +885,7 @@ public abstract class AbstractDistributionConfig extends AbstractConfig implemen
     m.put(JMX_MANAGER, "If true then this member is willing to be a jmx manager. Defaults to false except on a locator.");
     m.put(JMX_MANAGER_START, "If true then the jmx manager will be started when the cache is created. Defaults to false.");
     m.put(JMX_MANAGER_SSL_ENABLED, "If true then the jmx manager will only allow SSL clients to connect. Defaults to false. This property is ignored if jmx-manager-port is \"0\".");
-    m.put(SSL_JMX_MANAGER_ALIAS, LocalizedStrings.AbstractDistributionConfig_JMX_MANAGER_SSL_ALIAS_0.toLocalizedString(Boolean.valueOf(DEFAULT_SSL_ALIAS)));
+    m.put(SSL_JMX_ALIAS, LocalizedStrings.AbstractDistributionConfig_JMX_MANAGER_SSL_ALIAS_0.toLocalizedString(Boolean.valueOf(DEFAULT_SSL_ALIAS)));
     m.put(JMX_MANAGER_SSL_CIPHERS, "List of available SSL cipher suites that are to be enabled for JMX Manager. Defaults to \"" + DEFAULT_JMX_MANAGER_SSL_CIPHERS + "\" meaning your provider''s defaults.");
     m.put(JMX_MANAGER_SSL_PROTOCOLS, "List of available SSL protocols that are to be enabled for JMX Manager. Defaults to \"" + DEFAULT_JMX_MANAGER_SSL_PROTOCOLS + "\" meaning defaults of your provider.");
     m.put(JMX_MANAGER_SSL_REQUIRE_AUTHENTICATION, "If set to false, ciphers and protocols that permit anonymous JMX Clients are allowed. Defaults to \"" + DEFAULT_JMX_MANAGER_SSL_REQUIRE_AUTHENTICATION + "\".");

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/156d2d15/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionConfig.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionConfig.java b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionConfig.java
index 4ad95c6..628231b 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionConfig.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionConfig.java
@@ -4316,27 +4316,27 @@ public interface DistributionConfig extends Config, LogConfig {
   String HTTP_SERVICE_SSL_ALIAS_NAME = SSL_HTTP_SERVICE_ALIAS;
 
   /**
-   * Returns the value of the {@link ConfigurationProperties#SSL_JMX_MANAGER_ALIAS}
+   * Returns the value of the {@link ConfigurationProperties#SSL_JMX_ALIAS}
    * property.
    * @since Geode 1.0
    */
-  @ConfigAttributeGetter(name = SSL_JMX_MANAGER_ALIAS)
-  String getJMXManagerSSLAlias();
+  @ConfigAttributeGetter(name = SSL_JMX_ALIAS)
+  String getJMXSSLAlias();
 
   /**
-   * Sets the value of the {@link ConfigurationProperties#SSL_JMX_MANAGER_ALIAS}
+   * Sets the value of the {@link ConfigurationProperties#SSL_JMX_ALIAS}
    * property.
    * @since Geode 1.0
    */
-  @ConfigAttributeSetter(name = SSL_JMX_MANAGER_ALIAS)
-  void setJMXManagerSSLAlias(String alias);
+  @ConfigAttributeSetter(name = SSL_JMX_ALIAS)
+  void setJMXSSLAlias(String alias);
 
   /**
-   * The name of the {@link ConfigurationProperties#SSL_JMX_MANAGER_ALIAS} property
+   * The name of the {@link ConfigurationProperties#SSL_JMX_ALIAS} property
    * @since Geode 1.0
    */
   @ConfigAttribute(type = String.class)
-  String JMX_MANAGER_SSL_ALIAS_NAME = SSL_JMX_MANAGER_ALIAS;
+  String JMX_SSL_ALIAS_NAME = SSL_JMX_ALIAS;
 
   /**
    * Returns the value of the {@link ConfigurationProperties#SSL_SERVER_ALIAS}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/156d2d15/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionConfigImpl.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionConfigImpl.java b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionConfigImpl.java
index 1ac92d0..bcc0413 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionConfigImpl.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionConfigImpl.java
@@ -26,13 +26,11 @@ import java.lang.reflect.Method;
 import java.net.InetAddress;
 import java.net.URL;
 import java.net.UnknownHostException;
-import java.util.Arrays;
 import java.util.Collections;
 import java.util.HashMap;
 import java.util.HashSet;
 import java.util.Iterator;
 import java.util.Map;
-import java.util.Objects;
 import java.util.Properties;
 import java.util.Set;
 
@@ -770,7 +768,7 @@ public class DistributionConfigImpl extends AbstractDistributionConfig implement
     this.clusterSSLAlias = other.getClusterSSLAlias();
     this.gatewaySSLAlias = other.getGatewaySSLAlias();
     this.httpServiceSSLAlias = other.getHTTPServiceSSLAlias();
-    this.jmxManagerSSLAlias = other.getJMXManagerSSLAlias();
+    this.jmxManagerSSLAlias = other.getJMXSSLAlias();
     this.serverSSLAlias = other.getServerSSLAlias();
     this.locatorSSLAlias = other.getLocatorSSLAlias();
 
@@ -993,7 +991,7 @@ public class DistributionConfigImpl extends AbstractDistributionConfig implement
         return StringUtils.isEmpty(getHTTPServiceSSLAlias()) ? true : (getSSLEnabledComponents().length > 1 ? !StringUtils.isEmpty(getSSLDefaultAlias()) : true);
       }
       case JMX: {
-        return StringUtils.isEmpty(getJMXManagerSSLAlias()) ? true : (getSSLEnabledComponents().length > 1 ? !StringUtils.isEmpty(getSSLDefaultAlias()) : true);
+        return StringUtils.isEmpty(getJMXSSLAlias()) ? true : (getSSLEnabledComponents().length > 1 ? !StringUtils.isEmpty(getSSLDefaultAlias()) : true);
       }
       case LOCATOR: {
         return StringUtils.isEmpty(getLocatorSSLAlias()) ? true : (getSSLEnabledComponents().length > 1 ? !StringUtils.isEmpty(getSSLDefaultAlias()) : true);
@@ -1470,6 +1468,10 @@ public class DistributionConfigImpl extends AbstractDistributionConfig implement
         continue;
       }
       Object propVal = me.getValue();
+      if(propName.equals(SSL_CIPHERS) || propName.equals(SSL_PROTOCOLS))
+      {
+        propVal = convertCommaDelimitedToSpaceDelimitedString((String)propVal);
+      }
       if (propVal != null && (propVal instanceof String)) { // weed out extraneous non-string properties
         this.setAttribute(propName, ((String) propVal).trim(), this.sourceMap.get(propName));
       }
@@ -1490,6 +1492,10 @@ public class DistributionConfigImpl extends AbstractDistributionConfig implement
     this.modifiable = false;
   }
 
+  private String convertCommaDelimitedToSpaceDelimitedString(final String propVal) {
+      return propVal.replace(","," ");
+  }
+
   public void close() {
     // Clear the extra stuff from System properties
     Properties props = System.getProperties();
@@ -2559,12 +2565,12 @@ public class DistributionConfigImpl extends AbstractDistributionConfig implement
   }
 
   @Override
-  public String getJMXManagerSSLAlias() {
+  public String getJMXSSLAlias() {
     return jmxManagerSSLAlias;
   }
 
   @Override
-  public void setJMXManagerSSLAlias(final String alias) {
+  public void setJMXSSLAlias(final String alias) {
     jmxManagerSSLAlias = alias;
   }
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/156d2d15/geode-core/src/main/java/com/gemstone/gemfire/internal/net/SSLConfigurationFactory.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/net/SSLConfigurationFactory.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/net/SSLConfigurationFactory.java
index df4f49c..1339f5a 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/net/SSLConfigurationFactory.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/net/SSLConfigurationFactory.java
@@ -128,7 +128,7 @@ public class SSLConfigurationFactory {
       }
       case JMX: {
         if (sslEnabledComponents.length > 0) {
-          sslConfig = setAliasForComponent(sslConfig, getDistributionConfig().getJMXManagerSSLAlias());
+          sslConfig = setAliasForComponent(sslConfig, getDistributionConfig().getJMXSSLAlias());
         } else {
           sslConfig = configureLegacyJMXSSL(sslConfig);
         }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/156d2d15/geode-core/src/main/java/com/gemstone/gemfire/internal/net/SocketCreator.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/net/SocketCreator.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/net/SocketCreator.java
index 0a2bfa3..6ddd0a2 100755
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/net/SocketCreator.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/net/SocketCreator.java
@@ -1019,11 +1019,12 @@ public class SocketCreator {
     }
     serverSocket.setEnableSessionCreation(true);
 
-    // restrict cyphers
+    // restrict protocols
     String[] protocols = this.sslConfig.getProtocolsAsStringArray();
     if (!"any".equalsIgnoreCase(protocols[0])) {
       serverSocket.setEnabledProtocols(protocols);
     }
+    // restrict ciphers
     String[] ciphers = this.sslConfig.getCiphersAsStringArray();
     if (!"any".equalsIgnoreCase(ciphers[0])) {
       serverSocket.setEnabledCipherSuites(ciphers);

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/156d2d15/geode-core/src/main/java/com/gemstone/gemfire/management/GemFireProperties.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/management/GemFireProperties.java b/geode-core/src/main/java/com/gemstone/gemfire/management/GemFireProperties.java
index 410d658..61f4072 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/management/GemFireProperties.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/management/GemFireProperties.java
@@ -17,6 +17,7 @@
 package com.gemstone.gemfire.management;
 
 
+import com.gemstone.gemfire.internal.security.SecurableComponent;
 
 /**
  * Composite Data type to be used by member to depict gemfire properties in key value manner
@@ -478,7 +479,7 @@ public class GemFireProperties {
    */
   @Deprecated
   private String jmxManagerSSLTrustStorePassword;
-  private String jmxManagerSSLAlias;
+  private String jmxSSLAlias;
   
   private boolean clusterSSLEnabled;
   private String clusterSSLProtocols;
@@ -636,6 +637,20 @@ public class GemFireProperties {
    * Specifies whether the default transaction mode should be distributed.
    */
   private boolean distributedTransactions;
+
+  private String locatorSSLAlias;
+
+  private SecurableComponent[] sslEnabledComponents;
+  private String sslProtocols;
+  private String sslCiphers;
+  private boolean sslRequireAuthentication;
+  private String sslKeyStore;
+  private String sslKeyStoreType;
+  private String sslKeyStorePassword;
+  private String sslTrustStore;
+  private String sslTrustStorePassword;
+  private boolean sslHttpServiceRequireAuthentication;
+  private String sslDefaultAlias;
   
   
   /**
@@ -1018,22 +1033,22 @@ public class GemFireProperties {
     
   }
 
-//  public void setSslEnabled(boolean sslEnabled) {
+//  public void setSSLEnabled(boolean sslEnabled) {
 //    this.sslEnabled = sslEnabled;
 //
 //  }
 //
-//  public void setSslCiphers(String sslCiphers) {
+//  public void setSSLCiphers(String sslCiphers) {
 //    this.sslCiphers = sslCiphers;
 //
 //  }
 //
-//  public void setSslProtocols(String sslProtocols) {
+//  public void setSSLProtocols(String sslProtocols) {
 //    this.sslProtocols = sslProtocols;
 //
 //  }
 //
-//  public void setSslRequireAuthentication(boolean sslRequireAuthentication) {
+//  public void setSSLRequireAuthentication(boolean sslRequireAuthentication) {
 //    this.sslRequireAuthentication = sslRequireAuthentication;
 //
 //  }
@@ -1721,4 +1736,140 @@ public class GemFireProperties {
   public boolean getDistributedTransactions() {
     return this.distributedTransactions;
   }
+
+  public String getJmxSSLAlias() {
+    return jmxSSLAlias;
+  }
+
+  public void setJmxSSLAlias(final String jmxSSLAlias) {
+    this.jmxSSLAlias = jmxSSLAlias;
+  }
+
+  public String getClusterSSLAlias() {
+    return clusterSSLAlias;
+  }
+
+  public void setClusterSSLAlias(final String clusterSSLAlias) {
+    this.clusterSSLAlias = clusterSSLAlias;
+  }
+
+  public String getServerSSLAlias() {
+    return serverSSLAlias;
+  }
+
+  public void setServerSSLAlias(final String serverSSLAlias) {
+    this.serverSSLAlias = serverSSLAlias;
+  }
+
+  public String getGatewaySSLAlias() {
+    return gatewaySSLAlias;
+  }
+
+  public void setGatewaySSLAlias(final String gatewaySSLAlias) {
+    this.gatewaySSLAlias = gatewaySSLAlias;
+  }
+
+  public String getHttpServiceSSLAlias() {
+    return httpServiceSSLAlias;
+  }
+
+  public void setHttpServiceSSLAlias(final String httpServiceSSLAlias) {
+    this.httpServiceSSLAlias = httpServiceSSLAlias;
+  }
+
+  public String getLocatorSSLAlias() {
+    return locatorSSLAlias;
+  }
+
+  public void setLocatorSSLAlias(final String locatorSSLAlias) {
+    this.locatorSSLAlias = locatorSSLAlias;
+  }
+
+  public SecurableComponent[] getSSLEnabledComponents() {
+    return sslEnabledComponents;
+  }
+
+  public void setSSLEnabledComponents(final SecurableComponent[] sslEnabledComponents) {
+    this.sslEnabledComponents = sslEnabledComponents;
+  }
+
+  public String getSSLProtocols() {
+    return sslProtocols;
+  }
+
+  public void setSSLProtocols(final String sslProtocols) {
+    this.sslProtocols = sslProtocols;
+  }
+
+  public String getSSLCiphers() {
+    return sslCiphers;
+  }
+
+  public void setSSLCiphers(final String sslCiphers) {
+    this.sslCiphers = sslCiphers;
+  }
+
+  public boolean isSSLRequireAuthentication() {
+    return sslRequireAuthentication;
+  }
+
+  public void setSSLRequireAuthentication(final boolean sslRequireAuthentication) {
+    this.sslRequireAuthentication = sslRequireAuthentication;
+  }
+
+  public String getSSLKeyStore() {
+    return sslKeyStore;
+  }
+
+  public void setSSLKeyStore(final String sslKeyStore) {
+    this.sslKeyStore = sslKeyStore;
+  }
+
+  public String getSSLKeyStoreType() {
+    return sslKeyStoreType;
+  }
+
+  public void setSSLKeyStoreType(final String sslKeyStoreType) {
+    this.sslKeyStoreType = sslKeyStoreType;
+  }
+
+  public String getSSLKeyStorePassword() {
+    return sslKeyStorePassword;
+  }
+
+  public void setSSLKeyStorePassword(final String sslKeyStorePassword) {
+    this.sslKeyStorePassword = sslKeyStorePassword;
+  }
+
+  public String getSSLTrustStore() {
+    return sslTrustStore;
+  }
+
+  public void setSSLTrustStore(final String sslTrustStore) {
+    this.sslTrustStore = sslTrustStore;
+  }
+
+  public String getSSLTrustStorePassword() {
+    return sslTrustStorePassword;
+  }
+
+  public void setSSLTrustStorePassword(final String sslTrustStorePassword) {
+    this.sslTrustStorePassword = sslTrustStorePassword;
+  }
+
+  public boolean isSSLHttpServiceRequireAuthentication() {
+    return sslHttpServiceRequireAuthentication;
+  }
+
+  public void setSSLHttpServiceRequireAuthentication(final boolean sslHttpServiceRequireAuthentication) {
+    this.sslHttpServiceRequireAuthentication = sslHttpServiceRequireAuthentication;
+  }
+
+  public String getSSLDefaultAlias() {
+    return sslDefaultAlias;
+  }
+
+  public void setSSLDefaultAlias(final String sslDefaultAlias) {
+    this.sslDefaultAlias = sslDefaultAlias;
+  }
 }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/156d2d15/geode-core/src/main/java/com/gemstone/gemfire/management/internal/beans/BeanUtilFuncs.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/management/internal/beans/BeanUtilFuncs.java b/geode-core/src/main/java/com/gemstone/gemfire/management/internal/beans/BeanUtilFuncs.java
index 9d62fbf..8e05d74 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/management/internal/beans/BeanUtilFuncs.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/management/internal/beans/BeanUtilFuncs.java
@@ -333,6 +333,23 @@ public class BeanUtilFuncs {
     gemFirePropertyData.setHttpServiceBindAddress(config.getHttpServiceBindAddress());
     gemFirePropertyData.setStartDevRestApi(config.getStartDevRestApi());
 
+    gemFirePropertyData.setSSLCiphers(config.getSSLCiphers());
+    gemFirePropertyData.setSSLEnabledComponents(config.getSSLEnabledComponents());
+    gemFirePropertyData.setSSLHttpServiceRequireAuthentication(config.getSSLHTTPRequireAuthentication());
+    gemFirePropertyData.setSSLKeyStore(config.getSSLKeyStore());
+    gemFirePropertyData.setSSLKeyStoreType(config.getSSLKeyStoreType());
+    gemFirePropertyData.setSSLKeyStorePassword(config.getSSLKeyStorePassword());
+    gemFirePropertyData.setSSLTrustStore(config.getSSLTrustStore());
+    gemFirePropertyData.setSSLTrustStorePassword(config.getSSLTrustStorePassword());
+
+    gemFirePropertyData.setClusterSSLAlias(config.getClusterSSLAlias());
+    gemFirePropertyData.setServerSSLAlias(config.getServerSSLAlias());
+    gemFirePropertyData.setJmxSSLAlias(config.getJMXSSLAlias());
+    gemFirePropertyData.setGatewaySSLAlias(config.getGatewaySSLAlias());
+    gemFirePropertyData.setLocatorSSLAlias(config.getLocatorSSLAlias());
+    gemFirePropertyData.setHttpServiceSSLAlias(config.getHTTPServiceSSLAlias());
+    gemFirePropertyData.setSSLDefaultAlias(config.getSSLDefaultAlias());
+
     return gemFirePropertyData;
 
   }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/156d2d15/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorDUnitTest.java
index fc0e93b..a373e82 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorDUnitTest.java
@@ -55,7 +55,6 @@ import com.gemstone.gemfire.internal.AvailablePortHelper;
 import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
 import com.gemstone.gemfire.internal.logging.InternalLogWriter;
 import com.gemstone.gemfire.internal.logging.LocalLogWriter;
-import com.gemstone.gemfire.internal.net.SocketCreatorFactory;
 import com.gemstone.gemfire.internal.security.SecurableComponent;
 import com.gemstone.gemfire.internal.tcp.Connection;
 import com.gemstone.gemfire.test.dunit.DistributedTestUtils;
@@ -365,8 +364,8 @@ public class LocatorDUnitTest extends JUnit4DistributedTestCase {
     properties.put(MEMBER_TIMEOUT, "2000");
     properties.put(LOG_LEVEL, LogWriterUtils.getDUnitLogLevel());
     properties.put(ENABLE_CLUSTER_CONFIGURATION, "false");
-    properties.put(SSL_CIPHERS, "any");
-    properties.put(SSL_PROTOCOLS, "any");
+    properties.put(SSL_CIPHERS, "TLS_RSA_WITH_AES_256_CBC_SHA256,TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384,TLS_DHE_RSA_WITH_AES_256_CBC_SHA256,TLS_DHE_DSS_WITH_AES_256_CBC_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA,TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA");
+    properties.put(SSL_PROTOCOLS, "TLSv1,TLSv1.1,TLSv1.2");
     properties.put(SSL_KEYSTORE, getSingleKeyKeystore());
     properties.put(SSL_KEYSTORE_PASSWORD, "password");
     properties.put(SSL_KEYSTORE_TYPE, "JKS");

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/156d2d15/geode-core/src/test/java/com/gemstone/gemfire/internal/net/SSLConfigurationFactoryTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/net/SSLConfigurationFactoryTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/net/SSLConfigurationFactoryTest.java
index d890457..3cbe55e 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/net/SSLConfigurationFactoryTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/net/SSLConfigurationFactoryTest.java
@@ -155,7 +155,7 @@ public class SSLConfigurationFactoryTest extends JUnit4DistributedTestCase {
       case HTTP_SERVICE:
         return getAliasForComponent(properties, SSL_HTTP_SERVICE_ALIAS);
       case JMX:
-        return getAliasForComponent(properties, SSL_JMX_MANAGER_ALIAS);
+        return getAliasForComponent(properties, SSL_JMX_ALIAS);
       case LOCATOR:
         return getAliasForComponent(properties, SSL_LOCATOR_ALIAS);
       case SERVER:

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/156d2d15/geode-core/src/test/java/com/gemstone/gemfire/internal/net/SocketCreatorFactoryJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/net/SocketCreatorFactoryJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/net/SocketCreatorFactoryJUnitTest.java
index c55c661..06de622 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/net/SocketCreatorFactoryJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/net/SocketCreatorFactoryJUnitTest.java
@@ -216,8 +216,8 @@ public class SocketCreatorFactoryJUnitTest extends JSSESocketJUnitTest {
 
       properties.setProperty(MCAST_PORT, "0");
       properties.setProperty(SSL_REQUIRE_AUTHENTICATION, "true");
-      properties.setProperty(SSL_CIPHERS, "any");
-      properties.setProperty(SSL_PROTOCOLS, "TLSv1.2");
+      properties.setProperty(SSL_CIPHERS, "MD2withRSA,MD5withRSA,SHA1withRSA,SHA256withRSA,SHA384withRSA,SHA512withRS");
+      properties.setProperty(SSL_PROTOCOLS, "TLSv1,TLSv1.1,TLSv1.2");
       properties.setProperty(SSL_KEYSTORE, jks.getCanonicalPath());
       properties.setProperty(SSL_KEYSTORE_PASSWORD, "password");
       properties.setProperty(SSL_KEYSTORE_TYPE, "JKS");

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/156d2d15/geode-core/src/test/java/com/gemstone/gemfire/management/JMXMBeanDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/JMXMBeanDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/JMXMBeanDUnitTest.java
index f08c172..3c1f944 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/JMXMBeanDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/JMXMBeanDUnitTest.java
@@ -22,9 +22,6 @@ import static org.junit.Assert.*;
 
 import java.io.File;
 import java.io.IOException;
-import java.io.Serializable;
-import java.net.Socket;
-import java.rmi.server.RMIClientSocketFactory;
 import java.util.HashMap;
 import java.util.Map;
 import java.util.Properties;
@@ -43,7 +40,6 @@ import org.junit.experimental.categories.Category;
 
 import com.gemstone.gemfire.distributed.LocatorLauncher;
 import com.gemstone.gemfire.internal.AvailablePortHelper;
-import com.gemstone.gemfire.internal.net.SocketCreator;
 import com.gemstone.gemfire.internal.security.SecurableComponent;
 import com.gemstone.gemfire.test.dunit.DistributedTestCase;
 import com.gemstone.gemfire.test.dunit.DistributedTestUtils;
@@ -246,7 +242,7 @@ public class JMXMBeanDUnitTest extends DistributedTestCase {
         if (useMultiKey) {
           properties.setProperty(SSL_KEYSTORE, getMultiKeyKeystore());
           properties.setProperty(SSL_TRUSTSTORE, getMultiKeyTruststore());
-          properties.setProperty(SSL_JMX_MANAGER_ALIAS, "jmxkey");
+          properties.setProperty(SSL_JMX_ALIAS, "jmxkey");
         }
       }
     }


[22/50] [abbrv] incubator-geode git commit: GEODE-420: Fixing test failures

Posted by ud...@apache.org.
GEODE-420: Fixing test failures


Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/25520289
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/25520289
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/25520289

Branch: refs/heads/develop
Commit: 255202891916ce864d27adabf658487d88638bae
Parents: 2454540
Author: Udo Kohlmeyer <uk...@pivotal.io>
Authored: Thu Aug 25 04:50:05 2016 +1000
Committer: Udo Kohlmeyer <uk...@pivotal.io>
Committed: Thu Aug 25 04:50:05 2016 +1000

----------------------------------------------------------------------
 .../distributed/ConfigurationProperties.java    |   2 +-
 .../internal/net/SSLConfigurationFactory.java   | 141 ++++++++++---------
 .../internal/net/SocketCreatorFactory.java      |  16 ++-
 .../geode/security/SecurableComponents.java     |   2 +-
 .../gemfire/management/JMXMBeanDUnitTest.java   |  11 +-
 .../internal/JettyHelperJUnitTest.java          |  45 ++++--
 6 files changed, 126 insertions(+), 91 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/25520289/geode-core/src/main/java/com/gemstone/gemfire/distributed/ConfigurationProperties.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/distributed/ConfigurationProperties.java b/geode-core/src/main/java/com/gemstone/gemfire/distributed/ConfigurationProperties.java
index 9f41a64..4813d2b 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/distributed/ConfigurationProperties.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/distributed/ConfigurationProperties.java
@@ -1716,7 +1716,7 @@ public interface ConfigurationProperties {
    * <a name="ssl-enabled-components"/a></p>
    * <U>Description</U>: This setting is a comma delimited fields which works in conjunction with the {@link #CLUSTER_SSL_PREFIX} properties.
    * This property will determine which components will use SSL for their communications.</p>
-   * <U>Options</U>: "all","server","cluster","gateway","http","jmx","none"  -- As described {@link SSLEnabledComponents}
+   * <U>Options</U>: "all","server","cluster","gateway","http","jmx","none"  -- As described {@link SecurableComponents}
    * <U>Since</U>: Geode 1.0
    */
   String SSL_ENABLED_COMPONENTS = "ssl-enabled-components";

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/25520289/geode-core/src/main/java/com/gemstone/gemfire/internal/net/SSLConfigurationFactory.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/net/SSLConfigurationFactory.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/net/SSLConfigurationFactory.java
index 12528e3..df4f49c 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/net/SSLConfigurationFactory.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/net/SSLConfigurationFactory.java
@@ -26,14 +26,13 @@ import org.springframework.util.StringUtils;
 
 import com.gemstone.gemfire.GemFireConfigException;
 import com.gemstone.gemfire.distributed.internal.DistributionConfig;
-import com.gemstone.gemfire.distributed.internal.DistributionConfigImpl;
 import com.gemstone.gemfire.internal.admin.SSLConfig;
 import com.gemstone.gemfire.internal.security.SecurableComponent;
 
 public class SSLConfigurationFactory {
 
   private static SSLConfigurationFactory instance = new SSLConfigurationFactory();
-  private DistributionConfig distributionConfig = new DistributionConfigImpl(new Properties());
+  private DistributionConfig distributionConfig = null;
   private Map<SecurableComponent, SSLConfig> registeredSSLConfig = new HashMap<>();
 
   private SSLConfigurationFactory() {
@@ -46,6 +45,14 @@ public class SSLConfigurationFactory {
     return instance;
   }
 
+  private DistributionConfig getDistributionConfig() {
+    if(distributionConfig == null)
+    {
+      throw new GemFireConfigException("SSL Configuration requires a valid distribution config.");
+    }
+    return distributionConfig;
+  }
+
   public static void setDistributionConfig(final DistributionConfig distributionConfig) {
     if(distributionConfig == null)
     {
@@ -69,7 +76,7 @@ public class SSLConfigurationFactory {
 
   private SSLConfig createSSLConfigForComponent(final SecurableComponent sslEnabledComponent) {
     SSLConfig sslConfig = createSSLConfig(sslEnabledComponent);
-    SecurableComponent[] sslEnabledComponents = distributionConfig.getSSLEnabledComponents();
+    SecurableComponent[] sslEnabledComponents = getDistributionConfig().getSSLEnabledComponents();
     if (sslEnabledComponents.length == 0) {
       sslConfig = configureLegacyClusterSSL(sslConfig);
     }
@@ -82,7 +89,7 @@ public class SSLConfigurationFactory {
       }
       case CLUSTER: {
         if (sslEnabledComponents.length > 0) {
-          sslConfig = setAliasForComponent(sslConfig, distributionConfig.getClusterSSLAlias());
+          sslConfig = setAliasForComponent(sslConfig, getDistributionConfig().getClusterSSLAlias());
         }else {
           sslConfig = configureLegacyClusterSSL(sslConfig);
         }
@@ -90,13 +97,13 @@ public class SSLConfigurationFactory {
       }
       case LOCATOR: {
         if (sslEnabledComponents.length > 0) {
-          sslConfig = setAliasForComponent(sslConfig, distributionConfig.getLocatorSSLAlias());
+          sslConfig = setAliasForComponent(sslConfig, getDistributionConfig().getLocatorSSLAlias());
         }
         break;
       }
       case SERVER: {
         if (sslEnabledComponents.length > 0) {
-          sslConfig = setAliasForComponent(sslConfig, distributionConfig.getServerSSLAlias());
+          sslConfig = setAliasForComponent(sslConfig, getDistributionConfig().getServerSSLAlias());
         } else {
           sslConfig = configureLegacyServerSSL(sslConfig);
         }
@@ -104,7 +111,7 @@ public class SSLConfigurationFactory {
       }
       case GATEWAY: {
         if (sslEnabledComponents.length > 0) {
-          sslConfig = setAliasForComponent(sslConfig, distributionConfig.getGatewaySSLAlias());
+          sslConfig = setAliasForComponent(sslConfig, getDistributionConfig().getGatewaySSLAlias());
         } else {
           sslConfig = configureLegacyGatewaySSL(sslConfig);
         }
@@ -112,8 +119,8 @@ public class SSLConfigurationFactory {
       }
       case HTTP_SERVICE: {
         if (sslEnabledComponents.length > 0) {
-          sslConfig = setAliasForComponent(sslConfig, distributionConfig.getHTTPServiceSSLAlias());
-          sslConfig.setRequireAuth(distributionConfig.getSSLHTTPRequireAuthentication());
+          sslConfig = setAliasForComponent(sslConfig, getDistributionConfig().getHTTPServiceSSLAlias());
+          sslConfig.setRequireAuth(getDistributionConfig().getSSLHTTPRequireAuthentication());
         } else {
           sslConfig = configureLegacyHttpServiceSSL(sslConfig);
         }
@@ -121,7 +128,7 @@ public class SSLConfigurationFactory {
       }
       case JMX: {
         if (sslEnabledComponents.length > 0) {
-          sslConfig = setAliasForComponent(sslConfig, distributionConfig.getJMXManagerSSLAlias());
+          sslConfig = setAliasForComponent(sslConfig, getDistributionConfig().getJMXManagerSSLAlias());
         } else {
           sslConfig = configureLegacyJMXSSL(sslConfig);
         }
@@ -141,27 +148,27 @@ public class SSLConfigurationFactory {
 
   private SSLConfig createSSLConfig(final SecurableComponent sslEnabledComponent) {
     SSLConfig sslConfig = new SSLConfig();
-    sslConfig.setCiphers(distributionConfig.getSSLCiphers());
+    sslConfig.setCiphers(getDistributionConfig().getSSLCiphers());
     sslConfig.setEnabled(determineIfSSLEnabledForSSLComponent(sslEnabledComponent));
-    sslConfig.setKeystore(distributionConfig.getSSLKeyStore());
-    sslConfig.setKeystorePassword(distributionConfig.getSSLKeyStorePassword());
-    sslConfig.setKeystoreType(distributionConfig.getSSLKeyStoreType());
-    sslConfig.setTruststore(distributionConfig.getSSLTrustStore());
-    sslConfig.setTruststorePassword(distributionConfig.getSSLTrustStorePassword());
-    sslConfig.setProtocols(distributionConfig.getSSLProtocols());
-    sslConfig.setRequireAuth(distributionConfig.getSSLRequireAuthentication());
-    sslConfig.setAlias(distributionConfig.getSSLDefaultAlias());
+    sslConfig.setKeystore(getDistributionConfig().getSSLKeyStore());
+    sslConfig.setKeystorePassword(getDistributionConfig().getSSLKeyStorePassword());
+    sslConfig.setKeystoreType(getDistributionConfig().getSSLKeyStoreType());
+    sslConfig.setTruststore(getDistributionConfig().getSSLTrustStore());
+    sslConfig.setTruststorePassword(getDistributionConfig().getSSLTrustStorePassword());
+    sslConfig.setProtocols(getDistributionConfig().getSSLProtocols());
+    sslConfig.setRequireAuth(getDistributionConfig().getSSLRequireAuthentication());
+    sslConfig.setAlias(getDistributionConfig().getSSLDefaultAlias());
     return sslConfig;
   }
 
   private boolean determineIfSSLEnabledForSSLComponent(final SecurableComponent sslEnabledComponent) {
-    if (ArrayUtils.contains(distributionConfig.getSSLEnabledComponents(), SecurableComponent.NONE)) {
+    if (ArrayUtils.contains(getDistributionConfig().getSSLEnabledComponents(), SecurableComponent.NONE)) {
       return false;
     }
-    if (ArrayUtils.contains(distributionConfig.getSSLEnabledComponents(), SecurableComponent.ALL)) {
+    if (ArrayUtils.contains(getDistributionConfig().getSSLEnabledComponents(), SecurableComponent.ALL)) {
       return true;
     }
-    return ArrayUtils.contains(distributionConfig.getSSLEnabledComponents(), sslEnabledComponent) ? true : false;
+    return ArrayUtils.contains(getDistributionConfig().getSSLEnabledComponents(), sslEnabledComponent) ? true : false;
   }
 
   /**
@@ -171,15 +178,15 @@ public class SSLConfigurationFactory {
    * @deprecated as of Geode 1.0
    */
   private SSLConfig configureLegacyClusterSSL(SSLConfig sslConfig) {
-    sslConfig.setCiphers(distributionConfig.getClusterSSLCiphers());
-    sslConfig.setEnabled(distributionConfig.getClusterSSLEnabled());
-    sslConfig.setKeystore(distributionConfig.getClusterSSLKeyStore());
-    sslConfig.setKeystorePassword(distributionConfig.getClusterSSLKeyStorePassword());
-    sslConfig.setKeystoreType(distributionConfig.getClusterSSLKeyStoreType());
-    sslConfig.setTruststore(distributionConfig.getClusterSSLTrustStore());
-    sslConfig.setTruststorePassword(distributionConfig.getClusterSSLTrustStorePassword());
-    sslConfig.setProtocols(distributionConfig.getClusterSSLProtocols());
-    sslConfig.setRequireAuth(distributionConfig.getClusterSSLRequireAuthentication());
+    sslConfig.setCiphers(getDistributionConfig().getClusterSSLCiphers());
+    sslConfig.setEnabled(getDistributionConfig().getClusterSSLEnabled());
+    sslConfig.setKeystore(getDistributionConfig().getClusterSSLKeyStore());
+    sslConfig.setKeystorePassword(getDistributionConfig().getClusterSSLKeyStorePassword());
+    sslConfig.setKeystoreType(getDistributionConfig().getClusterSSLKeyStoreType());
+    sslConfig.setTruststore(getDistributionConfig().getClusterSSLTrustStore());
+    sslConfig.setTruststorePassword(getDistributionConfig().getClusterSSLTrustStorePassword());
+    sslConfig.setProtocols(getDistributionConfig().getClusterSSLProtocols());
+    sslConfig.setRequireAuth(getDistributionConfig().getClusterSSLRequireAuthentication());
     return sslConfig;
   }
 
@@ -190,15 +197,15 @@ public class SSLConfigurationFactory {
    * @deprecated as of Geode 1.0
    */
   private SSLConfig configureLegacyServerSSL(SSLConfig sslConfig) {
-    sslConfig.setCiphers(distributionConfig.getServerSSLCiphers());
-    sslConfig.setEnabled(distributionConfig.getServerSSLEnabled());
-    sslConfig.setKeystore(distributionConfig.getServerSSLKeyStore());
-    sslConfig.setKeystorePassword(distributionConfig.getServerSSLKeyStorePassword());
-    sslConfig.setKeystoreType(distributionConfig.getServerSSLKeyStoreType());
-    sslConfig.setTruststore(distributionConfig.getServerSSLTrustStore());
-    sslConfig.setTruststorePassword(distributionConfig.getServerSSLTrustStorePassword());
-    sslConfig.setProtocols(distributionConfig.getServerSSLProtocols());
-    sslConfig.setRequireAuth(distributionConfig.getServerSSLRequireAuthentication());
+    sslConfig.setCiphers(getDistributionConfig().getServerSSLCiphers());
+    sslConfig.setEnabled(getDistributionConfig().getServerSSLEnabled());
+    sslConfig.setKeystore(getDistributionConfig().getServerSSLKeyStore());
+    sslConfig.setKeystorePassword(getDistributionConfig().getServerSSLKeyStorePassword());
+    sslConfig.setKeystoreType(getDistributionConfig().getServerSSLKeyStoreType());
+    sslConfig.setTruststore(getDistributionConfig().getServerSSLTrustStore());
+    sslConfig.setTruststorePassword(getDistributionConfig().getServerSSLTrustStorePassword());
+    sslConfig.setProtocols(getDistributionConfig().getServerSSLProtocols());
+    sslConfig.setRequireAuth(getDistributionConfig().getServerSSLRequireAuthentication());
     return sslConfig;
   }
 
@@ -209,15 +216,15 @@ public class SSLConfigurationFactory {
    * @deprecated as of Geode 1.0
    */
   private SSLConfig configureLegacyJMXSSL(SSLConfig sslConfig) {
-    sslConfig.setCiphers(distributionConfig.getJmxManagerSSLCiphers());
-    sslConfig.setEnabled(distributionConfig.getJmxManagerSSLEnabled());
-    sslConfig.setKeystore(distributionConfig.getJmxManagerSSLKeyStore());
-    sslConfig.setKeystorePassword(distributionConfig.getJmxManagerSSLKeyStorePassword());
-    sslConfig.setKeystoreType(distributionConfig.getJmxManagerSSLKeyStoreType());
-    sslConfig.setTruststore(distributionConfig.getJmxManagerSSLTrustStore());
-    sslConfig.setTruststorePassword(distributionConfig.getJmxManagerSSLTrustStorePassword());
-    sslConfig.setProtocols(distributionConfig.getJmxManagerSSLProtocols());
-    sslConfig.setRequireAuth(distributionConfig.getJmxManagerSSLRequireAuthentication());
+    sslConfig.setCiphers(getDistributionConfig().getJmxManagerSSLCiphers());
+    sslConfig.setEnabled(getDistributionConfig().getJmxManagerSSLEnabled());
+    sslConfig.setKeystore(getDistributionConfig().getJmxManagerSSLKeyStore());
+    sslConfig.setKeystorePassword(getDistributionConfig().getJmxManagerSSLKeyStorePassword());
+    sslConfig.setKeystoreType(getDistributionConfig().getJmxManagerSSLKeyStoreType());
+    sslConfig.setTruststore(getDistributionConfig().getJmxManagerSSLTrustStore());
+    sslConfig.setTruststorePassword(getDistributionConfig().getJmxManagerSSLTrustStorePassword());
+    sslConfig.setProtocols(getDistributionConfig().getJmxManagerSSLProtocols());
+    sslConfig.setRequireAuth(getDistributionConfig().getJmxManagerSSLRequireAuthentication());
     return sslConfig;
   }
 
@@ -228,15 +235,15 @@ public class SSLConfigurationFactory {
    * @deprecated as of Geode 1.0
    */
   private SSLConfig configureLegacyGatewaySSL(SSLConfig sslConfig) {
-    sslConfig.setCiphers(distributionConfig.getGatewaySSLCiphers());
-    sslConfig.setEnabled(distributionConfig.getGatewaySSLEnabled());
-    sslConfig.setKeystore(distributionConfig.getGatewaySSLKeyStore());
-    sslConfig.setKeystorePassword(distributionConfig.getGatewaySSLKeyStorePassword());
-    sslConfig.setKeystoreType(distributionConfig.getGatewaySSLKeyStoreType());
-    sslConfig.setTruststore(distributionConfig.getGatewaySSLTrustStore());
-    sslConfig.setTruststorePassword(distributionConfig.getGatewaySSLTrustStorePassword());
-    sslConfig.setProtocols(distributionConfig.getGatewaySSLProtocols());
-    sslConfig.setRequireAuth(distributionConfig.getGatewaySSLRequireAuthentication());
+    sslConfig.setCiphers(getDistributionConfig().getGatewaySSLCiphers());
+    sslConfig.setEnabled(getDistributionConfig().getGatewaySSLEnabled());
+    sslConfig.setKeystore(getDistributionConfig().getGatewaySSLKeyStore());
+    sslConfig.setKeystorePassword(getDistributionConfig().getGatewaySSLKeyStorePassword());
+    sslConfig.setKeystoreType(getDistributionConfig().getGatewaySSLKeyStoreType());
+    sslConfig.setTruststore(getDistributionConfig().getGatewaySSLTrustStore());
+    sslConfig.setTruststorePassword(getDistributionConfig().getGatewaySSLTrustStorePassword());
+    sslConfig.setProtocols(getDistributionConfig().getGatewaySSLProtocols());
+    sslConfig.setRequireAuth(getDistributionConfig().getGatewaySSLRequireAuthentication());
     return sslConfig;
   }
 
@@ -247,15 +254,15 @@ public class SSLConfigurationFactory {
    * @deprecated as of Geode 1.0
    */
   private SSLConfig configureLegacyHttpServiceSSL(SSLConfig sslConfig) {
-    sslConfig.setCiphers(distributionConfig.getHttpServiceSSLCiphers());
-    sslConfig.setEnabled(distributionConfig.getHttpServiceSSLEnabled());
-    sslConfig.setKeystore(distributionConfig.getHttpServiceSSLKeyStore());
-    sslConfig.setKeystorePassword(distributionConfig.getHttpServiceSSLKeyStorePassword());
-    sslConfig.setKeystoreType(distributionConfig.getHttpServiceSSLKeyStoreType());
-    sslConfig.setTruststore(distributionConfig.getHttpServiceSSLTrustStore());
-    sslConfig.setTruststorePassword(distributionConfig.getHttpServiceSSLTrustStorePassword());
-    sslConfig.setProtocols(distributionConfig.getHttpServiceSSLProtocols());
-    sslConfig.setRequireAuth(distributionConfig.getHttpServiceSSLRequireAuthentication());
+    sslConfig.setCiphers(getDistributionConfig().getHttpServiceSSLCiphers());
+    sslConfig.setEnabled(getDistributionConfig().getHttpServiceSSLEnabled());
+    sslConfig.setKeystore(getDistributionConfig().getHttpServiceSSLKeyStore());
+    sslConfig.setKeystorePassword(getDistributionConfig().getHttpServiceSSLKeyStorePassword());
+    sslConfig.setKeystoreType(getDistributionConfig().getHttpServiceSSLKeyStoreType());
+    sslConfig.setTruststore(getDistributionConfig().getHttpServiceSSLTrustStore());
+    sslConfig.setTruststorePassword(getDistributionConfig().getHttpServiceSSLTrustStorePassword());
+    sslConfig.setProtocols(getDistributionConfig().getHttpServiceSSLProtocols());
+    sslConfig.setRequireAuth(getDistributionConfig().getHttpServiceSSLRequireAuthentication());
     return sslConfig;
   }
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/25520289/geode-core/src/main/java/com/gemstone/gemfire/internal/net/SocketCreatorFactory.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/net/SocketCreatorFactory.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/net/SocketCreatorFactory.java
index 20b649c..4686fe2 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/net/SocketCreatorFactory.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/net/SocketCreatorFactory.java
@@ -26,7 +26,6 @@ import org.apache.commons.lang.ArrayUtils;
 
 import com.gemstone.gemfire.GemFireConfigException;
 import com.gemstone.gemfire.distributed.internal.DistributionConfig;
-import com.gemstone.gemfire.distributed.internal.DistributionConfigImpl;
 import com.gemstone.gemfire.internal.admin.SSLConfig;
 import com.gemstone.gemfire.internal.security.SecurableComponent;
 
@@ -48,6 +47,13 @@ public class SocketCreatorFactory {
     SSLConfigurationFactory.setDistributionConfig(this.distributionConfig);
   }
 
+  private DistributionConfig getDistributionConfig() {
+    if (distributionConfig == null) {
+      throw new GemFireConfigException("SocketCreatorFactory requires a valid distribution config.");
+    }
+    return distributionConfig;
+  }
+
   private synchronized static SocketCreatorFactory getInstance(boolean closing) {
     if (instance == null && !closing) {
       instance = new SocketCreatorFactory();
@@ -64,11 +70,11 @@ public class SocketCreatorFactory {
     return getInstance().getOrCreateSocketCreatorForSSLEnabledComponent(sslEnabledComponent, sslConfigForComponent);
   }
 
-  private SocketCreator getSSLSocketCreator(final SecurableComponent sslComponent, final DistributionConfig distributionConfig, final SSLConfig sslConfig) {
+  private SocketCreator getSSLSocketCreator(final SecurableComponent sslComponent, final SSLConfig sslConfig) {
     if (sslConfig.isEnabled()) {
-      if (ArrayUtils.contains(distributionConfig.getSSLEnabledComponents(), SecurableComponent.ALL)) {
+      if (ArrayUtils.contains(getDistributionConfig().getSSLEnabledComponents(), SecurableComponent.ALL)) {
         return createSSLSocketCreator(SecurableComponent.ALL, sslConfig);
-      } else if (ArrayUtils.contains(distributionConfig.getSSLEnabledComponents(), sslComponent)) {
+      } else if (ArrayUtils.contains(getDistributionConfig().getSSLEnabledComponents(), sslComponent)) {
         return createSSLSocketCreator(sslComponent, sslConfig);
       }
     }
@@ -79,7 +85,7 @@ public class SocketCreatorFactory {
   private SocketCreator getOrCreateSocketCreatorForSSLEnabledComponent(final SecurableComponent sslEnabledComponent, final SSLConfig sslConfig) {
     SocketCreator socketCreator = getSocketCreatorForComponent(sslEnabledComponent);
     if (socketCreator == null) {
-      return getSSLSocketCreator(sslEnabledComponent, distributionConfig, sslConfig);
+      return getSSLSocketCreator(sslEnabledComponent, sslConfig);
     } else {
       return socketCreator;
     }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/25520289/geode-core/src/main/java/org/apache/geode/security/SecurableComponents.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/security/SecurableComponents.java b/geode-core/src/main/java/org/apache/geode/security/SecurableComponents.java
index 2c739b9..20da649 100644
--- a/geode-core/src/main/java/org/apache/geode/security/SecurableComponents.java
+++ b/geode-core/src/main/java/org/apache/geode/security/SecurableComponents.java
@@ -45,7 +45,7 @@ public interface SecurableComponents {
    */
   String JMX = "jmx";
   /**
-   * This determines that the http service communcation will be secured.
+   * This determines that the http service communication will be secured.
    * <U>Since</U>: Geode 1.0
    */
   String HTTP_SERVICE = "http";

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/25520289/geode-core/src/test/java/com/gemstone/gemfire/management/JMXMBeanDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/JMXMBeanDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/JMXMBeanDUnitTest.java
index 86a735e..f92136e 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/JMXMBeanDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/JMXMBeanDUnitTest.java
@@ -39,9 +39,9 @@ import javax.rmi.ssl.SslRMIClientSocketFactory;
 import org.junit.Before;
 import org.junit.Rule;
 import org.junit.Test;
+import org.junit.experimental.categories.Category;
 
 import com.gemstone.gemfire.distributed.LocatorLauncher;
-import com.gemstone.gemfire.distributed.ServerLauncher;
 import com.gemstone.gemfire.internal.AvailablePortHelper;
 import com.gemstone.gemfire.internal.net.SocketCreator;
 import com.gemstone.gemfire.internal.security.SecurableComponent;
@@ -51,6 +51,7 @@ import com.gemstone.gemfire.test.dunit.Host;
 import com.gemstone.gemfire.test.dunit.NetworkUtils;
 import com.gemstone.gemfire.test.dunit.VM;
 import com.gemstone.gemfire.test.dunit.rules.DistributedRestoreSystemProperties;
+import com.gemstone.gemfire.test.junit.categories.FlakyTest;
 import com.gemstone.gemfire.test.junit.rules.serializable.SerializableTemporaryFolder;
 import com.gemstone.gemfire.util.test.TestUtil;
 
@@ -127,12 +128,14 @@ public class JMXMBeanDUnitTest extends DistributedTestCase {
   }
 
   @Test
+  @Category(FlakyTest.class)
+  //  To be fixed in GEODE-1716
   public void testJMXOverLegacySSL() throws Exception {
     Properties properties = configureLocatorProperties(new Properties(), jmxPort, serverHostName, true, true, false);
-//    locator.invoke("Configure and start Locator", () -> {
+    locator.invoke("Configure and start Locator", () -> {
       System.setProperty("javax.ssl.debug", "true");
       configureAndStartLocator(locatorPort, jmxPort, serverHostName, properties);
-//    });
+    });
 
     jmxClient.invoke("Configure and start JMX Client", () -> {
       System.setProperty("javax.ssl.debug", "true");
@@ -141,8 +144,6 @@ public class JMXMBeanDUnitTest extends DistributedTestCase {
   }
 
   @Test
-  //  @Category(FlakyTest.class)
-  //To be fixed in GEODE-1716
   public void testJMXOverNonSSL() throws Exception {
     Properties properties = configureLocatorProperties(new Properties(), jmxPort, serverHostName, false, false, false);
     locator.invoke("Configure and start Locator", () -> configureAndStartLocator(locatorPort, jmxPort, serverHostName, properties));

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/25520289/geode-core/src/test/java/com/gemstone/gemfire/management/internal/JettyHelperJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/JettyHelperJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/JettyHelperJUnitTest.java
index 5aac277..8fca500 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/JettyHelperJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/JettyHelperJUnitTest.java
@@ -18,11 +18,17 @@ package com.gemstone.gemfire.management.internal;
 
 import static org.junit.Assert.*;
 
+import java.util.Properties;
+
 import org.eclipse.jetty.server.Server;
 import org.eclipse.jetty.server.ServerConnector;
+import org.junit.After;
+import org.junit.Before;
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
 
+import com.gemstone.gemfire.GemFireConfigException;
+import com.gemstone.gemfire.distributed.internal.DistributionConfigImpl;
 import com.gemstone.gemfire.internal.net.SSLConfigurationFactory;
 import com.gemstone.gemfire.internal.security.SecurableComponent;
 import com.gemstone.gemfire.test.junit.categories.UnitTest;
@@ -30,7 +36,6 @@ import com.gemstone.gemfire.test.junit.categories.UnitTest;
 /**
  * The JettyHelperJUnitTest class is a test suite of test cases testing the
  * contract and functionality of the JettyHelper class. Does not start Jetty.
- *
  * @see com.gemstone.gemfire.management.internal.JettyHelper
  * @see org.jmock.Mockery
  * @see org.junit.Assert
@@ -39,24 +44,40 @@ import com.gemstone.gemfire.test.junit.categories.UnitTest;
 @Category(UnitTest.class)
 public class JettyHelperJUnitTest {
 
+  @Before
+  public void setup() {
+    SSLConfigurationFactory.setDistributionConfig(new DistributionConfigImpl(new Properties()));
+  }
+
+  @After
+  public void teardown() {
+    SSLConfigurationFactory.close();
+  }
+
   @Test
   public void testSetPortNoBindAddress() throws Exception {
 
-    final Server jetty = JettyHelper.initJetty(null, 8090, SSLConfigurationFactory.getSSLConfigForComponent(SecurableComponent.HTTP_SERVICE));
-
-    assertNotNull(jetty);
-    assertNotNull(jetty.getConnectors()[0]);
-    assertEquals(8090, ((ServerConnector) jetty.getConnectors()[0]).getPort());
+    final Server jetty;
+    try {
+      jetty = JettyHelper.initJetty(null, 8090, SSLConfigurationFactory.getSSLConfigForComponent(SecurableComponent.HTTP_SERVICE));
+      assertNotNull(jetty);
+      assertNotNull(jetty.getConnectors()[0]);
+      assertEquals(8090, ((ServerConnector) jetty.getConnectors()[0]).getPort());
+    } catch (GemFireConfigException e) {
+      fail(e.getMessage());
+    }
   }
 
   @Test
   public void testSetPortWithBindAddress() throws Exception {
+    try {
+      final Server jetty = JettyHelper.initJetty("10.123.50.1", 10480, SSLConfigurationFactory.getSSLConfigForComponent(SecurableComponent.HTTP_SERVICE));
 
-    final Server jetty = JettyHelper.initJetty("10.123.50.1", 10480, SSLConfigurationFactory.getSSLConfigForComponent(SecurableComponent.HTTP_SERVICE));
-
-    assertNotNull(jetty);
-    assertNotNull(jetty.getConnectors()[0]);
-    assertEquals(10480, ((ServerConnector) jetty.getConnectors()[0]).getPort());
+      assertNotNull(jetty);
+      assertNotNull(jetty.getConnectors()[0]);
+      assertEquals(10480, ((ServerConnector) jetty.getConnectors()[0]).getPort());
+    } catch (GemFireConfigException e) {
+      fail(e.getMessage());
+    }
   }
-
 }


[35/50] [abbrv] incubator-geode git commit: GEODE-420: Fixing test LocatorDUnitTest.java due to merge issue

Posted by ud...@apache.org.
GEODE-420: Fixing test LocatorDUnitTest.java due to merge issue


Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/c8c2bdd8
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/c8c2bdd8
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/c8c2bdd8

Branch: refs/heads/develop
Commit: c8c2bdd8a011d46864b6ca47ecd96b9838277196
Parents: de08779
Author: Udo Kohlmeyer <uk...@pivotal.io>
Authored: Wed Aug 31 07:43:42 2016 +1000
Committer: Udo Kohlmeyer <uk...@pivotal.io>
Committed: Wed Aug 31 07:43:42 2016 +1000

----------------------------------------------------------------------
 .../java/com/gemstone/gemfire/distributed/LocatorDUnitTest.java     | 1 +
 1 file changed, 1 insertion(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/c8c2bdd8/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorDUnitTest.java
index 2faa606..fc0e93b 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorDUnitTest.java
@@ -1556,6 +1556,7 @@ public class LocatorDUnitTest extends JUnit4DistributedTestCase {
     dsProps.setProperty(LOCATORS, locators);
     dsProps.setProperty(MCAST_PORT, "0");
     dsProps.setProperty(ENABLE_CLUSTER_CONFIGURATION, "false");
+    addDSProps(dsProps);
 
     vm0.invoke("start Locator1", () -> startLocator(port1, dsProps));
     try {


[42/50] [abbrv] incubator-geode git commit: GEODE-1792: Amended tests to use comma delimited ciphers and protocols

Posted by ud...@apache.org.
GEODE-1792: Amended tests to use comma delimited ciphers and protocols


Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/9626269f
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/9626269f
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/9626269f

Branch: refs/heads/develop
Commit: 9626269f305fbb55d4e7f4a19dd646d407c9c50b
Parents: d79a944
Author: Udo Kohlmeyer <uk...@pivotal.io>
Authored: Wed Sep 7 05:01:34 2016 +1000
Committer: Udo Kohlmeyer <uk...@pivotal.io>
Committed: Wed Sep 7 05:01:34 2016 +1000

----------------------------------------------------------------------
 .../internal/DistributionConfigImpl.java        | 10 ++---
 .../net/SSLConfigurationFactoryTest.java        | 42 +++++++++++++++++++-
 .../net/SocketCreatorFactoryJUnitTest.java      |  5 ++-
 .../ConnectToLocatorSSLDUnitTest.java           |  2 +-
 4 files changed, 48 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/9626269f/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionConfigImpl.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionConfigImpl.java b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionConfigImpl.java
index b272615..7b6b40d 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionConfigImpl.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionConfigImpl.java
@@ -1470,10 +1470,6 @@ public class DistributionConfigImpl extends AbstractDistributionConfig implement
         continue;
       }
       Object propVal = me.getValue();
-      if(propName.equals(SSL_CIPHERS) || propName.equals(SSL_PROTOCOLS))
-      {
-        propVal = convertCommaDelimitedToSpaceDelimitedString((String)propVal);
-      }
       if (propVal != null && (propVal instanceof String)) { // weed out extraneous non-string properties
         this.setAttribute(propName, ((String) propVal).trim(), this.sourceMap.get(propName));
       }
@@ -2603,7 +2599,8 @@ public class DistributionConfigImpl extends AbstractDistributionConfig implement
 
   @Override
   public void setSSLProtocols(final String sslProtocols) {
-    this.sslProtocols = sslProtocols;
+    //This conversion is required due to backwards compatibility of the existing protocols code
+    this.sslProtocols = convertCommaDelimitedToSpaceDelimitedString(sslProtocols);
   }
 
   @Override
@@ -2613,7 +2610,8 @@ public class DistributionConfigImpl extends AbstractDistributionConfig implement
 
   @Override
   public void setSSLCiphers(final String sslCiphers) {
-    this.sslCiphers = sslCiphers;
+    //This conversion is required due to backwards compatibility of the existing cipher code
+    this.sslCiphers = convertCommaDelimitedToSpaceDelimitedString(sslCiphers);
   }
 
   @Override

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/9626269f/geode-core/src/test/java/com/gemstone/gemfire/internal/net/SSLConfigurationFactoryTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/net/SSLConfigurationFactoryTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/net/SSLConfigurationFactoryTest.java
index 3cbe55e..bc142e2 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/net/SSLConfigurationFactoryTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/net/SSLConfigurationFactoryTest.java
@@ -42,6 +42,44 @@ public class SSLConfigurationFactoryTest extends JUnit4DistributedTestCase {
   }
 
   @Test
+  public void getSSLConfigWithCommaDelimitedProtocols() throws Exception {
+    Properties properties = new Properties();
+    properties.setProperty(SSL_ENABLED_COMPONENTS, "all");
+    properties.setProperty(SSL_KEYSTORE, "someKeyStore");
+    properties.setProperty(SSL_KEYSTORE_PASSWORD, "keystorePassword");
+    properties.setProperty(SSL_KEYSTORE_TYPE, "JKS");
+    properties.setProperty(SSL_TRUSTSTORE, "someKeyStore");
+    properties.setProperty(SSL_TRUSTSTORE_PASSWORD, "keystorePassword");
+    properties.setProperty(SSL_DEFAULT_ALIAS, "defaultAlias");
+    properties.setProperty(SSL_CIPHERS, "Cipher1,Cipher2");
+    properties.setProperty(SSL_PROTOCOLS, "Protocol1,Protocol2");
+    DistributionConfigImpl distributionConfig = new DistributionConfigImpl(properties);
+    SSLConfigurationFactory.setDistributionConfig(distributionConfig);
+    for (SecurableComponent securableComponent : SecurableComponent.values()) {
+      assertSSLConfig(properties, SSLConfigurationFactory.getSSLConfigForComponent(securableComponent), securableComponent, distributionConfig);
+    }
+  }
+
+  @Test
+  public void getSSLConfigWithCommaDelimitedCiphers() throws Exception {
+    Properties properties = new Properties();
+    properties.setProperty(SSL_ENABLED_COMPONENTS, "all");
+    properties.setProperty(SSL_KEYSTORE, "someKeyStore");
+    properties.setProperty(SSL_KEYSTORE_PASSWORD, "keystorePassword");
+    properties.setProperty(SSL_KEYSTORE_TYPE, "JKS");
+    properties.setProperty(SSL_TRUSTSTORE, "someKeyStore");
+    properties.setProperty(SSL_TRUSTSTORE_PASSWORD, "keystorePassword");
+    properties.setProperty(SSL_DEFAULT_ALIAS, "defaultAlias");
+    properties.setProperty(SSL_CIPHERS, "Cipher1,Cipher2");
+    properties.setProperty(SSL_PROTOCOLS, "any");
+    DistributionConfigImpl distributionConfig = new DistributionConfigImpl(properties);
+    SSLConfigurationFactory.setDistributionConfig(distributionConfig);
+    for (SecurableComponent securableComponent : SecurableComponent.values()) {
+      assertSSLConfig(properties, SSLConfigurationFactory.getSSLConfigForComponent(securableComponent), securableComponent, distributionConfig);
+    }
+  }
+
+  @Test
   public void getSSLConfigForComponentALL() throws Exception {
     Properties properties = new Properties();
     properties.setProperty(SSL_ENABLED_COMPONENTS, "all");
@@ -130,8 +168,8 @@ public class SSLConfigurationFactoryTest extends JUnit4DistributedTestCase {
     assertEquals(properties.getProperty(SSL_KEYSTORE_TYPE), sslConfig.getKeystoreType());
     assertEquals(properties.getProperty(SSL_TRUSTSTORE), sslConfig.getTruststore());
     assertEquals(properties.getProperty(SSL_TRUSTSTORE_PASSWORD), sslConfig.getTruststorePassword());
-    assertEquals(properties.getProperty(SSL_CIPHERS), sslConfig.getCiphers());
-    assertEquals(properties.getProperty(SSL_PROTOCOLS), sslConfig.getProtocols());
+    assertEquals(properties.getProperty(SSL_CIPHERS).replace(","," "), sslConfig.getCiphers());
+    assertEquals(properties.getProperty(SSL_PROTOCOLS).replace(","," "), sslConfig.getProtocols());
     assertEquals(getCorrectAlias(expectedSecurableComponent, properties), sslConfig.getAlias());
     assertEquals(requiresAuthentication(properties, expectedSecurableComponent), sslConfig.isRequireAuth());
     assertEquals(expectedSecurableComponent, sslConfig.getSecuredComponent());

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/9626269f/geode-core/src/test/java/com/gemstone/gemfire/internal/net/SocketCreatorFactoryJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/net/SocketCreatorFactoryJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/net/SocketCreatorFactoryJUnitTest.java
index 06de622..7c2b729 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/net/SocketCreatorFactoryJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/net/SocketCreatorFactoryJUnitTest.java
@@ -157,7 +157,8 @@ public class SocketCreatorFactoryJUnitTest extends JSSESocketJUnitTest {
 
   @Test
   public void testNewSSLConfigSSLComponentCombinations2() {
-    Properties properties = configureSSLProperties(commaDelimitedString(SecurableComponent.CLUSTER.getConstant(), SecurableComponent.SERVER.getConstant(), SecurableComponent.HTTP_SERVICE.getConstant(), SecurableComponent.JMX.getConstant()));
+    Properties properties = configureSSLProperties(commaDelimitedString(SecurableComponent.CLUSTER.getConstant(), SecurableComponent.SERVER.getConstant(), SecurableComponent.HTTP_SERVICE
+      .getConstant(), SecurableComponent.JMX.getConstant()));
 
     DistributionConfigImpl distributionConfig = new DistributionConfigImpl(properties);
     SocketCreatorFactory.setDistributionConfig(distributionConfig);
@@ -216,7 +217,7 @@ public class SocketCreatorFactoryJUnitTest extends JSSESocketJUnitTest {
 
       properties.setProperty(MCAST_PORT, "0");
       properties.setProperty(SSL_REQUIRE_AUTHENTICATION, "true");
-      properties.setProperty(SSL_CIPHERS, "MD2withRSA,MD5withRSA,SHA1withRSA,SHA256withRSA,SHA384withRSA,SHA512withRS");
+      properties.setProperty(SSL_CIPHERS, "TLS_RSA_WITH_AES_256_CBC_SHA256,TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384,TLS_DHE_RSA_WITH_AES_256_CBC_SHA256,TLS_DHE_DSS_WITH_AES_256_CBC_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA,TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA");
       properties.setProperty(SSL_PROTOCOLS, "TLSv1,TLSv1.1,TLSv1.2");
       properties.setProperty(SSL_KEYSTORE, jks.getCanonicalPath());
       properties.setProperty(SSL_KEYSTORE_PASSWORD, "password");

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/9626269f/geode-core/src/test/java/com/gemstone/gemfire/management/ConnectToLocatorSSLDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/ConnectToLocatorSSLDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/ConnectToLocatorSSLDUnitTest.java
index 75a0e82..048e304 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/ConnectToLocatorSSLDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/ConnectToLocatorSSLDUnitTest.java
@@ -81,7 +81,7 @@ public class ConnectToLocatorSSLDUnitTest extends JUnit4DistributedTestCase {
     securityProps.setProperty(SSL_KEYSTORE_TYPE, "JKS");
     securityProps.setProperty(SSL_TRUSTSTORE, jks.getCanonicalPath());
     securityProps.setProperty(SSL_TRUSTSTORE_PASSWORD, "password");
-    securityProps.setProperty(SSL_PROTOCOLS, "TLSv1.2 TLSv1.1");
+    securityProps.setProperty(SSL_PROTOCOLS, "TLSv1.2,TLSv1.1");
 
     setUpLocatorAndConnect(securityProps);
   }


[08/50] [abbrv] incubator-geode git commit: GEODE-1792: Revert: Changed protocols and ciphers to be comma separated Make ssl-ciphers and ssl-protocols comma separated properties. The legacy *-ssl-ciphers and *-ssl-protocols still use space separated.

Posted by ud...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/6ffa6523/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionConfig.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionConfig.java b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionConfig.java
index e92d0b6..3f60778 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionConfig.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionConfig.java
@@ -850,7 +850,7 @@ public interface DistributionConfig extends Config, LogConfig {
    */
   @Deprecated
   @ConfigAttributeGetter(name = CLUSTER_SSL_PROTOCOLS)
-  String[] getClusterSSLProtocols();
+  String getClusterSSLProtocols();
 
   /**
    * Sets the value of the {@link ConfigurationProperties#CLUSTER_SSL_PROTOCOLS}
@@ -858,7 +858,7 @@ public interface DistributionConfig extends Config, LogConfig {
    */
   @Deprecated
   @ConfigAttributeSetter(name = CLUSTER_SSL_PROTOCOLS)
-  void setClusterSSLProtocols(String[] protocols);
+  void setClusterSSLProtocols(String protocols);
 
   /**
    * The default {@link ConfigurationProperties#CLUSTER_SSL_PROTOCOLS} value.
@@ -870,7 +870,7 @@ public interface DistributionConfig extends Config, LogConfig {
    * The name of the {@link ConfigurationProperties#CLUSTER_SSL_PROTOCOLS} property
    */
   @Deprecated
-  @ConfigAttribute(type = String[].class)
+  @ConfigAttribute(type = String.class)
   String CLUSTER_SSL_PROTOCOLS_NAME = CLUSTER_SSL_PROTOCOLS;
 
   /**
@@ -879,7 +879,7 @@ public interface DistributionConfig extends Config, LogConfig {
    */
   @Deprecated
   @ConfigAttributeGetter(name = CLUSTER_SSL_CIPHERS)
-  String[] getClusterSSLCiphers();
+  String getClusterSSLCiphers();
 
   /**
    * Sets the value of the {@link ConfigurationProperties#CLUSTER_SSL_CIPHERS}
@@ -887,7 +887,7 @@ public interface DistributionConfig extends Config, LogConfig {
    */
   @Deprecated
   @ConfigAttributeSetter(name = CLUSTER_SSL_CIPHERS)
-  void setClusterSSLCiphers(String[] ciphers);
+  void setClusterSSLCiphers(String ciphers);
 
   /**
    * The default {@link ConfigurationProperties#CLUSTER_SSL_CIPHERS} value.
@@ -899,7 +899,7 @@ public interface DistributionConfig extends Config, LogConfig {
    * The name of the {@link ConfigurationProperties#CLUSTER_SSL_CIPHERS} property
    */
   @Deprecated
-  @ConfigAttribute(type = String[].class)
+  @ConfigAttribute(type = String.class)
   String CLUSTER_SSL_CIPHERS_NAME = CLUSTER_SSL_CIPHERS;
 
   /**
@@ -2592,16 +2592,16 @@ public interface DistributionConfig extends Config, LogConfig {
    */
   @Deprecated
   @ConfigAttributeGetter(name = JMX_MANAGER_SSL_PROTOCOLS)
-  String[] getJmxManagerSSLProtocols();
+  String getJmxManagerSSLProtocols();
 
   /**
    * Sets the value of the {@link ConfigurationProperties#JMX_MANAGER_SSL_PROTOCOLS}
    * property.
-   * @deprecated Geode 1.0 use {@link #setClusterSSLProtocols(String[])}
+   * @deprecated Geode 1.0 use {@link #setClusterSSLProtocols(String)}
    */
   @Deprecated
   @ConfigAttributeSetter(name = JMX_MANAGER_SSL_PROTOCOLS)
-  void setJmxManagerSSLProtocols(String[] protocols);
+  void setJmxManagerSSLProtocols(String protocols);
 
   /**
    * The default {@link ConfigurationProperties#JMX_MANAGER_SSL_PROTOCOLS} value.
@@ -2616,7 +2616,7 @@ public interface DistributionConfig extends Config, LogConfig {
    * @deprecated Geode 1.0 use {@link com.gemstone.gemfire.distributed.ConfigurationProperties#CLUSTER_SSL_PROTOCOLS}
    */
   @Deprecated
-  @ConfigAttribute(type = String[].class)
+  @ConfigAttribute(type = String.class)
   String JMX_MANAGER_SSL_PROTOCOLS_NAME = JMX_MANAGER_SSL_PROTOCOLS;
 
   /**
@@ -2626,16 +2626,16 @@ public interface DistributionConfig extends Config, LogConfig {
    */
   @Deprecated
   @ConfigAttributeGetter(name = JMX_MANAGER_SSL_CIPHERS)
-  String[] getJmxManagerSSLCiphers();
+  String getJmxManagerSSLCiphers();
 
   /**
    * Sets the value of the {@link ConfigurationProperties#JMX_MANAGER_SSL_CIPHERS}
    * property.
-   * @deprecated Geode 1.0 use {@link #setClusterSSLCiphers(String[])}
+   * @deprecated Geode 1.0 use {@link #setClusterSSLCiphers(String)}
    */
   @Deprecated
   @ConfigAttributeSetter(name = JMX_MANAGER_SSL_CIPHERS)
-  void setJmxManagerSSLCiphers(String[] ciphers);
+  void setJmxManagerSSLCiphers(String ciphers);
 
   /**
    * The default {@link ConfigurationProperties#JMX_MANAGER_SSL_CIPHERS} value.
@@ -2650,7 +2650,7 @@ public interface DistributionConfig extends Config, LogConfig {
    * @deprecated Geode 1.0 use {@link com.gemstone.gemfire.distributed.ConfigurationProperties#CLUSTER_SSL_CIPHERS}
    */
   @Deprecated
-  @ConfigAttribute(type = String[].class)
+  @ConfigAttribute(type = String.class)
   String JMX_MANAGER_SSL_CIPHERS_NAME = JMX_MANAGER_SSL_CIPHERS;
 
   /**
@@ -3209,16 +3209,16 @@ public interface DistributionConfig extends Config, LogConfig {
    */
   @Deprecated
   @ConfigAttributeGetter(name = HTTP_SERVICE_SSL_PROTOCOLS)
-  String[] getHttpServiceSSLProtocols();
+  String getHttpServiceSSLProtocols();
 
   /**
    * Sets the value of the {@link ConfigurationProperties#HTTP_SERVICE_SSL_PROTOCOLS}
    * property.
-   * @deprecated Geode 1.0 use {@link #setClusterSSLProtocols(String[])}
+   * @deprecated Geode 1.0 use {@link #setClusterSSLProtocols(String)}
    */
   @Deprecated
   @ConfigAttributeSetter(name = HTTP_SERVICE_SSL_PROTOCOLS)
-  void setHttpServiceSSLProtocols(String[] protocols);
+  void setHttpServiceSSLProtocols(String protocols);
 
   /**
    * The default {@link ConfigurationProperties#HTTP_SERVICE_SSL_PROTOCOLS} value.
@@ -3234,7 +3234,7 @@ public interface DistributionConfig extends Config, LogConfig {
    * @deprecated Geode 1.0 use {@link com.gemstone.gemfire.distributed.ConfigurationProperties#CLUSTER_SSL_PROTOCOLS}
    */
   @Deprecated
-  @ConfigAttribute(type = String[].class)
+  @ConfigAttribute(type = String.class)
   String HTTP_SERVICE_SSL_PROTOCOLS_NAME = HTTP_SERVICE_SSL_PROTOCOLS;
 
   /**
@@ -3244,16 +3244,16 @@ public interface DistributionConfig extends Config, LogConfig {
    */
   @Deprecated
   @ConfigAttributeGetter(name = HTTP_SERVICE_SSL_CIPHERS)
-  String[] getHttpServiceSSLCiphers();
+  String getHttpServiceSSLCiphers();
 
   /**
    * Sets the value of the {@link ConfigurationProperties#HTTP_SERVICE_SSL_CIPHERS}
    * property.
-   * @deprecated Geode 1.0 use {@link #setClusterSSLCiphers(String[])}
+   * @deprecated Geode 1.0 use {@link #setClusterSSLCiphers(String)}
    */
   @Deprecated
   @ConfigAttributeSetter(name = HTTP_SERVICE_SSL_CIPHERS)
-  void setHttpServiceSSLCiphers(String[] ciphers);
+  void setHttpServiceSSLCiphers(String ciphers);
 
   /**
    * The default {@link ConfigurationProperties#HTTP_SERVICE_SSL_CIPHERS} value.
@@ -3269,7 +3269,7 @@ public interface DistributionConfig extends Config, LogConfig {
    * @deprecated Geode 1.0 use {@link com.gemstone.gemfire.distributed.ConfigurationProperties#CLUSTER_SSL_CIPHERS}
    */
   @Deprecated
-  @ConfigAttribute(type = String[].class)
+  @ConfigAttribute(type = String.class)
   String HTTP_SERVICE_SSL_CIPHERS_NAME = HTTP_SERVICE_SSL_CIPHERS;
 
   /**
@@ -3565,14 +3565,14 @@ public interface DistributionConfig extends Config, LogConfig {
    */
   @Deprecated
   @ConfigAttributeGetter(name = SERVER_SSL_PROTOCOLS)
-  String[] getServerSSLProtocols();
+  String getServerSSLProtocols();
 
   /**
    * Sets the value of the {@link ConfigurationProperties#SERVER_SSL_PROTOCOLS}
    * property.
    */
   @ConfigAttributeSetter(name = SERVER_SSL_PROTOCOLS)
-  void setServerSSLProtocols(String[] protocols);
+  void setServerSSLProtocols(String protocols);
 
   /**
    * The default {@link ConfigurationProperties#SERVER_SSL_PROTOCOLS} value.
@@ -3587,7 +3587,7 @@ public interface DistributionConfig extends Config, LogConfig {
    * @deprecated Geode 1.0 use {@link com.gemstone.gemfire.distributed.ConfigurationProperties#CLUSTER_SSL_PROTOCOLS}
    */
   @Deprecated
-  @ConfigAttribute(type = String[].class)
+  @ConfigAttribute(type = String.class)
   String SERVER_SSL_PROTOCOLS_NAME = SERVER_SSL_PROTOCOLS;
 
   /**
@@ -3597,16 +3597,16 @@ public interface DistributionConfig extends Config, LogConfig {
    */
   @Deprecated
   @ConfigAttributeGetter(name = SERVER_SSL_CIPHERS)
-  String[] getServerSSLCiphers();
+  String getServerSSLCiphers();
 
   /**
    * Sets the value of the {@link ConfigurationProperties#SERVER_SSL_CIPHERS}
    * property.
-   * @deprecated Geode 1.0 use {@link #setClusterSSLCiphers(String[])}�
+   * @deprecated Geode 1.0 use {@link #setClusterSSLCiphers(String)}�
    */
   @Deprecated
   @ConfigAttributeSetter(name = SERVER_SSL_CIPHERS)
-  void setServerSSLCiphers(String[] ciphers);
+  void setServerSSLCiphers(String ciphers);
 
   /**
    * The default {@link ConfigurationProperties#SERVER_SSL_CIPHERS} value.
@@ -3621,7 +3621,7 @@ public interface DistributionConfig extends Config, LogConfig {
    * @deprecated Geode 1.0 use {@link com.gemstone.gemfire.distributed.ConfigurationProperties#CLUSTER_SSL_CIPHERS}�
    */
   @Deprecated
-  @ConfigAttribute(type = String[].class)
+  @ConfigAttribute(type = String.class)
   String SERVER_SSL_CIPHERS_NAME = SERVER_SSL_CIPHERS;
 
   /**
@@ -3873,7 +3873,7 @@ public interface DistributionConfig extends Config, LogConfig {
    */
   @Deprecated
   @ConfigAttributeGetter(name = GATEWAY_SSL_PROTOCOLS)
-  String[] getGatewaySSLProtocols();
+  String getGatewaySSLProtocols();
 
   /**
    * Sets the value of the {@link ConfigurationProperties#GATEWAY_SSL_PROTOCOLS}
@@ -3882,7 +3882,7 @@ public interface DistributionConfig extends Config, LogConfig {
    */
   @Deprecated
   @ConfigAttributeSetter(name = GATEWAY_SSL_PROTOCOLS)
-  void setGatewaySSLProtocols(String[] protocols);
+  void setGatewaySSLProtocols(String protocols);
 
   /**
    * The default {@link ConfigurationProperties#GATEWAY_SSL_PROTOCOLS} value.
@@ -3896,7 +3896,7 @@ public interface DistributionConfig extends Config, LogConfig {
    * @deprecated Geode 1.0 use {@link com.gemstone.gemfire.distributed.ConfigurationProperties#CLUSTER_SSL_PROTOCOLS}
    */
   @Deprecated
-  @ConfigAttribute(type = String[].class)
+  @ConfigAttribute(type = String.class)
   String GATEWAY_SSL_PROTOCOLS_NAME = GATEWAY_SSL_PROTOCOLS;
 
   /**
@@ -3906,16 +3906,16 @@ public interface DistributionConfig extends Config, LogConfig {
    */
   @Deprecated
   @ConfigAttributeGetter(name = GATEWAY_SSL_CIPHERS)
-  String[] getGatewaySSLCiphers();
+  String getGatewaySSLCiphers();
 
   /**
    * Sets the value of the {@link ConfigurationProperties#GATEWAY_SSL_CIPHERS}
    * property.
-   * @deprecated Geode 1.0 use {@link #setClusterSSLCiphers(String[])}�
+   * @deprecated Geode 1.0 use {@link #setClusterSSLCiphers(String)}�
    */
   @Deprecated
   @ConfigAttributeSetter(name = GATEWAY_SSL_CIPHERS)
-  void setGatewaySSLCiphers(String[] ciphers);
+  void setGatewaySSLCiphers(String ciphers);
 
   /**
    * The default {@link ConfigurationProperties#GATEWAY_SSL_CIPHERS} value.
@@ -3929,7 +3929,7 @@ public interface DistributionConfig extends Config, LogConfig {
    * @deprecated Geode 1.0 use {@link com.gemstone.gemfire.distributed.ConfigurationProperties#CLUSTER_SSL_CIPHERS}�
    */
   @Deprecated
-  @ConfigAttribute(type = String[].class)
+  @ConfigAttribute(type = String.class)
   String GATEWAY_SSL_CIPHERS_NAME = GATEWAY_SSL_CIPHERS;
 
   /**
@@ -4365,19 +4365,19 @@ public interface DistributionConfig extends Config, LogConfig {
    * property.
    */
   @ConfigAttributeGetter(name = SSL_PROTOCOLS)
-  String[] getSSLProtocols();
+  String getSSLProtocols();
 
   /**
    * Sets the value of the {@link ConfigurationProperties#SSL_PROTOCOLS}
    * property.
    */
   @ConfigAttributeSetter(name = SSL_PROTOCOLS)
-  void setSSLProtocols(String[] protocols);
+  void setSSLProtocols(String protocols);
 
   /**
    * The name of the {@link ConfigurationProperties#SSL_PROTOCOLS} property
    */
-  @ConfigAttribute(type = String[].class)
+  @ConfigAttribute(type = String.class)
   String SSL_PROTOCOLS_NAME = SSL_PROTOCOLS;
 
   /**
@@ -4385,19 +4385,19 @@ public interface DistributionConfig extends Config, LogConfig {
    * property.
    */
   @ConfigAttributeGetter(name = SSL_CIPHERS)
-  String[] getSSLCiphers();
+  String getSSLCiphers();
 
   /**
    * Sets the value of the {@link ConfigurationProperties#SSL_CIPHERS}
    * property.
    */
   @ConfigAttributeSetter(name = SSL_CIPHERS)
-  void setSSLCiphers(String[] ciphers);
+  void setSSLCiphers(String ciphers);
 
   /**
    * The name of the {@link ConfigurationProperties#SSL_CIPHERS} property
    */
-  @ConfigAttribute(type = String[].class)
+  @ConfigAttribute(type = String.class)
   String SSL_CIPHERS_NAME = SSL_CIPHERS;
 
   /**

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/6ffa6523/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionConfigImpl.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionConfigImpl.java b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionConfigImpl.java
index 942322b..a5a9aa6 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionConfigImpl.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionConfigImpl.java
@@ -48,7 +48,6 @@ import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
 import com.gemstone.gemfire.internal.net.SSLEnabledComponent;
 import com.gemstone.gemfire.internal.net.SocketCreator;
 import com.gemstone.gemfire.internal.process.ProcessLauncherContext;
-import com.gemstone.gemfire.management.internal.SSLUtil;
 import com.gemstone.gemfire.memcached.GemFireMemcachedServer;
 
 /**
@@ -184,9 +183,9 @@ public class DistributionConfigImpl extends AbstractDistributionConfig implement
   @Deprecated
   private boolean clusterSSLEnabled = DEFAULT_SSL_ENABLED;
   @Deprecated
-  private String[] clusterSSLProtocols = new String[] { DEFAULT_SSL_PROTOCOLS };
+  private String clusterSSLProtocols = DEFAULT_SSL_PROTOCOLS;
   @Deprecated
-  private String[] clusterSSLCiphers = new String[] { DEFAULT_SSL_CIPHERS };
+  private String clusterSSLCiphers = DEFAULT_SSL_CIPHERS;
   @Deprecated
   private boolean clusterSSLRequireAuthentication = DEFAULT_SSL_REQUIRE_AUTHENTICATION;
   @Deprecated
@@ -459,9 +458,9 @@ public class DistributionConfigImpl extends AbstractDistributionConfig implement
   @Deprecated
   private boolean jmxManagerSslRequireAuthentication = DEFAULT_JMX_MANAGER_SSL_REQUIRE_AUTHENTICATION;
   @Deprecated
-  private String[] jmxManagerSslProtocols = new String[] { DEFAULT_JMX_MANAGER_SSL_PROTOCOLS };
+  private String jmxManagerSslProtocols = DEFAULT_JMX_MANAGER_SSL_PROTOCOLS;
   @Deprecated
-  private String[] jmxManagerSslCiphers = new String[] { DEFAULT_JMX_MANAGER_SSL_CIPHERS };
+  private String jmxManagerSslCiphers = DEFAULT_JMX_MANAGER_SSL_CIPHERS;
   @Deprecated
   private Properties jmxManagerSslProperties = new Properties();
   @Deprecated
@@ -482,9 +481,9 @@ public class DistributionConfigImpl extends AbstractDistributionConfig implement
   @Deprecated
   private boolean serverSslRequireAuthentication = DEFAULT_SERVER_SSL_REQUIRE_AUTHENTICATION;
   @Deprecated
-  private String[] serverSslProtocols = new String[] { DEFAULT_SERVER_SSL_PROTOCOLS };
+  private String serverSslProtocols = DEFAULT_SERVER_SSL_PROTOCOLS;
   @Deprecated
-  private String[] serverSslCiphers = new String[] { DEFAULT_SERVER_SSL_CIPHERS };
+  private String serverSslCiphers = DEFAULT_SERVER_SSL_CIPHERS;
   @Deprecated
   private Properties serverSslProperties = new Properties();
   @Deprecated
@@ -505,9 +504,9 @@ public class DistributionConfigImpl extends AbstractDistributionConfig implement
   @Deprecated
   private boolean gatewaySslRequireAuthentication = DEFAULT_GATEWAY_SSL_REQUIRE_AUTHENTICATION;
   @Deprecated
-  private String[] gatewaySslProtocols = new String[] { DEFAULT_GATEWAY_SSL_PROTOCOLS };
+  private String gatewaySslProtocols = DEFAULT_GATEWAY_SSL_PROTOCOLS;
   @Deprecated
-  private String[] gatewaySslCiphers = new String[] { DEFAULT_GATEWAY_SSL_CIPHERS };
+  private String gatewaySslCiphers = DEFAULT_GATEWAY_SSL_CIPHERS;
   @Deprecated
   private Properties gatewaySslProperties = new Properties();
   @Deprecated
@@ -529,9 +528,9 @@ public class DistributionConfigImpl extends AbstractDistributionConfig implement
   @Deprecated
   private boolean httpServiceSSLRequireAuthentication = DEFAULT_HTTP_SERVICE_SSL_REQUIRE_AUTHENTICATION;
   @Deprecated
-  private String[] httpServiceSSLProtocols = new String[] { DEFAULT_HTTP_SERVICE_SSL_PROTOCOLS };
+  private String httpServiceSSLProtocols = DEFAULT_HTTP_SERVICE_SSL_PROTOCOLS;
   @Deprecated
-  private String[] httpServiceSSLCiphers = new String[] { DEFAULT_HTTP_SERVICE_SSL_CIPHERS };
+  private String httpServiceSSLCiphers = DEFAULT_HTTP_SERVICE_SSL_CIPHERS;
   @Deprecated
   private Properties httpServiceSSLProperties = new Properties();
   @Deprecated
@@ -549,8 +548,8 @@ public class DistributionConfigImpl extends AbstractDistributionConfig implement
 
   private SSLEnabledComponent[] sslEnabledComponents = DEFAULT_SSL_ENABLED_COMPONENTS;
 
-  private String[] sslProtocols = new String[] { DEFAULT_SSL_PROTOCOLS };
-  private String[] sslCiphers = new String[] { DEFAULT_SSL_CIPHERS };
+  private String sslProtocols = DEFAULT_SSL_PROTOCOLS;
+  private String sslCiphers = DEFAULT_SSL_CIPHERS;
   private boolean sslRequireAuthentication = DEFAULT_SSL_REQUIRE_AUTHENTICATION;
   private String sslKeyStore = DEFAULT_SSL_KEYSTORE;
   private String sslKeyStoreType = DEFAULT_CLUSTER_SSL_KEYSTORE_TYPE;
@@ -1458,13 +1457,8 @@ public class DistributionConfigImpl extends AbstractDistributionConfig implement
         continue;
       }
       Object propVal = me.getValue();
-      if (isLegacySSLCipherOrProtocol(propName)) {
-        propVal = SSLUtil.stringToArray((String) propVal);
-        setAttributeObject(propName, propVal, this.sourceMap.get(propName));
-      } else {
-        if (propVal != null && (propVal instanceof String)) { // weed out extraneous non-string properties
-          this.setAttribute(propName, ((String) propVal).trim(), this.sourceMap.get(propName));
-        }
+      if (propVal != null && (propVal instanceof String)) { // weed out extraneous non-string properties
+        this.setAttribute(propName, ((String) propVal).trim(), this.sourceMap.get(propName));
       }
     }
     if (props.containsKey(CLUSTER_SSL_ENABLED)) {
@@ -1483,15 +1477,6 @@ public class DistributionConfigImpl extends AbstractDistributionConfig implement
     this.modifiable = false;
   }
 
-  private boolean isLegacySSLCipherOrProtocol(final String propName) {
-    if (propName.contains("-ciphers") || propName.contains("-protocols")) {
-      if (!ConfigurationProperties.SSL_CIPHERS.equals(propName) && !ConfigurationProperties.SSL_PROTOCOLS.equals(propName)) {
-        return true;
-      }
-    }
-    return false;
-  }
-
   public void close() {
     // Clear the extra stuff from System properties
     Properties props = System.getProperties();
@@ -1638,11 +1623,11 @@ public class DistributionConfigImpl extends AbstractDistributionConfig implement
     return this.clusterSSLEnabled;
   }
 
-  public String[] getClusterSSLProtocols() {
+  public String getClusterSSLProtocols() {
     return this.clusterSSLProtocols;
   }
 
-  public String[] getClusterSSLCiphers() {
+  public String getClusterSSLCiphers() {
     return this.clusterSSLCiphers;
   }
 
@@ -1918,12 +1903,12 @@ public class DistributionConfigImpl extends AbstractDistributionConfig implement
     this.clusterSSLEnabled = (Boolean) value;
   }
 
-  public void setClusterSSLProtocols(String[] value) {
-    this.clusterSSLProtocols = value;
+  public void setClusterSSLProtocols(String value) {
+    this.clusterSSLProtocols = (String) value;
   }
 
-  public void setClusterSSLCiphers(String[] value) {
-    this.clusterSSLCiphers = value;
+  public void setClusterSSLCiphers(String value) {
+    this.clusterSSLCiphers = (String) value;
   }
 
   public void setClusterSSLRequireAuthentication(boolean value) {
@@ -2328,22 +2313,22 @@ public class DistributionConfigImpl extends AbstractDistributionConfig implement
   }
 
   @Override
-  public String[] getJmxManagerSSLProtocols() {
+  public String getJmxManagerSSLProtocols() {
     return this.jmxManagerSslProtocols;
   }
 
   @Override
-  public void setJmxManagerSSLProtocols(String[] protocols) {
+  public void setJmxManagerSSLProtocols(String protocols) {
     this.jmxManagerSslProtocols = protocols;
   }
 
   @Override
-  public String[] getJmxManagerSSLCiphers() {
+  public String getJmxManagerSSLCiphers() {
     return this.jmxManagerSslCiphers;
   }
 
   @Override
-  public void setJmxManagerSSLCiphers(String[] ciphers) {
+  public void setJmxManagerSSLCiphers(String ciphers) {
     this.jmxManagerSslCiphers = ciphers;
   }
 
@@ -2570,22 +2555,22 @@ public class DistributionConfigImpl extends AbstractDistributionConfig implement
   }
 
   @Override
-  public String[] getSSLProtocols() {
+  public String getSSLProtocols() {
     return sslProtocols;
   }
 
   @Override
-  public void setSSLProtocols(final String[] sslProtocols) {
+  public void setSSLProtocols(final String sslProtocols) {
     this.sslProtocols = sslProtocols;
   }
 
   @Override
-  public String[] getSSLCiphers() {
+  public String getSSLCiphers() {
     return sslCiphers;
   }
 
   @Override
-  public void setSSLCiphers(final String[] sslCiphers) {
+  public void setSSLCiphers(final String sslCiphers) {
     this.sslCiphers = sslCiphers;
   }
 
@@ -3738,23 +3723,23 @@ public class DistributionConfigImpl extends AbstractDistributionConfig implement
   }
 
   @Override
-  public String[] getServerSSLProtocols() {
+  public String getServerSSLProtocols() {
     return this.serverSslProtocols;
   }
 
   @Override
-  public void setServerSSLProtocols(String[] protocols) {
-    this.serverSslProtocols = protocols;
+  public void setServerSSLProtocols(String protocols) {
+    this.serverSslProtocols = (String) protocols;
   }
 
   @Override
-  public String[] getServerSSLCiphers() {
+  public String getServerSSLCiphers() {
     return this.serverSslCiphers;
   }
 
   @Override
-  public void setServerSSLCiphers(String[] ciphers) {
-    this.serverSslCiphers = ciphers;
+  public void setServerSSLCiphers(String ciphers) {
+    this.serverSslCiphers = (String) ciphers;
   }
 
   public void setServerSSLKeyStore(String value) {
@@ -3829,23 +3814,23 @@ public class DistributionConfigImpl extends AbstractDistributionConfig implement
   }
 
   @Override
-  public String[] getGatewaySSLProtocols() {
+  public String getGatewaySSLProtocols() {
     return this.gatewaySslProtocols;
   }
 
   @Override
-  public void setGatewaySSLProtocols(String[] protocols) {
-    this.gatewaySslProtocols = protocols;
+  public void setGatewaySSLProtocols(String protocols) {
+    this.gatewaySslProtocols = (String) protocols;
   }
 
   @Override
-  public String[] getGatewaySSLCiphers() {
+  public String getGatewaySSLCiphers() {
     return this.gatewaySslCiphers;
   }
 
   @Override
-  public void setGatewaySSLCiphers(String[] ciphers) {
-    this.gatewaySslCiphers = ciphers;
+  public void setGatewaySSLCiphers(String ciphers) {
+    this.gatewaySslCiphers = (String) ciphers;
   }
 
   public void setGatewaySSLKeyStore(String value) {
@@ -3920,22 +3905,22 @@ public class DistributionConfigImpl extends AbstractDistributionConfig implement
   }
 
   @Override
-  public String[] getHttpServiceSSLProtocols() {
+  public String getHttpServiceSSLProtocols() {
     return httpServiceSSLProtocols;
   }
 
   @Override
-  public void setHttpServiceSSLProtocols(String[] httpServiceSSLProtocols) {
+  public void setHttpServiceSSLProtocols(String httpServiceSSLProtocols) {
     this.httpServiceSSLProtocols = httpServiceSSLProtocols;
   }
 
   @Override
-  public String[] getHttpServiceSSLCiphers() {
+  public String getHttpServiceSSLCiphers() {
     return httpServiceSSLCiphers;
   }
 
   @Override
-  public void setHttpServiceSSLCiphers(String[] httpServiceSSLCiphers) {
+  public void setHttpServiceSSLCiphers(String httpServiceSSLCiphers) {
     this.httpServiceSSLCiphers = httpServiceSSLCiphers;
   }
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/6ffa6523/geode-core/src/main/java/com/gemstone/gemfire/internal/admin/SSLConfig.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/admin/SSLConfig.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/admin/SSLConfig.java
index e3032c4..ebf3a7e 100755
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/admin/SSLConfig.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/admin/SSLConfig.java
@@ -31,8 +31,8 @@ import com.gemstone.gemfire.management.internal.SSLUtil;
 public class SSLConfig {
 
   private boolean enabled = DistributionConfig.DEFAULT_SSL_ENABLED;
-  private String[] protocols = new String[] { DistributionConfig.DEFAULT_SSL_PROTOCOLS };
-  private String[] ciphers = new String[] { DistributionConfig.DEFAULT_SSL_CIPHERS };
+  private String protocols = DistributionConfig.DEFAULT_SSL_PROTOCOLS;
+  private String ciphers = DistributionConfig.DEFAULT_SSL_CIPHERS;
   private boolean requireAuth = DistributionConfig.DEFAULT_SSL_REQUIRE_AUTHENTICATION;
   private String keystore = DistributionConfig.DEFAULT_SSL_KEYSTORE;
   private String keystoreType = DistributionConfig.DEFAULT_CLUSTER_SSL_KEYSTORE_TYPE;
@@ -108,19 +108,27 @@ public class SSLConfig {
     this.enabled = enabled;
   }
 
-  public String[] getProtocols() {
+  public String getProtocols() {
     return this.protocols;
   }
 
-  public void setProtocols(String[] protocols) {
+  public String[] getProtocolsAsStringArray() {
+    return SSLUtil.readArray(this.protocols);
+  }
+
+  public void setProtocols(String protocols) {
     this.protocols = protocols;
   }
 
-  public String[] getCiphers() {
+  public String getCiphers() {
     return this.ciphers;
   }
 
-  public void setCiphers(String[] ciphers) {
+  public String[] getCiphersAsStringArray() {
+    return SSLUtil.readArray(this.ciphers);
+  }
+
+  public void setCiphers(String ciphers) {
     this.ciphers = ciphers;
   }
 
@@ -141,6 +149,7 @@ public class SSLConfig {
   }
 
 
+
   public Properties getProperties() {
     return this.properties;
   }
@@ -177,8 +186,8 @@ public class SSLConfig {
     props.setProperty(CLUSTER_SSL_ENABLED, String.valueOf(this.enabled));
 
     if (this.enabled) {
-      props.setProperty(CLUSTER_SSL_PROTOCOLS, SSLUtil.arrayToSpaceDelimitedString(this.protocols));
-      props.setProperty(CLUSTER_SSL_CIPHERS, SSLUtil.arrayToSpaceDelimitedString(this.ciphers));
+      props.setProperty(CLUSTER_SSL_PROTOCOLS, this.protocols);
+      props.setProperty(CLUSTER_SSL_CIPHERS, this.ciphers);
       props.setProperty(CLUSTER_SSL_REQUIRE_AUTHENTICATION, String.valueOf(this.requireAuth));
     }
   }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/6ffa6523/geode-core/src/main/java/com/gemstone/gemfire/internal/net/SSLConfigurationFactory.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/net/SSLConfigurationFactory.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/net/SSLConfigurationFactory.java
index 66fba7e..33378b8 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/net/SSLConfigurationFactory.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/net/SSLConfigurationFactory.java
@@ -27,7 +27,6 @@ import org.springframework.util.StringUtils;
 import com.gemstone.gemfire.distributed.internal.DistributionConfig;
 import com.gemstone.gemfire.distributed.internal.DistributionConfigImpl;
 import com.gemstone.gemfire.internal.admin.SSLConfig;
-import com.gemstone.gemfire.management.internal.SSLUtil;
 
 public class SSLConfigurationFactory {
 
@@ -317,8 +316,8 @@ public class SSLConfigurationFactory {
                                                    final String alias) {
     SSLConfig sslConfig = new SSLConfig();
     sslConfig.setAlias(alias);
-    sslConfig.setCiphers(SSLUtil.stringToArray(ciphers));
-    sslConfig.setProtocols(SSLUtil.stringToArray(protocols));
+    sslConfig.setCiphers(ciphers);
+    sslConfig.setProtocols(protocols);
     sslConfig.setRequireAuth(needClientAuth);
     sslConfig.setEnabled(useSSL);
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/6ffa6523/geode-core/src/main/java/com/gemstone/gemfire/internal/net/SocketCreator.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/net/SocketCreator.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/net/SocketCreator.java
index d361829..a11733a 100755
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/net/SocketCreator.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/net/SocketCreator.java
@@ -440,7 +440,7 @@ public class SocketCreator {
   }
 
   private SSLContext getSSLContextInstance() {
-    String[] protocols = sslConfig.getProtocols();
+    String[] protocols = sslConfig.getProtocolsAsStringArray();
     SSLContext sslContext = null;
     if (protocols != null && protocols.length > 0) {
       for (String protocol : protocols) {
@@ -1019,11 +1019,11 @@ public class SocketCreator {
     serverSocket.setEnableSessionCreation(true);
 
     // restrict cyphers
-    String[] protocols = this.sslConfig.getProtocols();
+    String[] protocols = this.sslConfig.getProtocolsAsStringArray();
     if (!"any".equalsIgnoreCase(protocols[0])) {
       serverSocket.setEnabledProtocols(protocols);
     }
-    String[] ciphers = this.sslConfig.getCiphers();
+    String[] ciphers = this.sslConfig.getCiphersAsStringArray();
     if (!"any".equalsIgnoreCase(ciphers[0])) {
       serverSocket.setEnabledCipherSuites(ciphers);
     }
@@ -1040,13 +1040,13 @@ public class SocketCreator {
       sslSocket.setUseClientMode(true);
       sslSocket.setEnableSessionCreation(true);
 
-      String[] protocols = this.sslConfig.getProtocols();
+      String[] protocols = this.sslConfig.getProtocolsAsStringArray();
 
       // restrict cyphers
       if (protocols != null && !"any".equalsIgnoreCase(protocols[0])) {
         sslSocket.setEnabledProtocols(protocols);
       }
-      String[] ciphers = this.sslConfig.getCiphers();
+      String[] ciphers = this.sslConfig.getCiphersAsStringArray();
       if (ciphers != null && !"any".equalsIgnoreCase(ciphers[0])) {
         sslSocket.setEnabledCipherSuites(ciphers);
       }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/6ffa6523/geode-core/src/main/java/com/gemstone/gemfire/management/GemFireProperties.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/management/GemFireProperties.java b/geode-core/src/main/java/com/gemstone/gemfire/management/GemFireProperties.java
index ed7e5b9..410d658 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/management/GemFireProperties.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/management/GemFireProperties.java
@@ -442,12 +442,12 @@ public class GemFireProperties {
    * @deprecated Geode 1.0 use {@link #clusterSSLProtocols}
    */
   @Deprecated
-  private String[] jmxManagerSSLProtocols;
+  private String jmxManagerSSLProtocols;
   /**
    * @deprecated Geode 1.0 use {@link #clusterSSLCiphers}
    */
   @Deprecated
-  private String[] jmxManagerSSLCiphers;
+  private String jmxManagerSSLCiphers;
   /**
    * @deprecated Geode 1.0 use {@link #clusterSSLRequireAuthentication}
    */
@@ -481,8 +481,8 @@ public class GemFireProperties {
   private String jmxManagerSSLAlias;
   
   private boolean clusterSSLEnabled;
-  private String[] clusterSSLProtocols;
-  private String[] clusterSSLCiphers;
+  private String clusterSSLProtocols;
+  private String clusterSSLCiphers;
   private boolean clusterSSLRequireAuthentication;
   private String clusterSSLKeyStore;
   private String clusterSSLKeyStoreType;
@@ -500,12 +500,12 @@ public class GemFireProperties {
    * @deprecated Geode 1.0 use {@link #clusterSSLProtocols}
    */
   @Deprecated
-  private String[] serverSSLProtocols;
+  private String serverSSLProtocols;
   /**
    * @deprecated Geode 1.0 use {@link #clusterSSLCiphers}
    */
   @Deprecated
-  private String[] serverSSLCiphers;
+  private String serverSSLCiphers;
   /**
    * @deprecated Geode 1.0 use {@link #clusterSSLRequireAuthentication}
    */
@@ -547,12 +547,12 @@ public class GemFireProperties {
    * @deprecated Geode 1.0 use {@link #clusterSSLProtocols}
    */
   @Deprecated
-  private String[] gatewaySSLProtocols;
+  private String gatewaySSLProtocols;
   /**
    * @deprecated Geode 1.0 use {@link #clusterSSLCiphers}
    */
   @Deprecated
-  private String[] gatewaySSLCiphers;
+  private String gatewaySSLCiphers;
   /**
    * @deprecated Geode 1.0 use {@link #clusterSSLRequireAuthentication}
    */
@@ -599,12 +599,12 @@ public class GemFireProperties {
    * @deprecated Geode 1.0 use {@link #clusterSSLProtocols}
    */
   @Deprecated
-  private String[] httpServiceSSLProtocols;
+  private String httpServiceSSLProtocols;
   /**
    * @deprecated Geode 1.0 use {@link #clusterSSLCiphers}
    */
   @Deprecated
-  private String[] httpServiceSSLCiphers;
+  private String httpServiceSSLCiphers;
   /**
    * @deprecated Geode 1.0 use {@link #clusterSSLKeyStore}
    */
@@ -1018,6 +1018,26 @@ public class GemFireProperties {
     
   }
 
+//  public void setSslEnabled(boolean sslEnabled) {
+//    this.sslEnabled = sslEnabled;
+//
+//  }
+//
+//  public void setSslCiphers(String sslCiphers) {
+//    this.sslCiphers = sslCiphers;
+//
+//  }
+//
+//  public void setSslProtocols(String sslProtocols) {
+//    this.sslProtocols = sslProtocols;
+//
+//  }
+//
+//  public void setSslRequireAuthentication(boolean sslRequireAuthentication) {
+//    this.sslRequireAuthentication = sslRequireAuthentication;
+//
+//  }
+
   public void setSocketLeaseTime(int socketLeaseTime) {
     this.socketLeaseTime = socketLeaseTime;
     
@@ -1338,19 +1358,19 @@ public class GemFireProperties {
     this.jmxManagerSSLEnabled = jmxManagerSSLEnabled;
   }
 
-  public String[] getJmxManagerSSLProtocols() {
+  public String getJmxManagerSSLProtocols() {
     return jmxManagerSSLProtocols;
   }
 
-  public void setJmxManagerSSLProtocols(String[] jmxManagerSSLProtocols) {
+  public void setJmxManagerSSLProtocols(String jmxManagerSSLProtocols) {
     this.jmxManagerSSLProtocols = jmxManagerSSLProtocols;
   }
 
-  public String[] getJmxManagerSSLCiphers() {
+  public String getJmxManagerSSLCiphers() {
     return jmxManagerSSLCiphers;
   }
 
-  public void setJmxManagerSSLCiphers(String[] jmxManagerSSLCiphers) {
+  public void setJmxManagerSSLCiphers(String jmxManagerSSLCiphers) {
     this.jmxManagerSSLCiphers = jmxManagerSSLCiphers;
   }
 
@@ -1411,19 +1431,19 @@ public class GemFireProperties {
     this.clusterSSLEnabled = clusterSSLEnabled;
   }
 
-  public String[] getClusterSSLProtocols() {
+  public String getClusterSSLProtocols() {
     return clusterSSLProtocols;
   }
 
-  public void setClusterSSLProtocols(String[] clusterSSLProtocols) {
+  public void setClusterSSLProtocols(String clusterSSLProtocols) {
     this.clusterSSLProtocols = clusterSSLProtocols;
   }
 
-  public String[] getClusterSSLCiphers() {
+  public String getClusterSSLCiphers() {
     return clusterSSLCiphers;
   }
 
-  public void setClusterSSLCiphers(String[] clusterSSLCiphers) {
+  public void setClusterSSLCiphers(String clusterSSLCiphers) {
     this.clusterSSLCiphers = clusterSSLCiphers;
   }
 
@@ -1484,19 +1504,19 @@ public class GemFireProperties {
     this.serverSSLEnabled = serverSSLEnabled;
   }
 
-  public String[] getServerSSLProtocols() {
+  public String getServerSSLProtocols() {
     return serverSSLProtocols;
   }
 
-  public void setServerSSLProtocols(String[] serverSSLProtocols) {
+  public void setServerSSLProtocols(String serverSSLProtocols) {
     this.serverSSLProtocols = serverSSLProtocols;
   }
 
-  public String[] getServerSSLCiphers() {
+  public String getServerSSLCiphers() {
     return serverSSLCiphers;
   }
 
-  public void setServerSSLCiphers(String[] serverSSLCiphers) {
+  public void setServerSSLCiphers(String serverSSLCiphers) {
     this.serverSSLCiphers = serverSSLCiphers;
   }
 
@@ -1557,19 +1577,19 @@ public class GemFireProperties {
     this.gatewaySSLEnabled = gatewaySSLEnabled;
   }
 
-  public String[] getGatewaySSLProtocols() {
+  public String getGatewaySSLProtocols() {
     return gatewaySSLProtocols;
   }
 
-  public void setGatewaySSLProtocols(String[] gatewaySSLProtocols) {
+  public void setGatewaySSLProtocols(String gatewaySSLProtocols) {
     this.gatewaySSLProtocols = gatewaySSLProtocols;
   }
 
-  public String[] getGatewaySSLCiphers() {
+  public String getGatewaySSLCiphers() {
     return gatewaySSLCiphers;
   }
 
-  public void setGatewaySSLCiphers(String[] gatewaySSLCiphers) {
+  public void setGatewaySSLCiphers(String gatewaySSLCiphers) {
     this.gatewaySSLCiphers = gatewaySSLCiphers;
   }
 
@@ -1638,19 +1658,19 @@ public class GemFireProperties {
     this.httpServiceSSLRequireAuthentication = httpServiceSSLRequireAuthentication;
   }
 
-  public String[] getHttpServiceSSLProtocols() {
+  public String getHttpServiceSSLProtocols() {
     return httpServiceSSLProtocols;
   }
 
-  public void setHttpServiceSSLProtocols(String[] httpServiceSSLProtocols) {
+  public void setHttpServiceSSLProtocols(String httpServiceSSLProtocols) {
     this.httpServiceSSLProtocols = httpServiceSSLProtocols;
   }
 
-  public String[] getHttpServiceSSLCiphers() {
+  public String getHttpServiceSSLCiphers() {
     return httpServiceSSLCiphers;
   }
 
-  public void setHttpServiceSSLCiphers(String[] httpServiceSSLCiphers) {
+  public void setHttpServiceSSLCiphers(String httpServiceSSLCiphers) {
     this.httpServiceSSLCiphers = httpServiceSSLCiphers;
   }
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/6ffa6523/geode-core/src/main/java/com/gemstone/gemfire/management/internal/JettyHelper.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/management/internal/JettyHelper.java b/geode-core/src/main/java/com/gemstone/gemfire/management/internal/JettyHelper.java
index 8ebf4ef..8724d73 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/management/internal/JettyHelper.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/management/internal/JettyHelper.java
@@ -19,7 +19,6 @@ package com.gemstone.gemfire.management.internal;
 import java.io.File;
 import java.util.concurrent.CountDownLatch;
 
-import org.apache.commons.lang.ArrayUtils;
 import org.apache.logging.log4j.Logger;
 import org.eclipse.jetty.http.HttpVersion;
 import org.eclipse.jetty.server.Connector;
@@ -81,12 +80,12 @@ public class JettyHelper {
 
       sslContextFactory.setNeedClientAuth(sslConfig.isRequireAuth());
 
-      if (sslConfig.getCiphers().length > 0 && !ArrayUtils.contains(sslConfig.getCiphers(),"any")) {
+      if (!StringUtils.isBlank(sslConfig.getCiphers()) && !"any".equalsIgnoreCase(sslConfig.getCiphers())) {
         //If use has mentioned "any" let the SSL layer decide on the ciphers
-        sslContextFactory.setIncludeCipherSuites(sslConfig.getCiphers());
+        sslContextFactory.setIncludeCipherSuites(SSLUtil.readArray(sslConfig.getCiphers()));
       }
 
-      String protocol = SSLUtil.getSSLAlgo(sslConfig.getProtocols());
+      String protocol = SSLUtil.getSSLAlgo(SSLUtil.readArray(sslConfig.getProtocols()));
       if (protocol != null) {
         sslContextFactory.setProtocol(protocol);
       } else {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/6ffa6523/geode-core/src/main/java/com/gemstone/gemfire/management/internal/SSLUtil.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/management/internal/SSLUtil.java b/geode-core/src/main/java/com/gemstone/gemfire/management/internal/SSLUtil.java
index 7482d5d..98248d5 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/management/internal/SSLUtil.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/management/internal/SSLUtil.java
@@ -20,15 +20,17 @@ import java.security.NoSuchAlgorithmException;
 import java.util.ArrayList;
 import java.util.List;
 import java.util.StringTokenizer;
+
 import javax.net.ssl.SSLContext;
 
 import com.gemstone.gemfire.internal.lang.StringUtils;
 
 /**
+ * 
  * @since GemFire  8.1
  */
 public class SSLUtil {
-
+  
   public static String getSSLAlgo(String[] protocols) {
     String c = null;
 
@@ -61,34 +63,19 @@ public class SSLUtil {
     }
     return c;
   }
-
-  /**
-   * Read an array of values from a string, whitespace separated.
-   */
-  public static String[] stringToArray(String text) {
+  
+  /** Read an array of values from a string, whitespace separated. */
+  public static String[] readArray( String text ) {
     if (StringUtils.isBlank(text)) {
       return null;
     }
-
-    StringTokenizer st = new StringTokenizer(text);
-    List<String> v = new ArrayList<String>();
-    while (st.hasMoreTokens()) {
-      v.add(st.nextToken());
+    
+    StringTokenizer st = new StringTokenizer( text );
+    List<String> v = new ArrayList<String>( );
+    while( st.hasMoreTokens() ) {
+      v.add( st.nextToken() );
     }
-    return v.toArray(new String[v.size()]);
+    return v.toArray( new String[ v.size() ] );
   }
 
-
-  public static String arrayToSpaceDelimitedString(String[] stringArray) {
-    if (stringArray.length == 0) {
-      return "";
-    }
-    StringBuilder stringBuilder = new StringBuilder();
-    for (String text : stringArray) {
-      stringBuilder.append(text);
-      stringBuilder.append(" ");
-    }
-
-    return stringBuilder.toString().trim();
-  }
 }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/6ffa6523/geode-core/src/main/java/com/gemstone/gemfire/management/internal/cli/commands/ShellCommands.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/management/internal/cli/commands/ShellCommands.java b/geode-core/src/main/java/com/gemstone/gemfire/management/internal/cli/commands/ShellCommands.java
index e849d3a..523541c 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/management/internal/cli/commands/ShellCommands.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/management/internal/cli/commands/ShellCommands.java
@@ -435,7 +435,7 @@ public class ShellCommands implements CommandMarker {
         trustManagerFactory.init(serverPub);
       }
 
-      SSLContext ssl = SSLContext.getInstance(SSLUtil.getSSLAlgo(SSLUtil.stringToArray(sslProtocolsToUse)));
+      SSLContext ssl = SSLContext.getInstance(SSLUtil.getSSLAlgo(SSLUtil.readArray(sslProtocolsToUse)));
 
       ssl.init(keyManagerFactory != null ? keyManagerFactory.getKeyManagers() : null,
         trustManagerFactory != null ? trustManagerFactory.getTrustManagers() : null, new java.security.SecureRandom());

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/6ffa6523/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/DistributionConfigJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/DistributionConfigJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/DistributionConfigJUnitTest.java
index d25615d..56b35ea 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/DistributionConfigJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/DistributionConfigJUnitTest.java
@@ -111,11 +111,11 @@ public class DistributionConfigJUnitTest {
     System.out.println("otherList: " + otherList);
 
     //TODO - This makes no sense. One has no idea what the correct expected number of attributes are.
-    assertEquals(29, boolList.size());
+    assertEquals(28, boolList.size());
     assertEquals(33, intList.size());
-    assertEquals(72, stringList.size());
+    assertEquals(84, stringList.size());
     assertEquals(5, fileList.size());
-    assertEquals(16, otherList.size());
+    assertEquals(4, otherList.size());
   }
 
   @Test
@@ -306,7 +306,7 @@ public class DistributionConfigJUnitTest {
   public void testValidLocatorAddress() {
     String address = "81.240.0.1[7056]";
     config.modifiable = true;
-    config.setAttributeObject(START_LOCATOR, address, ConfigSource.api());
+    config.setAttributeObject(START_LOCATOR,address,ConfigSource.api());
     assertEquals(config.getStartLocator(), address);
   }
 
@@ -314,8 +314,8 @@ public class DistributionConfigJUnitTest {
   public void testInvalidLocatorAddress() {
     String address = "bad.bad[7056]";
     config.modifiable = true;
-    //    config.setStartLocator(address);
-    config.setAttributeObject(START_LOCATOR, address, ConfigSource.api());
+//    config.setStartLocator(address);
+    config.setAttributeObject(START_LOCATOR,address,ConfigSource.api());
   }
 
   @Test
@@ -375,7 +375,6 @@ public class DistributionConfigJUnitTest {
 
     DistributionConfig config = new DistributionConfigImpl(props);
   }
-
   @Test
   public void testSSLEnabledComponentsLegacyPass() {
     Properties props = new Properties();
@@ -386,56 +385,4 @@ public class DistributionConfigJUnitTest {
 
     DistributionConfig config = new DistributionConfigImpl(props);
   }
-
-  @Test
-  public void testSSLCiphers() {
-    Properties props = new Properties();
-    props.put(SSL_CIPHERS, "any,test,anythingelse");
-
-    DistributionConfig config = new DistributionConfigImpl(props);
-    assertArrayEquals(new String[] { "any", "test", "anythingelse" }, config.getSSLCiphers());
-  }
-
-  @Test
-  public void testSSLProtocols() {
-    Properties props = new Properties();
-    props.put(SSL_PROTOCOLS, "any,protocol1,protocol2");
-
-    DistributionConfig config = new DistributionConfigImpl(props);
-    assertArrayEquals(new String[] { "any", "protocol1", "protocol2" }, config.getSSLProtocols());
-  }
-
-  @Test
-  public void testSSLLegacyCiphers() {
-    Properties props = new Properties();
-    props.put(CLUSTER_SSL_CIPHERS, "cluster1 cluster2 cluster3");
-    props.put(JMX_MANAGER_SSL_CIPHERS, "jmx1 jmx2 jmx3");
-    props.put(HTTP_SERVICE_SSL_CIPHERS, "http1 http2 http3");
-    props.put(GATEWAY_SSL_CIPHERS, "gateway1 gateway2 gateway3");
-    props.put(SERVER_SSL_CIPHERS, "server1 server2 server3");
-
-    DistributionConfig config = new DistributionConfigImpl(props);
-    assertArrayEquals(new String[] { "cluster1", "cluster2", "cluster3" }, config.getClusterSSLCiphers());
-    assertArrayEquals(new String[] { "jmx1", "jmx2", "jmx3" }, config.getJmxManagerSSLCiphers());
-    assertArrayEquals(new String[] { "server1", "server2", "server3" }, config.getServerSSLCiphers());
-    assertArrayEquals(new String[] { "gateway1", "gateway2", "gateway3" }, config.getGatewaySSLCiphers());
-    assertArrayEquals(new String[] { "http1", "http2", "http3" }, config.getHttpServiceSSLCiphers());
-  }
-
-  @Test
-  public void testSSLLegacyProtocols() {
-    Properties props = new Properties();
-    props.put(CLUSTER_SSL_PROTOCOLS, "cluster1 cluster2 cluster3");
-    props.put(JMX_MANAGER_SSL_PROTOCOLS, "jmx1 jmx2 jmx3");
-    props.put(HTTP_SERVICE_SSL_PROTOCOLS, "http1 http2 http3");
-    props.put(GATEWAY_SSL_PROTOCOLS, "gateway1 gateway2 gateway3");
-    props.put(SERVER_SSL_PROTOCOLS, "server1 server2 server3");
-
-    DistributionConfig config = new DistributionConfigImpl(props);
-    assertArrayEquals(new String[] { "cluster1", "cluster2", "cluster3" }, config.getClusterSSLProtocols());
-    assertArrayEquals(new String[] { "jmx1", "jmx2", "jmx3" }, config.getJmxManagerSSLProtocols());
-    assertArrayEquals(new String[] { "server1", "server2", "server3" }, config.getServerSSLProtocols());
-    assertArrayEquals(new String[] { "gateway1", "gateway2", "gateway3" }, config.getGatewaySSLProtocols());
-    assertArrayEquals(new String[] { "http1", "http2", "http3" }, config.getHttpServiceSSLProtocols());
-  }
 }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/6ffa6523/geode-core/src/test/java/com/gemstone/gemfire/internal/net/SSLConfigurationFactoryTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/net/SSLConfigurationFactoryTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/net/SSLConfigurationFactoryTest.java
index f97d485..0b70c8f 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/net/SSLConfigurationFactoryTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/net/SSLConfigurationFactoryTest.java
@@ -29,7 +29,6 @@ import org.junit.experimental.categories.Category;
 import com.gemstone.gemfire.distributed.internal.DistributionConfig;
 import com.gemstone.gemfire.distributed.internal.DistributionConfigImpl;
 import com.gemstone.gemfire.internal.admin.SSLConfig;
-import com.gemstone.gemfire.management.internal.SSLUtil;
 import com.gemstone.gemfire.test.dunit.internal.JUnit4DistributedTestCase;
 import com.gemstone.gemfire.test.junit.categories.UnitTest;
 
@@ -130,8 +129,8 @@ public class SSLConfigurationFactoryTest extends JUnit4DistributedTestCase {
     assertEquals(properties.getProperty(SSL_KEYSTORE_TYPE), sslConfig.getKeystoreType());
     assertEquals(properties.getProperty(SSL_TRUSTSTORE), sslConfig.getTruststore());
     assertEquals(properties.getProperty(SSL_TRUSTSTORE_PASSWORD), sslConfig.getTruststorePassword());
-    assertEquals(SSLUtil.stringToArray(properties.getProperty(SSL_CIPHERS)), sslConfig.getCiphers());
-    assertEquals(SSLUtil.stringToArray(properties.getProperty(SSL_PROTOCOLS)), sslConfig.getProtocols());
+    assertEquals(properties.getProperty(SSL_CIPHERS), sslConfig.getCiphers());
+    assertEquals(properties.getProperty(SSL_PROTOCOLS), sslConfig.getProtocols());
     assertEquals(getCorrectAlias(expectedSSLEnabledComponent, properties), sslConfig.getAlias());
     assertEquals(requiresAuthentication(properties, expectedSSLEnabledComponent), sslConfig.isRequireAuth());
     assertEquals(expectedSSLEnabledComponent, sslConfig.getSslEnabledComponent());


[43/50] [abbrv] incubator-geode git commit: GEODE-420: Cleaning up code parsing locators string

Posted by ud...@apache.org.
GEODE-420: Cleaning up code parsing locators string


Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/3edfdf2d
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/3edfdf2d
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/3edfdf2d

Branch: refs/heads/develop
Commit: 3edfdf2d3e455bca113c0800532b2f12d3c0b19f
Parents: 9626269
Author: Udo Kohlmeyer <uk...@pivotal.io>
Authored: Mon Sep 12 09:34:42 2016 +1000
Committer: Udo Kohlmeyer <uk...@pivotal.io>
Committed: Mon Sep 12 09:34:42 2016 +1000

----------------------------------------------------------------------
 .../admin/remote/RemoteTransportConfig.java     | 192 +++++++++----------
 1 file changed, 88 insertions(+), 104 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3edfdf2d/geode-core/src/main/java/com/gemstone/gemfire/internal/admin/remote/RemoteTransportConfig.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/admin/remote/RemoteTransportConfig.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/admin/remote/RemoteTransportConfig.java
index d846fa1..0272685 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/admin/remote/RemoteTransportConfig.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/admin/remote/RemoteTransportConfig.java
@@ -16,23 +16,28 @@
  */
 package com.gemstone.gemfire.internal.admin.remote;
 
+import static com.gemstone.gemfire.distributed.ConfigurationProperties.*;
+
+import java.util.Collection;
+import java.util.Collections;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.Properties;
+import java.util.Set;
+import java.util.StringTokenizer;
+
 import com.gemstone.gemfire.distributed.internal.DistributionConfig;
 import com.gemstone.gemfire.internal.Assert;
 import com.gemstone.gemfire.internal.admin.SSLConfig;
 import com.gemstone.gemfire.internal.admin.TransportConfig;
 import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
-
-import java.util.*;
-
-import static com.gemstone.gemfire.distributed.ConfigurationProperties.*;
+import com.gemstone.gemfire.internal.lang.StringUtils;
 
 /**
  * Tranport config for RemoteGfManagerAgent.
- * 
- *
  */
 public class RemoteTransportConfig implements TransportConfig {
-  
+
   private final boolean mcastEnabled;
   private final boolean tcpDisabled;
   private final boolean disableAutoReconnect;
@@ -55,7 +60,6 @@ public class RemoteTransportConfig implements TransportConfig {
    * configuration information in a <code>DistributionConfig</code>.
    * We assume that <code>config</code> already been checked for
    * errors.
-   *
    * @since GemFire 3.0
    */
   public RemoteTransportConfig(DistributionConfig config, int vmKind) {
@@ -66,27 +70,23 @@ public class RemoteTransportConfig implements TransportConfig {
     }
     this.vmKind = vmKind;
     this.tcpPort = config.getTcpPort();
-    this.membershipPortRange = 
-            getMembershipPortRangeString(config.getMembershipPortRange());
+    this.membershipPortRange = getMembershipPortRangeString(config.getMembershipPortRange());
     this.sslConfig = new SSLConfig();
-    
+
     String initialHosts = config.getLocators();
-    if (initialHosts == null)
+    if (initialHosts == null) {
       initialHosts = "";
+    }
     initialHosts = initialHosts.trim();
-    
+
     if (config.getMcastPort() > 0) {
-      this.mcastId = new DistributionLocatorId(config.getMcastAddress(), 
-                                               config.getMcastPort(), 
-                                               config.getBindAddress(),
-                                               this.sslConfig);
+      this.mcastId = new DistributionLocatorId(config.getMcastAddress(), config.getMcastPort(), config.getBindAddress(), this.sslConfig);
       this.mcastEnabled = true;
-    }
-    else {
+    } else {
       this.mcastEnabled = false;
       this.mcastId = null;
     }
-    
+
     this.tcpDisabled = config.getDisableTcp();
     this.disableAutoReconnect = config.getDisableAutoReconnect();
 
@@ -95,24 +95,16 @@ public class RemoteTransportConfig implements TransportConfig {
       // loner system
       this.ids = Collections.EMPTY_SET;
       return;
-    }
-    else {
+    } else {
       HashSet locators = new HashSet();
-      int startIdx = 0;
-      int endIdx = -1;
-      do {
-        String locator;
-        endIdx = initialHosts.indexOf(',', startIdx);
-        if (endIdx == -1) {
-          locator = initialHosts.substring(startIdx);
-        } else {
-          locator = initialHosts.substring(startIdx, endIdx);
-          startIdx = endIdx+1;
+      StringTokenizer stringTokenizer = new StringTokenizer(initialHosts, ",");
+      while (stringTokenizer.hasMoreTokens()) {
+        String locator = stringTokenizer.nextToken();
+        if (!StringUtils.isEmpty(locator)) {
+          locators.add(new DistributionLocatorId(locator));
         }
-        locators.add(new DistributionLocatorId(locator));
+      }
 
-      } while (endIdx != -1);
-    
       if (this.mcastEnabled) {
         locators.add(this.mcastId);
       }
@@ -127,25 +119,25 @@ public class RemoteTransportConfig implements TransportConfig {
    * Constructs a transport config given a collection of {@link
    * DistributionLocatorId} instances.
    */
-  public RemoteTransportConfig(
-    boolean isMcastEnabled,
-    boolean isTcpDisabled,
-    boolean isAutoReconnectDisabled,
-    String bindAddress, 
-    SSLConfig sslConfig,
-    Collection ids, String membershipPortRange,
-    int tcpPort, int vmKind)
-  {
+  public RemoteTransportConfig(boolean isMcastEnabled,
+                               boolean isTcpDisabled,
+                               boolean isAutoReconnectDisabled,
+                               String bindAddress,
+                               SSLConfig sslConfig,
+                               Collection ids,
+                               String membershipPortRange,
+                               int tcpPort,
+                               int vmKind) {
     DistributionLocatorId mid = null;
-    
+
     if (bindAddress == null) {
       this.bindAddress = DistributionConfig.DEFAULT_BIND_ADDRESS;
     } else {
       this.bindAddress = bindAddress;
     }
-    
+
     this.sslConfig = sslConfig;
-    
+
     this.mcastEnabled = isMcastEnabled;
     this.tcpDisabled = isTcpDisabled;
     this.disableAutoReconnect = isAutoReconnectDisabled;
@@ -155,12 +147,11 @@ public class RemoteTransportConfig implements TransportConfig {
       }
       Iterator it = ids.iterator();
       while (it.hasNext() && mid == null) {
-        DistributionLocatorId id = (DistributionLocatorId)it.next();
+        DistributionLocatorId id = (DistributionLocatorId) it.next();
         if (id.isMcastId()) {
           mid = id;
           //System.out.println("mcast id: " + id);
-        }
-        else {
+        } else {
           //System.out.println("non-mcast id: " + id);
         }
       }
@@ -173,24 +164,22 @@ public class RemoteTransportConfig implements TransportConfig {
     this.membershipPortRange = membershipPortRange;
     this.tcpPort = tcpPort;
     this.vmKind = vmKind;
- }
-  
-  
+  }
+
+
   private static String getMembershipPortRangeString(int[] membershipPortRange) {
     String membershipPortRangeString = "";
-    if (membershipPortRange != null && 
-        membershipPortRange.length == 2) {
-      membershipPortRangeString = membershipPortRange[0] + "-" + 
-                                  membershipPortRange[1];
+    if (membershipPortRange != null && membershipPortRange.length == 2) {
+      membershipPortRangeString = membershipPortRange[0] + "-" + membershipPortRange[1];
     }
-    
+
     return membershipPortRangeString;
   }
 
   // -------------------------------------------------------------------------
   //   Attribute(s)
   // -------------------------------------------------------------------------
-  
+
   /**
    * Returns the set of DistributionLocatorId instances that define this
    * transport. The set is unmodifiable.
@@ -198,7 +187,7 @@ public class RemoteTransportConfig implements TransportConfig {
   public Set getIds() {
     return this.ids;
   }
-  
+
   /**
    * Returns true iff multicast is enabled in this transport.
    * Multicast must be enabled in order to use multicast discovery.
@@ -206,35 +195,35 @@ public class RemoteTransportConfig implements TransportConfig {
   public boolean isMcastEnabled() {
     return this.mcastEnabled;
   }
-  
+
   public DistributionLocatorId getMcastId() {
     return this.mcastId;
   }
-  
+
   public int getVmKind() {
     return this.vmKind;
   }
-  
+
   public boolean isTcpDisabled() {
     return this.tcpDisabled;
   }
 
   public String getBindAddress() {
-	  return this.bindAddress;
+    return this.bindAddress;
   }
-  
+
   public SSLConfig getSSLConfig() {
-	  return this.sslConfig;
+    return this.sslConfig;
   }
-  
+
   public String getMembershipPortRange() {
     return this.membershipPortRange;
   }
-  
+
   public int getTcpPort() {
     return this.tcpPort;
   }
-  
+
   public boolean getIsReconnectingDS() {
     return isReconnectingDS;
   }
@@ -255,14 +244,12 @@ public class RemoteTransportConfig implements TransportConfig {
    * Returns a <code>Properties</code> based on this config that is
    * appropriate to use with {@link
    * com.gemstone.gemfire.distributed.DistributedSystem#connect}.
-   *
    * @since GemFire 4.0
    */
   Properties toDSProperties() {
     Properties props = new Properties();
-    props.setProperty(BIND_ADDRESS,
-                      bindAddress);
-//    System.out.println("entering ds port range property of " + this.membershipPortRange);
+    props.setProperty(BIND_ADDRESS, bindAddress);
+    //    System.out.println("entering ds port range property of " + this.membershipPortRange);
     if (this.membershipPortRange != null) {
       props.setProperty(MEMBERSHIP_PORT_RANGE, this.membershipPortRange);
     }
@@ -270,28 +257,22 @@ public class RemoteTransportConfig implements TransportConfig {
       props.setProperty(TCP_PORT, String.valueOf(this.tcpPort));
     }
     if (this.mcastEnabled) {
-       // Fix bug 32849
-      props.setProperty(MCAST_ADDRESS,
-                         String.valueOf(this.mcastId.getHost().getHostAddress()));
-      props.setProperty(MCAST_PORT,
-                        String.valueOf(this.mcastId.getPort()));
+      // Fix bug 32849
+      props.setProperty(MCAST_ADDRESS, String.valueOf(this.mcastId.getHost().getHostAddress()));
+      props.setProperty(MCAST_PORT, String.valueOf(this.mcastId.getPort()));
 
-    }
-    else {
-      props.setProperty(MCAST_PORT,
-                        String.valueOf(0));
+    } else {
+      props.setProperty(MCAST_PORT, String.valueOf(0));
     }
     // Create locator string
     StringBuffer locators = new StringBuffer();
     for (Iterator iter = this.ids.iterator(); iter.hasNext(); ) {
-      DistributionLocatorId locator =
-          (DistributionLocatorId) iter.next();
+      DistributionLocatorId locator = (DistributionLocatorId) iter.next();
       if (!locator.isMcastId()) {
         String baddr = locator.getBindAddress();
         if (baddr != null && baddr.trim().length() > 0) {
           locators.append(baddr);
-        }
-        else {
+        } else {
           locators.append(locator.getHost().getCanonicalHostName());
         }
         locators.append("[");
@@ -303,16 +284,18 @@ public class RemoteTransportConfig implements TransportConfig {
         }
       }
     }
+    String tempLocatorString = locators.toString();
+    if (tempLocatorString.endsWith(",")) {
+      tempLocatorString = tempLocatorString.substring(0, tempLocatorString.length() - 1);
+    }
 
-    props.setProperty(LOCATORS,
-        locators.toString());
+    props.setProperty(LOCATORS, tempLocatorString);
 
     this.sslConfig.toDSProperties(props);
-    
-    props.setProperty(DISABLE_TCP,
-      this.tcpDisabled? "true" : "false");
-    
-    props.setProperty(DISABLE_AUTO_RECONNECT, this.disableAutoReconnect? "true" : "false");
+
+    props.setProperty(DISABLE_TCP, this.tcpDisabled ? "true" : "false");
+
+    props.setProperty(DISABLE_AUTO_RECONNECT, this.disableAutoReconnect ? "true" : "false");
 
     return props;
   }
@@ -322,7 +305,7 @@ public class RemoteTransportConfig implements TransportConfig {
     boolean first = true;
     Iterator it = ids.iterator();
     while (it.hasNext()) {
-      DistributionLocatorId dli = (DistributionLocatorId)it.next();
+      DistributionLocatorId dli = (DistributionLocatorId) it.next();
       if (noMcast && dli.isMcastId()) {
         continue;
       }
@@ -335,17 +318,19 @@ public class RemoteTransportConfig implements TransportConfig {
     }
     return result.toString();
   }
-  
-  /** returns a locators string suitable for use in locators= in gemfire.properties */
+
+  /**
+   * returns a locators string suitable for use in locators= in gemfire.properties
+   */
   public String locatorsString() {
     return this.toString(true);
   }
-  
 
- // -------------------------------------------------------------------------
+
+  // -------------------------------------------------------------------------
   //   Methods overridden from java.lang.Object
   // -------------------------------------------------------------------------
-  
+
   @Override
   public String toString() {
     return toString(false);
@@ -354,16 +339,15 @@ public class RemoteTransportConfig implements TransportConfig {
   @Override
   public boolean equals(Object o) {
     if (o != null && o instanceof RemoteTransportConfig) {
-      RemoteTransportConfig other = (RemoteTransportConfig)o;
-      return (this.mcastEnabled == other.mcastEnabled)
-        && this.ids.equals(other.ids);
+      RemoteTransportConfig other = (RemoteTransportConfig) o;
+      return (this.mcastEnabled == other.mcastEnabled) && this.ids.equals(other.ids);
     }
     return false;
   }
-  
+
   @Override
   public int hashCode() {
     return this.ids.hashCode();
   }
-  
+
 }


[40/50] [abbrv] incubator-geode git commit: GEODE-420: Amended Tests in ConnectToLocatorSSLDUnitTest.java to new ssl config

Posted by ud...@apache.org.
GEODE-420: Amended Tests in ConnectToLocatorSSLDUnitTest.java to new ssl config


Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/6853f56d
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/6853f56d
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/6853f56d

Branch: refs/heads/develop
Commit: 6853f56dd74383771f0c2d19506cabea6c0591f4
Parents: d4cca87
Author: Udo Kohlmeyer <uk...@pivotal.io>
Authored: Wed Sep 7 03:23:01 2016 +1000
Committer: Udo Kohlmeyer <uk...@pivotal.io>
Committed: Wed Sep 7 03:23:01 2016 +1000

----------------------------------------------------------------------
 .../internal/DistributionConfigImpl.java        | 17 ++++++++--------
 .../gemfire/internal/AbstractConfig.java        |  5 +++++
 .../internal/security/SecurableComponent.java   |  6 ++----
 .../internal/JmxManagerLocatorRequest.java      |  8 ++------
 .../gemfire/distributed/LocatorDUnitTest.java   |  1 -
 .../ConnectToLocatorSSLDUnitTest.java           | 21 +++++++++++++++++---
 6 files changed, 36 insertions(+), 22 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/6853f56d/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionConfigImpl.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionConfigImpl.java b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionConfigImpl.java
index 1ac92d0..c86b0e7 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionConfigImpl.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionConfigImpl.java
@@ -26,13 +26,11 @@ import java.lang.reflect.Method;
 import java.net.InetAddress;
 import java.net.URL;
 import java.net.UnknownHostException;
-import java.util.Arrays;
 import java.util.Collections;
 import java.util.HashMap;
 import java.util.HashSet;
 import java.util.Iterator;
 import java.util.Map;
-import java.util.Objects;
 import java.util.Properties;
 import java.util.Set;
 
@@ -305,8 +303,10 @@ public class DistributionConfigImpl extends AbstractDistributionConfig implement
    * The client Diffie-Hellman method name
    */
   private String securityClientDHAlgo = DEFAULT_SECURITY_CLIENT_DHALGO;
-  
-  /** The udp Diffie-Hellman method name*/
+
+  /**
+   * The udp Diffie-Hellman method name
+   */
   private String securityUDPDHAlgo = DEFAULT_SECURITY_UDP_DHALGO;
 
   /**
@@ -2118,17 +2118,17 @@ public class DistributionConfigImpl extends AbstractDistributionConfig implement
   public String getSecurityClientDHAlgo() {
     return securityClientDHAlgo;
   }
-  
+
   public void setSecurityClientDHAlgo(String value) {
     securityClientDHAlgo = (String) value;
   }
-  
+
   public String getSecurityUDPDHAlgo() {
     return securityUDPDHAlgo;
   }
 
   public void setSecurityUDPDHAlgo(String value) {
-    securityUDPDHAlgo = (String)checkAttribute(SECURITY_UDP_DHALGO, value);
+    securityUDPDHAlgo = (String) checkAttribute(SECURITY_UDP_DHALGO, value);
   }
 
   public String getSecurityPeerAuthInit() {
@@ -3060,7 +3060,8 @@ public class DistributionConfigImpl extends AbstractDistributionConfig implement
   /**
    * Used by gemfire build.xml to generate a default gemfire.properties
    * for use by applications. See bug 30995 for the feature request.
-   */ public static void main(String args[]) throws IOException {
+   */
+  public static void main(String args[]) throws IOException {
     DistributionConfigImpl cfg = new DistributionConfigImpl();
     String fileName = DistributionConfig.GEMFIRE_PREFIX + "properties";
     if (args != null && args.length > 0) {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/6853f56d/geode-core/src/main/java/com/gemstone/gemfire/internal/AbstractConfig.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/AbstractConfig.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/AbstractConfig.java
index 6fd4ae6..28b0cac 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/AbstractConfig.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/AbstractConfig.java
@@ -322,6 +322,11 @@ public abstract class AbstractConfig implements Config {
       return "" + value[0] + "-" + value[1];
     }
 
+    if(result.getClass().isArray() && attName.startsWith("ssl-"))
+    {
+      return SystemAdmin.join((Object[]) result,",");
+    }
+
     if (result.getClass().isArray()) {
       return SystemAdmin.join((Object[]) result);
     }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/6853f56d/geode-core/src/main/java/com/gemstone/gemfire/internal/security/SecurableComponent.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/security/SecurableComponent.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/security/SecurableComponent.java
index f14b268..439cde5 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/security/SecurableComponent.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/security/SecurableComponent.java
@@ -39,10 +39,8 @@ public enum SecurableComponent {
 
   public static SecurableComponent getEnum(String enumString) {
     for (SecurableComponent securableComponent : SecurableComponent.values()) {
-      if (!StringUtils.isEmpty(enumString)) {
-        if (securableComponent.constant.equalsIgnoreCase(enumString)) {
-          return securableComponent;
-        }
+      if (securableComponent.constant.equalsIgnoreCase(enumString)) {
+        return securableComponent;
       }
     }
     throw new GemFireConfigException("There is no registered component for the name: " + enumString);

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/6853f56d/geode-core/src/main/java/com/gemstone/gemfire/management/internal/JmxManagerLocatorRequest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/management/internal/JmxManagerLocatorRequest.java b/geode-core/src/main/java/com/gemstone/gemfire/management/internal/JmxManagerLocatorRequest.java
index 39f914f..7c9e6d9 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/management/internal/JmxManagerLocatorRequest.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/management/internal/JmxManagerLocatorRequest.java
@@ -23,6 +23,7 @@ import java.net.InetAddress;
 import java.util.Map;
 import java.util.Properties;
 
+import com.gemstone.gemfire.distributed.internal.DistributionConfigImpl;
 import com.gemstone.gemfire.distributed.internal.tcpserver.TcpClient;
 import com.gemstone.gemfire.internal.DataSerializableFixedID;
 import com.gemstone.gemfire.internal.Version;
@@ -85,12 +86,7 @@ public class JmxManagerLocatorRequest implements DataSerializableFixedID {
         distributionConfigProps.putAll(sslConfigProps);
       }
 
-      // re-initialize the SocketCreator with the sslConfigProps. Note this initializes the SocketCreator with cluster-ssl-* settings since
-      // we are connecting to the locator only.
-      //TODO Udo: Look into this
-      // SocketCreator.getDefaultInstance(distributionConfigProps);
-
-      TcpClient client = new TcpClient();
+      TcpClient client = new TcpClient(new DistributionConfigImpl(distributionConfigProps));
       Object responseFromServer = client.requestToServer(networkAddress, locatorPort, SINGLETON, msTimeout);
 
       return (JmxManagerLocatorResponse) responseFromServer;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/6853f56d/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorDUnitTest.java
index fc0e93b..b68841a 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorDUnitTest.java
@@ -55,7 +55,6 @@ import com.gemstone.gemfire.internal.AvailablePortHelper;
 import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
 import com.gemstone.gemfire.internal.logging.InternalLogWriter;
 import com.gemstone.gemfire.internal.logging.LocalLogWriter;
-import com.gemstone.gemfire.internal.net.SocketCreatorFactory;
 import com.gemstone.gemfire.internal.security.SecurableComponent;
 import com.gemstone.gemfire.internal.tcp.Connection;
 import com.gemstone.gemfire.test.dunit.DistributedTestUtils;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/6853f56d/geode-core/src/test/java/com/gemstone/gemfire/management/ConnectToLocatorSSLDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/ConnectToLocatorSSLDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/ConnectToLocatorSSLDUnitTest.java
index c90e157..75a0e82 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/ConnectToLocatorSSLDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/ConnectToLocatorSSLDUnitTest.java
@@ -36,6 +36,7 @@ import org.junit.rules.TemporaryFolder;
 
 import com.gemstone.gemfire.distributed.Locator;
 import com.gemstone.gemfire.internal.AvailablePortHelper;
+import com.gemstone.gemfire.internal.security.SecurableComponent;
 import com.gemstone.gemfire.management.cli.Result.Status;
 import com.gemstone.gemfire.management.internal.cli.CliUtil;
 import com.gemstone.gemfire.management.internal.cli.HeadlessGfsh;
@@ -72,7 +73,21 @@ public class ConnectToLocatorSSLDUnitTest extends JUnit4DistributedTestCase {
   }
 
   @Test
-  public void testConnectToLocatorWithClusterSSL() throws Exception{
+  public void testConnectToLocatorWithSSL() throws Exception{
+    Properties securityProps = new Properties();
+    securityProps.setProperty(SSL_ENABLED_COMPONENTS, SecurableComponent.LOCATOR.getConstant());
+    securityProps.setProperty(SSL_KEYSTORE, jks.getCanonicalPath());
+    securityProps.setProperty(SSL_KEYSTORE_PASSWORD, "password");
+    securityProps.setProperty(SSL_KEYSTORE_TYPE, "JKS");
+    securityProps.setProperty(SSL_TRUSTSTORE, jks.getCanonicalPath());
+    securityProps.setProperty(SSL_TRUSTSTORE_PASSWORD, "password");
+    securityProps.setProperty(SSL_PROTOCOLS, "TLSv1.2 TLSv1.1");
+
+    setUpLocatorAndConnect(securityProps);
+  }
+
+  @Test
+  public void testConnectToLocatorWithLegacyClusterSSL() throws Exception{
     Properties securityProps = new Properties();
     securityProps.setProperty(CLUSTER_SSL_ENABLED, "true");
     securityProps.setProperty(CLUSTER_SSL_KEYSTORE, jks.getCanonicalPath());
@@ -85,7 +100,7 @@ public class ConnectToLocatorSSLDUnitTest extends JUnit4DistributedTestCase {
   }
 
   @Test
-  public void testConnectToLocatorWithJMXSSL() throws Exception{
+  public void testConnectToLocatorWithLegacyJMXSSL() throws Exception{
     Properties securityProps = new Properties();
     securityProps.setProperty(JMX_MANAGER_SSL_ENABLED, "true");
     securityProps.setProperty(JMX_MANAGER_SSL_KEYSTORE, jks.getCanonicalPath());
@@ -129,7 +144,7 @@ public class ConnectToLocatorSSLDUnitTest extends JUnit4DistributedTestCase {
 
     gfsh.executeCommand(command.toString());
     CommandResult result = (CommandResult)gfsh.getResult();
-    assertEquals(result.getStatus(), Status.OK);
+    assertEquals(Status.OK,result.getStatus());
     assertTrue(result.getContent().toString().contains("Successfully connected to"));
   }
 


[04/50] [abbrv] incubator-geode git commit: GEODE-420: adding ssl-http-service-require-authentication property

Posted by ud...@apache.org.
GEODE-420: adding ssl-http-service-require-authentication property


Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/8754dae4
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/8754dae4
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/8754dae4

Branch: refs/heads/develop
Commit: 8754dae48af43f2159b8f0295e9a443d8de6a71a
Parents: 6179a69
Author: Udo Kohlmeyer <uk...@pivotal.io>
Authored: Wed Aug 17 15:44:25 2016 +1000
Committer: Udo Kohlmeyer <uk...@pivotal.io>
Committed: Wed Aug 17 15:44:25 2016 +1000

----------------------------------------------------------------------
 .../distributed/ConfigurationProperties.java    |   9 +
 .../internal/DistributionConfig.java            |  33 +++-
 .../internal/DistributionConfigImpl.java        |  12 ++
 .../gemfire/internal/admin/SSLConfig.java       |   4 +-
 .../internal/net/SSLConfigurationFactory.java   |  36 ++--
 .../gemfire/distributed/LocatorDUnitTest.java   |   4 +-
 .../net/SSLConfigurationFactoryTest.java        | 163 +++++++++++++++++++
 7 files changed, 240 insertions(+), 21 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8754dae4/geode-core/src/main/java/com/gemstone/gemfire/distributed/ConfigurationProperties.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/distributed/ConfigurationProperties.java b/geode-core/src/main/java/com/gemstone/gemfire/distributed/ConfigurationProperties.java
index 11e961e..fdb3bf6 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/distributed/ConfigurationProperties.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/distributed/ConfigurationProperties.java
@@ -1758,4 +1758,13 @@ public interface ConfigurationProperties {
    * <U>Since</U>: Geode 1.0
    */
   String SSL_DEFAULT_ALIAS = "ssl-default-alias";
+  /**
+   * The static String definition of the <i>"ssl-http-service-require-authentication"</i> property
+   *
+   * <U>Description</U>If false allows client side's http connection to be authenticated without a 2-way SSL authentication.
+   * </p>
+   * <U>Default</U>: "false"</p>
+   * <U>Since</U>: Geode 1.0
+   */
+  String SSL_HTTP_SERVICE_REQUIRE_AUTHENTICATION = "ssl-http-service-require-authentication";
 }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8754dae4/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionConfig.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionConfig.java b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionConfig.java
index 126342f..8e2a60b 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionConfig.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionConfig.java
@@ -1631,12 +1631,12 @@ public interface DistributionConfig extends Config, LogConfig {
   @ConfigAttribute(type = int[].class)
   String MEMBERSHIP_PORT_RANGE_NAME = MEMBERSHIP_PORT_RANGE;
 
-  /** set this boolean to restrict membership/communications to use ports in the ephemeral range */
+  /**
+   * set this boolean to restrict membership/communications to use ports in the ephemeral range
+   */
   String RESTRICT_MEMBERSHIP_PORT_RANGE = GEMFIRE_PREFIX + "use-ephemeral-ports";
 
-  int[] DEFAULT_MEMBERSHIP_PORT_RANGE = Boolean.getBoolean(RESTRICT_MEMBERSHIP_PORT_RANGE)
-      ?  new int[] { 32769, 61000 }
-      :  new int[] {  1024, 65535 };
+  int[] DEFAULT_MEMBERSHIP_PORT_RANGE = Boolean.getBoolean(RESTRICT_MEMBERSHIP_PORT_RANGE) ? new int[] { 32769, 61000 } : new int[] { 1024, 65535 };
 
   @ConfigAttributeGetter(name = MEMBERSHIP_PORT_RANGE)
   int[] getMembershipPortRange();
@@ -4540,6 +4540,31 @@ public interface DistributionConfig extends Config, LogConfig {
   @ConfigAttribute(type = String.class)
   String SSL_TRUSTSTORE_PASSWORD_NAME = SSL_TRUSTSTORE_PASSWORD;
 
+  /**
+   * Returns the value of the {@link ConfigurationProperties#SSL_HTTP_SERVICE_REQUIRE_AUTHENTICATION}
+   * property.
+   */
+  @ConfigAttributeGetter(name = SSL_HTTP_SERVICE_REQUIRE_AUTHENTICATION)
+  boolean getSSLHTTPRequireAuthentication();
+
+  /**
+   * Sets the value of the {@link ConfigurationProperties#SSL_HTTP_SERVICE_REQUIRE_AUTHENTICATION}
+   * property.
+   */
+  @ConfigAttributeSetter(name = SSL_HTTP_SERVICE_REQUIRE_AUTHENTICATION)
+  void setSSLHTTPRequireAuthentication(boolean requiresAuthenatication);
+
+  /**
+   * The name of the {@link ConfigurationProperties#SSL_HTTP_SERVICE_REQUIRE_AUTHENTICATION} property
+   */
+  @ConfigAttribute(type = Boolean.class)
+  String SSL_HTTP_SERVICE_REQUIRE_AUTHENTICATION_NAME = SSL_HTTP_SERVICE_REQUIRE_AUTHENTICATION;
+
+  /**
+   * The default value for http service ssl mutual authentication
+   */
+  boolean DEFAULT_SSL_HTTP_SERVICE_REQUIRE_AUTHENTICATION = false;
+
   //*************** Initializers to gather all the annotations in this class ************************
 
   Map<String, ConfigAttribute> attributes = new HashMap<>();

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8754dae4/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionConfigImpl.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionConfigImpl.java b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionConfigImpl.java
index 26263d3..a5a9aa6 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionConfigImpl.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionConfigImpl.java
@@ -556,6 +556,7 @@ public class DistributionConfigImpl extends AbstractDistributionConfig implement
   private String sslKeyStorePassword = DEFAULT_SSL_KEYSTORE_PASSWORD;
   private String sslTrustStore = DEFAULT_SSL_TRUSTSTORE;
   private String sslTrustStorePassword = DEFAULT_SSL_TRUSTSTORE_PASSWORD;
+  private boolean sslHttpServiceRequireAuthentication = DEFAULT_SSL_HTTP_SERVICE_REQUIRE_AUTHENTICATION;
 
   private String locatorSSLAlias = DEFAULT_SSL_ALIAS;
 
@@ -772,6 +773,7 @@ public class DistributionConfigImpl extends AbstractDistributionConfig implement
     this.sslTrustStorePassword = other.getSSLTrustStorePassword();
     this.sslProperties = other.getSSLProperties();
     this.sslDefaultAlias = other.getSSLDefaultAlias();
+    this.sslHttpServiceRequireAuthentication = other.getSSLHTTPRequireAuthentication();
 
 
   }
@@ -2642,6 +2644,16 @@ public class DistributionConfigImpl extends AbstractDistributionConfig implement
     this.sslTrustStorePassword = sslTrustStorePassword;
   }
 
+  @Override
+  public boolean getSSLHTTPRequireAuthentication() {
+    return sslHttpServiceRequireAuthentication;
+  }
+
+  @Override
+  public void setSSLHTTPRequireAuthentication(final boolean requiresAuthenatication) {
+    this.sslHttpServiceRequireAuthentication = requiresAuthenatication;
+  }
+
   ///////////////////////  Utility Methods  ///////////////////////
 
   /**

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8754dae4/geode-core/src/main/java/com/gemstone/gemfire/internal/admin/SSLConfig.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/admin/SSLConfig.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/admin/SSLConfig.java
index 977d44d..ebf3a7e 100755
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/admin/SSLConfig.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/admin/SSLConfig.java
@@ -30,8 +30,6 @@ import com.gemstone.gemfire.management.internal.SSLUtil;
  */
 public class SSLConfig {
 
-  //private static final String PREFIX = "javax.net.ssl.";
-
   private boolean enabled = DistributionConfig.DEFAULT_SSL_ENABLED;
   private String protocols = DistributionConfig.DEFAULT_SSL_PROTOCOLS;
   private String ciphers = DistributionConfig.DEFAULT_SSL_CIPHERS;
@@ -150,6 +148,8 @@ public class SSLConfig {
     this.truststoreType = truststoreType;
   }
 
+
+
   public Properties getProperties() {
     return this.properties;
   }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8754dae4/geode-core/src/main/java/com/gemstone/gemfire/internal/net/SSLConfigurationFactory.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/net/SSLConfigurationFactory.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/net/SSLConfigurationFactory.java
index 9873d03..33378b8 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/net/SSLConfigurationFactory.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/net/SSLConfigurationFactory.java
@@ -62,33 +62,33 @@ public class SSLConfigurationFactory {
   }
 
   private SSLConfig createSSLConfigForComponent(final SSLEnabledComponent sslEnabledComponent) {
-    SSLConfig sslConfig = new SSLConfig();
-    configureClusterSSL(sslConfig, sslEnabledComponent);
+    SSLConfig sslConfig = createSSLConfig(sslEnabledComponent);
     SSLEnabledComponent[] sslEnabledComponents = distributionConfig.getSSLEnabledComponents();
-    if(sslEnabledComponents.length == 0)
-    {
+    if (sslEnabledComponents.length == 0) {
       sslConfig = configureLegacyClusterSSL(sslConfig);
     }
     sslConfig.setSslEnabledComponent(sslEnabledComponent);
     switch (sslEnabledComponent) {
       case ALL: {
-
+        //Create a SSLConfig separate for HTTP Service. As the require-authentication might differ
+        createSSLConfigForComponent(SSLEnabledComponent.HTTP_SERVICE);
+        break;
       }
       case CLUSTER: {
         if (sslEnabledComponents.length > 0) {
-          sslConfig.setAlias(distributionConfig.getClusterSSLAlias());
+          sslConfig = setAliasForComponent(sslConfig, distributionConfig.getClusterSSLAlias());
         }
         break;
       }
       case LOCATOR: {
         if (sslEnabledComponents.length > 0) {
-          sslConfig.setAlias(distributionConfig.getLocatorSSLAlias());
+          sslConfig = setAliasForComponent(sslConfig, distributionConfig.getLocatorSSLAlias());
         }
         break;
       }
       case SERVER: {
         if (sslEnabledComponents.length > 0) {
-          sslConfig.setAlias(distributionConfig.getServerSSLAlias());
+          sslConfig = setAliasForComponent(sslConfig, distributionConfig.getServerSSLAlias());
         } else {
           sslConfig = configureLegacyServerSSL(sslConfig);
         }
@@ -96,7 +96,7 @@ public class SSLConfigurationFactory {
       }
       case GATEWAY: {
         if (sslEnabledComponents.length > 0) {
-          sslConfig.setAlias(distributionConfig.getGatewaySSLAlias());
+          sslConfig = setAliasForComponent(sslConfig, distributionConfig.getGatewaySSLAlias());
         } else {
           sslConfig = configureLegacyGatewaySSL(sslConfig);
         }
@@ -104,7 +104,8 @@ public class SSLConfigurationFactory {
       }
       case HTTP_SERVICE: {
         if (sslEnabledComponents.length > 0) {
-          sslConfig.setAlias(distributionConfig.getHTTPServiceSSLAlias());
+          sslConfig = setAliasForComponent(sslConfig, distributionConfig.getHTTPServiceSSLAlias());
+          sslConfig.setRequireAuth(distributionConfig.getSSLHTTPRequireAuthentication());
         } else {
           sslConfig = configureLegacyHttpServiceSSL(sslConfig);
         }
@@ -112,7 +113,7 @@ public class SSLConfigurationFactory {
       }
       case JMX: {
         if (sslEnabledComponents.length > 0) {
-          sslConfig.setAlias(distributionConfig.getJMXManagerSSLAlias());
+          sslConfig = setAliasForComponent(sslConfig, distributionConfig.getJMXManagerSSLAlias());
         } else {
           sslConfig = configureLegacyJMXSSL(sslConfig);
         }
@@ -123,7 +124,15 @@ public class SSLConfigurationFactory {
     return sslConfig;
   }
 
-  private void configureClusterSSL(final SSLConfig sslConfig, final SSLEnabledComponent sslEnabledComponent) {
+  private SSLConfig setAliasForComponent(final SSLConfig sslConfig, final String clusterSSLAlias) {
+    if (!StringUtils.isEmpty(clusterSSLAlias)) {
+      sslConfig.setAlias(clusterSSLAlias);
+    }
+    return sslConfig;
+  }
+
+  private SSLConfig createSSLConfig(final SSLEnabledComponent sslEnabledComponent) {
+    SSLConfig sslConfig = new SSLConfig();
     sslConfig.setCiphers(distributionConfig.getSSLCiphers());
     sslConfig.setEnabled(determineIfSSLEnabledForSSLComponent(sslEnabledComponent));
     sslConfig.setKeystore(distributionConfig.getSSLKeyStore());
@@ -133,6 +142,8 @@ public class SSLConfigurationFactory {
     sslConfig.setTruststorePassword(distributionConfig.getSSLTrustStorePassword());
     sslConfig.setProtocols(distributionConfig.getSSLProtocols());
     sslConfig.setRequireAuth(distributionConfig.getSSLRequireAuthentication());
+    sslConfig.setAlias(distributionConfig.getSSLDefaultAlias());
+    return sslConfig;
   }
 
   private boolean determineIfSSLEnabledForSSLComponent(final SSLEnabledComponent sslEnabledComponent) {
@@ -296,6 +307,7 @@ public class SSLConfigurationFactory {
     registeredSSLConfig.clear();
   }
 
+  @Deprecated
   public static SSLConfig getSSLConfigForComponent(final boolean useSSL,
                                                    final boolean needClientAuth,
                                                    final String protocols,

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8754dae4/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorDUnitTest.java
index 2bff100..8bfce23 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorDUnitTest.java
@@ -130,6 +130,7 @@ public class LocatorDUnitTest extends JUnit4DistributedTestCase {
       system.disconnect();
       system = null;
     }
+    SocketCreatorFactory.close();
   }
 
   ////////  Test Methods
@@ -437,7 +438,6 @@ public class LocatorDUnitTest extends JUnit4DistributedTestCase {
   @Test
   @Category(FlakyTest.class)
   public void testStartTwoLocatorsOneWithSSLAndTheOtherNonSSL() throws Exception {
-    SocketCreatorFactory.close();
     IgnoredException expectedException = IgnoredException.addIgnoredException("Unrecognized SSL message, plaintext connection");
     disconnectAllFromDS();
     Host host = Host.getHost(0);
@@ -497,7 +497,6 @@ public class LocatorDUnitTest extends JUnit4DistributedTestCase {
   @Test
   @Category(FlakyTest.class)
   public void testStartTwoLocatorsOneWithNonSSLAndTheOtherSSL() throws Exception {
-    SocketCreatorFactory.close();
     IgnoredException expectedException = IgnoredException.addIgnoredException("Remote host closed connection during handshake");
     disconnectAllFromDS();
     Host host = Host.getHost(0);
@@ -551,7 +550,6 @@ public class LocatorDUnitTest extends JUnit4DistributedTestCase {
   @Test
   @Category(FlakyTest.class)
   public void testStartTwoLocatorsWithDifferentSSLCertificates() throws Exception {
-    SocketCreatorFactory.close();
     IgnoredException expectedException = IgnoredException.addIgnoredException("Remote host closed connection during handshake");
     IgnoredException expectedException2 = IgnoredException.addIgnoredException("unable to find valid certification path to requested target");
     IgnoredException expectedException3 = IgnoredException.addIgnoredException("Received fatal alert: certificate_unknown");

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8754dae4/geode-core/src/test/java/com/gemstone/gemfire/internal/net/SSLConfigurationFactoryTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/net/SSLConfigurationFactoryTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/net/SSLConfigurationFactoryTest.java
new file mode 100644
index 0000000..067333e
--- /dev/null
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/net/SSLConfigurationFactoryTest.java
@@ -0,0 +1,163 @@
+package com.gemstone.gemfire.internal.net;
+
+import static com.gemstone.gemfire.distributed.ConfigurationProperties.*;
+import static org.junit.Assert.*;
+
+import java.util.Properties;
+
+import org.apache.commons.lang.StringUtils;
+import org.junit.After;
+import org.junit.Test;
+
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
+import com.gemstone.gemfire.distributed.internal.DistributionConfigImpl;
+import com.gemstone.gemfire.internal.admin.SSLConfig;
+import com.gemstone.gemfire.test.dunit.internal.JUnit4DistributedTestCase;
+
+public class SSLConfigurationFactoryTest extends JUnit4DistributedTestCase {
+
+  @After
+  public void tearDownTest()
+  {
+    SSLConfigurationFactory.close();
+  }
+
+  @Test
+  public void getSSLConfigForComponentALL() throws Exception {
+    Properties properties = new Properties();
+    properties.setProperty(SSL_ENABLED_COMPONENTS, "all");
+    properties.setProperty(SSL_KEYSTORE, "someKeyStore");
+    properties.setProperty(SSL_KEYSTORE_PASSWORD, "keystorePassword");
+    properties.setProperty(SSL_KEYSTORE_TYPE, "JKS");
+    properties.setProperty(SSL_TRUSTSTORE, "someKeyStore");
+    properties.setProperty(SSL_TRUSTSTORE_PASSWORD, "keystorePassword");
+    properties.setProperty(SSL_DEFAULT_ALIAS, "defaultAlias");
+    properties.setProperty(SSL_CIPHERS, "any");
+    properties.setProperty(SSL_PROTOCOLS, "any");
+    DistributionConfigImpl distributionConfig = new DistributionConfigImpl(properties);
+    SSLConfigurationFactory.setDistributionConfig(distributionConfig);
+    for (SSLEnabledComponent sslEnabledComponent : SSLEnabledComponent.values()) {
+      assertSSLConfig(properties, SSLConfigurationFactory.getSSLConfigForComponent(sslEnabledComponent), sslEnabledComponent, distributionConfig);
+    }
+  }
+
+  @Test
+  public void getSSLConfigForComponentHTTPService() throws Exception {
+    Properties properties = new Properties();
+    properties.setProperty(SSL_ENABLED_COMPONENTS, SSLEnabledComponent.HTTP_SERVICE.getConstant());
+    properties.setProperty(SSL_KEYSTORE, "someKeyStore");
+    properties.setProperty(SSL_KEYSTORE_PASSWORD, "keystorePassword");
+    properties.setProperty(SSL_KEYSTORE_TYPE, "JKS");
+    properties.setProperty(SSL_TRUSTSTORE, "someKeyStore");
+    properties.setProperty(SSL_TRUSTSTORE_PASSWORD, "keystorePassword");
+    properties.setProperty(SSL_DEFAULT_ALIAS, "defaultAlias");
+    properties.setProperty(SSL_CIPHERS, "any");
+    properties.setProperty(SSL_PROTOCOLS, "any");
+    DistributionConfigImpl distributionConfig = new DistributionConfigImpl(properties);
+    SSLConfigurationFactory.setDistributionConfig(distributionConfig);
+    for (SSLEnabledComponent sslEnabledComponent : SSLEnabledComponent.values()) {
+      assertSSLConfig(properties, SSLConfigurationFactory.getSSLConfigForComponent(sslEnabledComponent), sslEnabledComponent, distributionConfig);
+    }
+  }
+
+  @Test
+  public void getSSLConfigForComponentHTTPServiceWithAlias() throws Exception {
+    Properties properties = new Properties();
+    properties.setProperty(SSL_ENABLED_COMPONENTS, SSLEnabledComponent.HTTP_SERVICE.getConstant());
+    properties.setProperty(SSL_KEYSTORE, "someKeyStore");
+    properties.setProperty(SSL_KEYSTORE_PASSWORD, "keystorePassword");
+    properties.setProperty(SSL_KEYSTORE_TYPE, "JKS");
+    properties.setProperty(SSL_TRUSTSTORE, "someKeyStore");
+    properties.setProperty(SSL_TRUSTSTORE_PASSWORD, "keystorePassword");
+    properties.setProperty(SSL_DEFAULT_ALIAS, "defaultAlias");
+    properties.setProperty(SSL_HTTP_SERVICE_ALIAS, "httpAlias");
+    properties.setProperty(SSL_CIPHERS, "any");
+    properties.setProperty(SSL_PROTOCOLS, "any");
+    DistributionConfigImpl distributionConfig = new DistributionConfigImpl(properties);
+    SSLConfigurationFactory.setDistributionConfig(distributionConfig);
+    for (SSLEnabledComponent sslEnabledComponent : SSLEnabledComponent.values()) {
+      assertSSLConfig(properties, SSLConfigurationFactory.getSSLConfigForComponent(sslEnabledComponent), sslEnabledComponent, distributionConfig);
+    }
+  }
+
+  @Test
+  public void getSSLConfigForComponentHTTPServiceWithMutualAuth() throws Exception {
+    Properties properties = new Properties();
+    properties.setProperty(SSL_ENABLED_COMPONENTS, SSLEnabledComponent.HTTP_SERVICE.getConstant());
+    properties.setProperty(SSL_KEYSTORE, "someKeyStore");
+    properties.setProperty(SSL_KEYSTORE_PASSWORD, "keystorePassword");
+    properties.setProperty(SSL_KEYSTORE_TYPE, "JKS");
+    properties.setProperty(SSL_TRUSTSTORE, "someKeyStore");
+    properties.setProperty(SSL_TRUSTSTORE_PASSWORD, "keystorePassword");
+    properties.setProperty(SSL_DEFAULT_ALIAS, "defaultAlias");
+    properties.setProperty(SSL_HTTP_SERVICE_ALIAS, "httpAlias");
+    properties.setProperty(SSL_HTTP_SERVICE_REQUIRE_AUTHENTICATION, "true");
+    properties.setProperty(SSL_CIPHERS, "any");
+    properties.setProperty(SSL_PROTOCOLS, "any");
+    DistributionConfigImpl distributionConfig = new DistributionConfigImpl(properties);
+    SSLConfigurationFactory.setDistributionConfig(distributionConfig);
+    for (SSLEnabledComponent sslEnabledComponent : SSLEnabledComponent.values()) {
+      assertSSLConfig(properties, SSLConfigurationFactory.getSSLConfigForComponent(sslEnabledComponent), sslEnabledComponent, distributionConfig);
+    }
+  }
+
+  private void assertSSLConfig(final Properties properties,
+                               final SSLConfig sslConfig,
+                               final SSLEnabledComponent expectedSSLEnabledComponent,
+                               final DistributionConfigImpl distributionConfig) {
+    assertEquals(isSSLComponentEnabled(expectedSSLEnabledComponent, distributionConfig.getSSLEnabledComponents()), sslConfig.isEnabled());
+    assertEquals(properties.getProperty(SSL_KEYSTORE), sslConfig.getKeystore());
+    assertEquals(properties.getProperty(SSL_KEYSTORE_PASSWORD), sslConfig.getKeystorePassword());
+    assertEquals(properties.getProperty(SSL_KEYSTORE_TYPE), sslConfig.getKeystoreType());
+    assertEquals(properties.getProperty(SSL_TRUSTSTORE), sslConfig.getTruststore());
+    assertEquals(properties.getProperty(SSL_TRUSTSTORE_PASSWORD), sslConfig.getTruststorePassword());
+    assertEquals(properties.getProperty(SSL_CIPHERS), sslConfig.getCiphers());
+    assertEquals(properties.getProperty(SSL_PROTOCOLS), sslConfig.getProtocols());
+    assertEquals(getCorrectAlias(expectedSSLEnabledComponent, properties), sslConfig.getAlias());
+    assertEquals(requiresAuthentication(properties, expectedSSLEnabledComponent), sslConfig.isRequireAuth());
+    assertEquals(expectedSSLEnabledComponent, sslConfig.getSslEnabledComponent());
+  }
+
+  private boolean requiresAuthentication(final Properties properties, final SSLEnabledComponent expectedSSLEnabledComponent) {
+    boolean defaultAuthentication = expectedSSLEnabledComponent.equals(SSLEnabledComponent.HTTP_SERVICE) ? DistributionConfig.DEFAULT_SSL_HTTP_SERVICE_REQUIRE_AUTHENTICATION : DistributionConfig.DEFAULT_SSL_REQUIRE_AUTHENTICATION;
+    String httpRequiresAuthentication = properties.getProperty(SSL_HTTP_SERVICE_REQUIRE_AUTHENTICATION);
+
+    return httpRequiresAuthentication == null ? defaultAuthentication : Boolean.parseBoolean(httpRequiresAuthentication);
+  }
+
+  private String getCorrectAlias(final SSLEnabledComponent expectedSSLEnabledComponent, final Properties properties) {
+    switch (expectedSSLEnabledComponent) {
+      case ALL:
+        return properties.getProperty(SSL_DEFAULT_ALIAS);
+      case CLUSTER:
+        return getAliasForComponent(properties, SSL_CLUSTER_ALIAS);
+      case GATEWAY:
+        return getAliasForComponent(properties, SSL_GATEWAY_ALIAS);
+      case HTTP_SERVICE:
+        return getAliasForComponent(properties, SSL_HTTP_SERVICE_ALIAS);
+      case JMX:
+        return getAliasForComponent(properties, SSL_JMX_MANAGER_ALIAS);
+      case LOCATOR:
+        return getAliasForComponent(properties, SSL_LOCATOR_ALIAS);
+      case SERVER:
+        return getAliasForComponent(properties, SSL_SERVER_ALIAS);
+      default:
+        return properties.getProperty(SSL_DEFAULT_ALIAS);
+    }
+  }
+
+  private String getAliasForComponent(final Properties properties, final String componentAliasProperty) {
+    String aliasProperty = properties.getProperty(componentAliasProperty);
+    return !StringUtils.isEmpty(aliasProperty) ? aliasProperty : properties.getProperty(SSL_DEFAULT_ALIAS);
+  }
+
+  private boolean isSSLComponentEnabled(final SSLEnabledComponent expectedSSLEnabledComponent, final SSLEnabledComponent[] sslEnabledComponents) {
+    for (SSLEnabledComponent sslEnabledComponent : sslEnabledComponents) {
+      if (SSLEnabledComponent.ALL.equals(sslEnabledComponent) || sslEnabledComponent.equals(expectedSSLEnabledComponent)) {
+        return true;
+      }
+    }
+    return false;
+  }
+
+}
\ No newline at end of file


[17/50] [abbrv] incubator-geode git commit: Merge branch 'develop' into feature/GEODE-420

Posted by ud...@apache.org.
Merge branch 'develop' into feature/GEODE-420

# Conflicts:
#	geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/InternalDistributedSystem.java


Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/d35ec46c
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/d35ec46c
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/d35ec46c

Branch: refs/heads/develop
Commit: d35ec46cb08f7a601c0b96e18b00d759bb6cd074
Parents: 02c0bec a0a1fdc
Author: Udo Kohlmeyer <uk...@pivotal.io>
Authored: Mon Aug 22 12:00:45 2016 +1000
Committer: Udo Kohlmeyer <uk...@pivotal.io>
Committed: Mon Aug 22 12:00:45 2016 +1000

----------------------------------------------------------------------
 .../cache/client/internal/AbstractOp.java       |  11 +
 .../client/internal/ClientMetadataService.java  |  40 +-
 .../cache/client/internal/DestroyOp.java        |  22 +-
 .../client/internal/GetClientPRMetaDataOp.java  |  24 +-
 .../gemfire/cache/client/internal/GetOp.java    |  18 +-
 .../gemfire/cache/client/internal/PutAllOp.java |   7 +-
 .../gemfire/cache/client/internal/PutOp.java    |  46 +-
 .../cache/client/internal/RemoveAllOp.java      |   7 +-
 .../internal/SingleHopOperationCallable.java    |   1 +
 .../internal/InternalDistributedSystem.java     |  14 -
 .../internal/locks/GrantorRequestProcessor.java |   5 +-
 .../gemfire/internal/cache/CachePerfStats.java  |   2 +-
 .../internal/cache/ColocationHelper.java        |  38 +-
 .../internal/cache/ColocationLogger.java        | 180 ++++
 .../internal/cache/PartitionRegionConfig.java   |   2 +-
 .../internal/cache/PartitionedRegion.java       | 111 ++-
 .../internal/cache/ha/HARegionQueue.java        |   8 +-
 .../cache/tier/sockets/BaseCommand.java         |   4 +-
 .../internal/cache/tier/sockets/Message.java    |   2 -
 .../cache/tier/sockets/command/Destroy.java     |   8 +-
 .../cache/tier/sockets/command/Destroy65.java   |   7 +-
 .../cache/tier/sockets/command/Destroy70.java   |   2 +-
 .../cache/tier/sockets/command/Get70.java       |   9 +-
 .../cache/tier/sockets/command/Invalidate.java  |   8 +-
 .../tier/sockets/command/Invalidate70.java      |   2 +-
 .../cache/tier/sockets/command/Put61.java       |   7 +-
 .../cache/tier/sockets/command/Put65.java       |  13 +-
 .../cache/tier/sockets/command/Put70.java       |   2 +-
 .../cache/tier/sockets/command/PutAll.java      |   7 +-
 .../cache/tier/sockets/command/PutAll70.java    |   9 +-
 .../cache/tier/sockets/command/PutAll80.java    |   9 +-
 .../cache/tier/sockets/command/RemoveAll.java   |   9 +-
 .../cache/tier/sockets/command/Request.java     |   7 +-
 .../parallel/ParallelGatewaySenderQueue.java    |   2 +-
 .../gemfire/internal/i18n/LocalizedStrings.java |   3 +
 .../util/concurrent/StoppableCondition.java     |  58 +-
 .../internal/cache/ColocationHelperTest.java    | 148 +++
 .../PartitionedRegionSingleHopDUnitTest.java    |   5 +-
 .../internal/cache/SingleHopStatsDUnitTest.java |  17 +-
 ...tentColocatedPartitionedRegionDUnitTest.java | 973 ++++++++++++++++++-
 .../PersistentPartitionedRegionTestBase.java    |  17 +-
 .../rules/LocatorServerConfigurationRule.java   | 149 +++
 .../internal/LuceneIndexCreationProfile.java    |  98 +-
 .../internal/cli/LuceneIndexCommands.java       |   7 +
 .../lucene/internal/cli/LuceneIndexDetails.java |   8 +-
 .../internal/cli/LuceneSearchResults.java       |   2 +-
 .../functions/LuceneCreateIndexFunction.java    |  12 +-
 .../lucene/LuceneIndexCreationDUnitTest.java    |  58 +-
 .../LuceneIndexCreationProfileJUnitTest.java    |  11 +-
 .../cli/LuceneIndexCommandsDUnitTest.java       |  34 +
 .../cli/LuceneIndexCommandsJUnitTest.java       |  40 +
 .../LuceneClusterConfigurationDUnitTest.java    | 361 +++++++
 .../cache/lucene/test/LuceneTestUtilities.java  |  11 +-
 53 files changed, 2296 insertions(+), 359 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/d35ec46c/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/InternalDistributedSystem.java
----------------------------------------------------------------------
diff --cc geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/InternalDistributedSystem.java
index 94d0ede,b9566df..b741015
--- a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/InternalDistributedSystem.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/InternalDistributedSystem.java
@@@ -470,21 -421,18 +470,18 @@@ public class InternalDistributedSystem 
      this.shareSockets = this.originalConfig.getConserveSockets();
      this.startTime = System.currentTimeMillis();
      this.grc = new GrantorRequestProcessor.GrantorRequestContext(stopper);
 -    
 +
-     elderLock = new StoppableReentrantLock(stopper);
-     elderLockCondition = elderLock.newCondition();
- 
      this.creationStack = TEST_CREATION_STACK_GENERATOR.get().generateCreationStack(this.originalConfig);
  
 -//    if (DistributionConfigImpl.multicastTest) {
 -//      this.logger.warning("Use of multicast has been forced");
 -//    }
 -//    if (DistributionConfigImpl.forceDisableTcp) {
 -//      this.logger.warning("Use of UDP has been forced");
 -//    }
 -//    if (com.gemstone.gemfire.distributed.internal.membership.jgroup.JGroupMembershipManager.multicastTest) {
 -//      this.logger.warning("Use of multicast for all distributed cache operations has been forced");
 -//    }
 +    //    if (DistributionConfigImpl.multicastTest) {
 +    //      this.logger.warning("Use of multicast has been forced");
 +    //    }
 +    //    if (DistributionConfigImpl.forceDisableTcp) {
 +    //      this.logger.warning("Use of UDP has been forced");
 +    //    }
 +    //    if (com.gemstone.gemfire.distributed.internal.membership.jgroup.JGroupMembershipManager.multicastTest) {
 +    //      this.logger.warning("Use of multicast for all distributed cache operations has been forced");
 +    //    }
  
    }
  

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/d35ec46c/geode-core/src/main/java/com/gemstone/gemfire/internal/i18n/LocalizedStrings.java
----------------------------------------------------------------------
diff --cc geode-core/src/main/java/com/gemstone/gemfire/internal/i18n/LocalizedStrings.java
index f63078d,5f9213d..de646a2
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/i18n/LocalizedStrings.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/i18n/LocalizedStrings.java
@@@ -3732,21 -3760,22 +3732,24 @@@ public class LocalizedStrings 
    public static final StringId LuceneService_CANNOT_CREATE_INDEX_0_ON_REGION_1_WITH_ANALYZER_2_ON_FIELD_3_BECAUSE_ANOTHER_MEMBER_DEFINES_THE_SAME_INDEX_WITH_NO_ANALYZER_ON_THAT_FIELD = new StringId(6630, "Cannot create Lucene index {0} on region {1} with analyzer {2} on field {3} because another member defines the same index with no analyzer on that field.");
    public static final StringId LuceneService_CANNOT_CREATE_INDEX_0_ON_REGION_1_WITH_ANALYZER_2_ON_FIELD_3_BECAUSE_ANOTHER_MEMBER_DEFINES_THE_SAME_INDEX_WITH_ANALYZER_4_ON_THAT_FIELD = new StringId(6631, "Cannot create Lucene index {0} on region {1} with analyzer {2} on field {3} because another member defines the same index with analyzer {4} on that field.");
  
 -  public static final StringId AbstractDistributionConfig_CLUSTER_SSL_ALIAS_0 = new StringId(6633,"SSL communication uses the this alias when determining the key to use from the keystore for SSL. Defaults to \"{0}\".");
 -  public static final StringId AbstractDistributionConfig_GATEWAY_SSL_ALIAS_0 = new StringId(6634,"SSL gateway communication uses the this alias when determining the key to use from the keystore for SSL. Defaults to \"{0}\".");
 -  public static final StringId AbstractDistributionConfig_SERVER_SSL_ALIAS_0 = new StringId(6635,"SSL inter-server communication (peer-to-peer) uses the this alias when determining the key to use from the keystore for SSL. Defaults to \"{0}\".");
 -  public static final StringId AbstractDistributionConfig_HTTP_SERVICE_SSL_ALIAS_0 = new StringId(6636,"SSL http service communication uses the this alias when determining the key to use from the keystore for SSL. Defaults to \"{0}\".");
 -  public static final StringId AbstractDistributionConfig_JMX_MANAGER_SSL_ALIAS_0 = new StringId(6637,"SSL jmx communication uses the this alias when determining the key to use from the keystore for SSL. Defaults to \"{0}\".");
 +  public static final StringId AbstractDistributionConfig_CLUSTER_SSL_ALIAS_0 = new StringId(6633, "SSL communication uses the this alias when determining the key to use from the keystore for SSL. Defaults to \"{0}\".");
 +  public static final StringId AbstractDistributionConfig_GATEWAY_SSL_ALIAS_0 = new StringId(6634, "SSL gateway communication uses the this alias when determining the key to use from the keystore for SSL. Defaults to \"{0}\".");
 +  public static final StringId AbstractDistributionConfig_SERVER_SSL_ALIAS_0 = new StringId(6635, "SSL inter-server communication (peer-to-peer) uses the this alias when determining the key to use from the keystore for SSL. Defaults to \"{0}\".");
 +  public static final StringId AbstractDistributionConfig_HTTP_SERVICE_SSL_ALIAS_0 = new StringId(6636, "SSL http service communication uses the this alias when determining the key to use from the keystore for SSL. Defaults to \"{0}\".");
 +  public static final StringId AbstractDistributionConfig_JMX_MANAGER_SSL_ALIAS_0 = new StringId(6637, "SSL jmx communication uses the this alias when determining the key to use from the keystore for SSL. Defaults to \"{0}\".");
  
 -  public static final StringId AbstractDistributionConfig_SSL_ENABLED_COMPONENTS_0_INVALID_TRY_1 = new StringId(6638,"\"{0}\" is not in the valid set of options \"{1}\"");
 +  public static final StringId AbstractDistributionConfig_SSL_ENABLED_COMPONENTS_0_INVALID_TRY_1 = new StringId(6638, "\"{0}\" is not in the valid set of options \"{1}\"");
  
 -  public static final StringId AbstractDistributionConfig_SSL_ENABLED_COMPONENTS_SET_INVALID_DEPRECATED_SSL_SET = new StringId(6639,"When using ssl-enabled-components one cannot use any other SSL properties other than cluster-ssl-* or the corresponding aliases");
 +  public static final StringId AbstractDistributionConfig_SSL_ENABLED_COMPONENTS_SET_INVALID_DEPRECATED_SSL_SET = new StringId(6639, "When using ssl-enabled-components one cannot use any other SSL properties other than cluster-ssl-* or the corresponding aliases");
  
+   public static final StringId ColocationHelper_REGION_SPECIFIED_IN_COLOCATEDWITH_DOES_NOT_EXIST = new StringId(6640, "Region specified in ''colocated-with'' ({0}) for region {1} does not exist. It should be created before setting ''colocated-with'' attribute for this region.");
+   public static final StringId ColocationLogger_PERSISTENT_DATA_RECOVERY_OF_REGION_PREVENTED_BY_OFFLINE_COLOCATED_CHILDREN = new StringId(6641, "Persistent data recovery for region {0} is prevented by offline colocated region{1}");
+ 
    /** Testing strings, messageId 90000-99999 **/
 -  
 -  /** These are simple messages for testing, translated with Babelfish. **/
 +
 +  /**
 +   * These are simple messages for testing, translated with Babelfish.
 +   **/
    public static final StringId TESTING_THIS_IS_A_TEST_MESSAGE = new StringId(90000, "This is a test message.");
    public static final StringId TESTING_THIS_MESSAGE_HAS_0_MEMBERS = new StringId(90001, "Please ignore: This message has {0} members.");
    public static final StringId OBJECT_PREFIX = new StringId(90002, "Object_");


[19/50] [abbrv] incubator-geode git commit: Caching the CLUSTER component SocketCreator in TCPConduit

Posted by ud...@apache.org.
Caching the CLUSTER component SocketCreator in TCPConduit

This avoids fetching the SocketCreator each time it's going to be used.
TCPConduit holds onto it and it and Connection use the cached instance.

LocatorDUnitTest SSL tests were failing due to inadequate clean-up in
all of the DUnit JVMs.  Clean-up was only happening in the controller
JVM and in those that use the inherited distributed-system creation
methods.  LocatorDUnitTest can't use the inherited methods since they
force use of the DUnit Locator.  I've removed the FlakyTest designation
from the affected tests.


Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/075e1093
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/075e1093
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/075e1093

Branch: refs/heads/develop
Commit: 075e109377274c0620b0ff06e43fd81a3cc2c1bb
Parents: d3fbfbd
Author: Bruce Schuchardt <bs...@pivotal.io>
Authored: Mon Aug 22 16:01:45 2016 -0700
Committer: Bruce Schuchardt <bs...@pivotal.io>
Committed: Mon Aug 22 16:01:45 2016 -0700

----------------------------------------------------------------------
 .../gemfire/internal/tcp/Connection.java        |  7 ++-
 .../gemfire/internal/tcp/TCPConduit.java        | 52 ++++++++------------
 .../gemfire/distributed/LocatorDUnitTest.java   |  7 +--
 .../internal/JUnit4DistributedTestCase.java     |  2 +-
 4 files changed, 26 insertions(+), 42 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/075e1093/geode-core/src/main/java/com/gemstone/gemfire/internal/tcp/Connection.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/tcp/Connection.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/tcp/Connection.java
index 749e0cf..9ae0519 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/tcp/Connection.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/tcp/Connection.java
@@ -33,9 +33,7 @@ import com.gemstone.gemfire.internal.logging.LogService;
 import com.gemstone.gemfire.internal.logging.LoggingThreadGroup;
 import com.gemstone.gemfire.internal.logging.log4j.AlertAppender;
 import com.gemstone.gemfire.internal.logging.log4j.LocalizedMessage;
-import com.gemstone.gemfire.internal.net.SSLEnabledComponent;
-import com.gemstone.gemfire.internal.net.SocketCreator;
-import com.gemstone.gemfire.internal.net.SocketCreatorFactory;
+import com.gemstone.gemfire.internal.net.*;
 import com.gemstone.gemfire.internal.tcp.MsgReader.Header;
 import com.gemstone.gemfire.internal.util.concurrent.ReentrantSemaphore;
 import org.apache.logging.log4j.Logger;
@@ -1289,7 +1287,8 @@ public class Connection implements Runnable {
         // socket = javax.net.ssl.SSLSocketFactory.getDefault()
         //  .createSocket(remoteAddr.getInetAddress(), remoteAddr.getPort());
         int socketBufferSize = sharedResource ? SMALL_BUFFER_SIZE : this.owner.getConduit().tcpBufferSize;
-        this.socket = SocketCreatorFactory.getSSLSocketCreatorForComponent(SSLEnabledComponent.CLUSTER).connectForServer( remoteAddr.getInetAddress(), remoteAddr.getDirectChannelPort(), socketBufferSize );
+        this.socket = owner.getConduit().getSocketCreator()
+                           .connectForServer( remoteAddr.getInetAddress(), remoteAddr.getDirectChannelPort(), socketBufferSize );
         // Set the receive buffer size local fields. It has already been set in the socket.
         setSocketBufferSize(this.socket, false, socketBufferSize, true);
         setSendBufferSize(this.socket);

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/075e1093/geode-core/src/main/java/com/gemstone/gemfire/internal/tcp/TCPConduit.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/tcp/TCPConduit.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/tcp/TCPConduit.java
index 800a203..b8e067c 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/tcp/TCPConduit.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/tcp/TCPConduit.java
@@ -114,9 +114,11 @@ public class TCPConduit implements Runnable {
    */
   static boolean useDirectBuffers;
 
-  private volatile boolean inhibitNewConnections;
+  /**
+   * The socket producer used by the cluster
+   */
+  private final SocketCreator socketCreator;
 
-  //  private transient DistributedMembershipListener messageReceiver;
 
   private MembershipManager membershipManager;
 
@@ -280,6 +282,8 @@ public class TCPConduit implements Runnable {
         }
       }
     }
+    
+    this.socketCreator = SocketCreatorFactory.getSSLSocketCreatorForComponent(SSLEnabledComponent.CLUSTER);
 
     startAcceptor();
   }
@@ -429,7 +433,7 @@ public class TCPConduit implements Runnable {
       if (this.useNIO) {
         if (p <= 0) {
 
-          socket = SocketCreatorFactory.getSSLSocketCreatorForComponent(SSLEnabledComponent.CLUSTER).createServerSocketUsingPortRange(bindAddress, b, isBindAddress, this.useNIO, 0, tcpPortRange);
+          socket = socketCreator.createServerSocketUsingPortRange(bindAddress, b, isBindAddress, this.useNIO, 0, tcpPortRange);
         } else {
           ServerSocketChannel channel = ServerSocketChannel.open();
           socket = channel.socket();
@@ -459,10 +463,9 @@ public class TCPConduit implements Runnable {
       } else {
         try {
           if (p <= 0) {
-            socket = SocketCreatorFactory.getSSLSocketCreatorForComponent(SSLEnabledComponent.CLUSTER)
-                                         .createServerSocketUsingPortRange(bindAddress, b, isBindAddress, this.useNIO, this.tcpBufferSize, tcpPortRange);
+            socket = socketCreator.createServerSocketUsingPortRange(bindAddress, b, isBindAddress, this.useNIO, this.tcpBufferSize, tcpPortRange);
           } else {
-            socket = SocketCreatorFactory.getSSLSocketCreatorForComponent(SSLEnabledComponent.CLUSTER).createServerSocket(p, b, isBindAddress ? bindAddress : null, this.tcpBufferSize);
+            socket = socketCreator.createServerSocket(p, b, isBindAddress ? bindAddress : null, this.tcpBufferSize);
           }
           int newSize = socket.getReceiveBufferSize();
           if (newSize != this.tcpBufferSize) {
@@ -656,7 +659,7 @@ public class TCPConduit implements Runnable {
             logger.warn(LocalizedMessage.create(LocalizedStrings.TCPConduit_STOPPING_P2P_LISTENER_DUE_TO_SSL_CONFIGURATION_PROBLEM), ex);
             break;
           }
-          SocketCreatorFactory.getSSLSocketCreatorForComponent(SSLEnabledComponent.CLUSTER).configureServerSSLSocket(othersock);
+          socketCreator.configureServerSSLSocket(othersock);
         }
         if (stopped) {
           try {
@@ -667,30 +670,9 @@ public class TCPConduit implements Runnable {
           }
           continue;
         }
-        if (inhibitNewConnections) {
-          //          if (logger.isTraceEnabled(LogMarker.QA)) {
-          logger.info("Test hook: inhibiting acceptance of connection {}", othersock);
-          //          }
-          othersock.close();
-          while (inhibitNewConnections && !stopped) {
-            this.stopper.checkCancelInProgress(null);
-            boolean interrupted = Thread.interrupted();
-            try {
-              Thread.sleep(2000);
-            } catch (InterruptedException e) {
-              interrupted = true;
-            } finally {
-              if (interrupted) {
-                Thread.currentThread().interrupt();
-              }
-            }
-          } // while
-          if (logger.isTraceEnabled(LogMarker.QA)) {
-            logger.trace(LogMarker.QA, "Test hook: finished inhibiting acceptance of connections");
-          }
-        } else {
-          acceptConnection(othersock);
-        }
+
+        acceptConnection(othersock);
+        
       } catch (ClosedByInterruptException cbie) {
         //safe to ignore
       } catch (ClosedChannelException e) {
@@ -1195,6 +1177,14 @@ public class TCPConduit implements Runnable {
   }
 
   /**
+   * returns the SocketCreator that should be used to produce
+   * sockets for TCPConduit connections.
+   * @return
+   */
+  protected SocketCreator getSocketCreator() {
+    return socketCreator;
+  }
+  /**
    * ARB: Called by Connection before handshake reply is sent.
    * Returns true if member is part of view, false if membership is not confirmed before timeout.
    */

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/075e1093/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorDUnitTest.java
index 851cff4..530cf20 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorDUnitTest.java
@@ -68,8 +68,7 @@ import com.gemstone.gemfire.test.dunit.VM;
 import com.gemstone.gemfire.test.dunit.Wait;
 import com.gemstone.gemfire.test.dunit.WaitCriterion;
 import com.gemstone.gemfire.test.dunit.internal.JUnit4DistributedTestCase;
-import com.gemstone.gemfire.test.junit.categories.DistributedTest;
-import com.gemstone.gemfire.test.junit.categories.FlakyTest;
+import com.gemstone.gemfire.test.junit.categories.*;
 import com.gemstone.gemfire.util.test.TestUtil;
 
 /**
@@ -130,7 +129,6 @@ public class LocatorDUnitTest extends JUnit4DistributedTestCase {
       system.disconnect();
       system = null;
     }
-    SocketCreatorFactory.close();
   }
 
   ////////  Test Methods
@@ -436,7 +434,6 @@ public class LocatorDUnitTest extends JUnit4DistributedTestCase {
   }
 
   @Test
-  @Category(FlakyTest.class)
   public void testStartTwoLocatorsOneWithSSLAndTheOtherNonSSL() throws Exception {
     IgnoredException expectedException = IgnoredException.addIgnoredException("Unrecognized SSL message, plaintext connection");
     disconnectAllFromDS();
@@ -495,7 +492,6 @@ public class LocatorDUnitTest extends JUnit4DistributedTestCase {
   }
 
   @Test
-  @Category(FlakyTest.class)
   public void testStartTwoLocatorsOneWithNonSSLAndTheOtherSSL() throws Exception {
     IgnoredException expectedException = IgnoredException.addIgnoredException("Remote host closed connection during handshake");
 
@@ -551,7 +547,6 @@ public class LocatorDUnitTest extends JUnit4DistributedTestCase {
   }
 
   @Test
-  @Category(FlakyTest.class)
   public void testStartTwoLocatorsWithDifferentSSLCertificates() throws Exception {
     IgnoredException expectedException = IgnoredException.addIgnoredException("Remote host closed connection during handshake");
     IgnoredException expectedException2 = IgnoredException.addIgnoredException("unable to find valid certification path to requested target");

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/075e1093/geode-core/src/test/java/com/gemstone/gemfire/test/dunit/internal/JUnit4DistributedTestCase.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/test/dunit/internal/JUnit4DistributedTestCase.java b/geode-core/src/test/java/com/gemstone/gemfire/test/dunit/internal/JUnit4DistributedTestCase.java
index cf3c240..6be3889 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/test/dunit/internal/JUnit4DistributedTestCase.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/test/dunit/internal/JUnit4DistributedTestCase.java
@@ -165,7 +165,6 @@ public abstract class JUnit4DistributedTestCase implements DistributedTestFixtur
     }
     if (system == null || !system.isConnected()) {
       // Figure out our distributed system properties
-      SocketCreatorFactory.close();
       Properties p = DistributedTestUtils.getAllDistributedSystemProperties(props);
       lastSystemCreatedInTest = getTestClass(); // used to be getDeclaringClass()
       if (logPerTest) {
@@ -567,6 +566,7 @@ public abstract class JUnit4DistributedTestCase implements DistributedTestFixtur
     RegionTestCase.preSnapshotRegion = null;
     SocketCreator.resetHostNameCache();
     SocketCreator.resolve_dns = true;
+    SocketCreatorFactory.close();
     Message.MAX_MESSAGE_SIZE = Message.DEFAULT_MAX_MESSAGE_SIZE;
 
     // clear system properties -- keep alphabetized


[33/50] [abbrv] incubator-geode git commit: GEODE-420: Fixing compilation error

Posted by ud...@apache.org.
GEODE-420: Fixing compilation error


Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/177bcaea
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/177bcaea
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/177bcaea

Branch: refs/heads/develop
Commit: 177bcaea0af537e0ce7c7a4c9ab1be196cc17078
Parents: 284fe74
Author: Udo Kohlmeyer <uk...@pivotal.io>
Authored: Tue Aug 30 13:12:51 2016 +1000
Committer: Udo Kohlmeyer <uk...@pivotal.io>
Committed: Tue Aug 30 13:12:51 2016 +1000

----------------------------------------------------------------------
 .../java/com/gemstone/gemfire/distributed/LocatorDUnitTest.java  | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/177bcaea/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorDUnitTest.java
index 61d2e91..2faa606 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorDUnitTest.java
@@ -1568,7 +1568,7 @@ public class LocatorDUnitTest extends JUnit4DistributedTestCase {
             Properties props = new Properties();
             props.setProperty(MCAST_PORT, "0");
             props.setProperty(LOCATORS, locators);
-            addDSProps(properties);
+            addDSProps(props);
             DistributedSystem.connect(props);
           }
         };
@@ -1907,7 +1907,7 @@ public class LocatorDUnitTest extends JUnit4DistributedTestCase {
         props.setProperty(LOG_LEVEL, LogWriterUtils.getDUnitLogLevel());
         props.setProperty(MCAST_TTL, "0");
         props.setProperty(ENABLE_NETWORK_PARTITION_DETECTION, "true");
-        addDSProps(properties);
+        addDSProps(props);
         DistributedSystem.connect(props);
       }
     };


[12/50] [abbrv] incubator-geode git commit: Merge branch 'develop' into feature/GEODE-420

Posted by ud...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/dfbc88b2/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/StartupMessage.java
----------------------------------------------------------------------
diff --cc geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/StartupMessage.java
index ec2dec1,82f5c88..18143b3
--- a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/StartupMessage.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/StartupMessage.java
@@@ -24,8 -24,8 +24,9 @@@ import com.gemstone.gemfire.internal.In
  import com.gemstone.gemfire.internal.InternalInstantiator.InstantiatorAttributesHolder;
  import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
  import com.gemstone.gemfire.internal.logging.LogService;
 +import com.gemstone.gemfire.internal.net.SocketCreator;
  
+ import org.apache.commons.lang.StringUtils;
  import org.apache.logging.log4j.Logger;
  
  import java.io.DataInput;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/dfbc88b2/geode-core/src/main/java/com/gemstone/gemfire/internal/SystemAdmin.java
----------------------------------------------------------------------
diff --cc geode-core/src/main/java/com/gemstone/gemfire/internal/SystemAdmin.java
index bc0ff57,e52950f..81d9ec8
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/SystemAdmin.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/SystemAdmin.java
@@@ -26,9 -26,9 +26,12 @@@ import com.gemstone.gemfire.cache.persi
  import com.gemstone.gemfire.distributed.DistributedMember;
  import com.gemstone.gemfire.distributed.internal.*;
  import com.gemstone.gemfire.distributed.internal.membership.InternalDistributedMember;
 +import com.gemstone.gemfire.distributed.internal.tcpserver.*;
 +import com.gemstone.gemfire.internal.StatArchiveReader.ResourceInst;
 +import com.gemstone.gemfire.internal.StatArchiveReader.StatValue;
+ import com.gemstone.gemfire.internal.statistics.StatArchiveReader;
+ import com.gemstone.gemfire.internal.statistics.StatArchiveReader.ResourceInst;
+ import com.gemstone.gemfire.internal.statistics.StatArchiveReader.StatValue;
  import com.gemstone.gemfire.internal.admin.remote.TailLogResponse;
  import com.gemstone.gemfire.internal.cache.DiskStoreImpl;
  import com.gemstone.gemfire.internal.i18n.LocalizedStrings;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/dfbc88b2/geode-core/src/main/java/com/gemstone/gemfire/internal/admin/remote/DistributionLocatorId.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/dfbc88b2/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/CacheServerLauncher.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/dfbc88b2/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/GemFireCacheImpl.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/dfbc88b2/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/AcceptorImpl.java
----------------------------------------------------------------------
diff --cc geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/AcceptorImpl.java
index 67c5dec,7422e16..5540a4a
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/AcceptorImpl.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/AcceptorImpl.java
@@@ -1272,18 -1282,7 +1270,7 @@@ public class AcceptorImpl extends Accep
          // java.lang.NullPointerException
          //   at
          // com.gemstone.gemfire.internal.cache.tier.sockets.ServerConnection.run(ServerConnection.java:107)
-         
-         if (this.crHelper.emulateSlowServer() > 0) {
-           try {
-             Thread.sleep(this.crHelper.emulateSlowServer()); 
-             } 
-           catch (InterruptedException ugh) {
-             // This had better be due to shutdown; don't reenable the bit,
-             // it would just cause a hot-loop.
- //            Thread.currentThread().interrupt(); 
-             };
-         }
--        
++
          synchronized (this.syncLock) {
            if (!isRunning()) {
              closeSocket(s);

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/dfbc88b2/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/CacheClientNotifier.java
----------------------------------------------------------------------
diff --cc geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/CacheClientNotifier.java
index 5a26d72,6fd4560..d4a3be1
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/CacheClientNotifier.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/CacheClientNotifier.java
@@@ -81,10 -81,10 +81,10 @@@ import com.gemstone.gemfire.distributed
  import com.gemstone.gemfire.distributed.internal.ReplyMessage;
  import com.gemstone.gemfire.distributed.internal.ReplyProcessor21;
  import com.gemstone.gemfire.internal.ClassLoadUtil;
- import com.gemstone.gemfire.internal.DummyStatisticsFactory;
+ import com.gemstone.gemfire.internal.statistics.DummyStatisticsFactory;
  import com.gemstone.gemfire.internal.InternalDataSerializer;
  import com.gemstone.gemfire.internal.InternalInstantiator;
 -import com.gemstone.gemfire.internal.SocketCloser;
 +import com.gemstone.gemfire.internal.net.SocketCloser;
  import com.gemstone.gemfire.internal.SystemTimer;
  import com.gemstone.gemfire.internal.Version;
  import com.gemstone.gemfire.internal.VersionedDataInputStream;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/dfbc88b2/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/CacheClientUpdater.java
----------------------------------------------------------------------
diff --cc geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/CacheClientUpdater.java
index 8f81196,26efd4d..a371447
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/CacheClientUpdater.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/CacheClientUpdater.java
@@@ -43,9 -43,9 +43,10 @@@ import com.gemstone.gemfire.internal.lo
  import com.gemstone.gemfire.internal.logging.LoggingThreadGroup;
  import com.gemstone.gemfire.internal.logging.log4j.LocalizedMessage;
  import com.gemstone.gemfire.internal.logging.log4j.LogMarker;
 +import com.gemstone.gemfire.internal.net.SocketCreator;
  import com.gemstone.gemfire.internal.offheap.annotations.Released;
  import com.gemstone.gemfire.internal.sequencelog.EntryLogger;
+ import com.gemstone.gemfire.internal.statistics.StatisticsTypeFactoryImpl;
  import com.gemstone.gemfire.security.AuthenticationFailedException;
  import com.gemstone.gemfire.security.AuthenticationRequiredException;
  import com.gemstone.gemfire.security.GemFireSecurityException;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/dfbc88b2/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/CacheServerStats.java
----------------------------------------------------------------------
diff --cc geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/CacheServerStats.java
index 445790e,658b35e..4b0b231
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/CacheServerStats.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/CacheServerStats.java
@@@ -27,8 -23,11 +23,11 @@@ import com.gemstone.gemfire.StatisticsT
  import com.gemstone.gemfire.cache.server.ServerLoad;
  import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem;
  import com.gemstone.gemfire.distributed.internal.PoolStatHelper;
 -import com.gemstone.gemfire.internal.SocketCreator;
 +import com.gemstone.gemfire.internal.net.SocketCreator;
  
+ /**
+  * Cache Server statistic definitions
+  */
  public class CacheServerStats implements MessageStats {
    
    private static final String typeName = "CacheServerStats";

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/dfbc88b2/geode-core/src/main/java/com/gemstone/gemfire/internal/i18n/LocalizedStrings.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/dfbc88b2/geode-core/src/main/java/com/gemstone/gemfire/internal/statistics/HostStatHelper.java
----------------------------------------------------------------------
diff --cc geode-core/src/main/java/com/gemstone/gemfire/internal/statistics/HostStatHelper.java
index 0000000,b52eaae..d965d92
mode 000000,100644..100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/statistics/HostStatHelper.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/statistics/HostStatHelper.java
@@@ -1,0 -1,303 +1,305 @@@
+ /*
+  * Licensed to the Apache Software Foundation (ASF) under one or more
+  * contributor license agreements.  See the NOTICE file distributed with
+  * this work for additional information regarding copyright ownership.
+  * The ASF licenses this file to You under the Apache License, Version 2.0
+  * (the "License"); you may not use this file except in compliance with
+  * the License.  You may obtain a copy of the License at
+  *
+  *      http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  */
+ package com.gemstone.gemfire.internal.statistics;
+ 
+ import com.gemstone.gemfire.*;
+ //import com.gemstone.gemfire.util.*;
+ import com.gemstone.gemfire.internal.PureJavaMode;
+ import com.gemstone.gemfire.internal.SocketCreator;
+ import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
++import com.gemstone.gemfire.internal.net.SocketCreator;
++
+ import com.gemstone.gemfire.internal.statistics.platform.LinuxProcFsStatistics;
+ import com.gemstone.gemfire.internal.statistics.platform.LinuxProcessStats;
+ import com.gemstone.gemfire.internal.statistics.platform.LinuxSystemStats;
+ import com.gemstone.gemfire.internal.statistics.platform.OSXProcessStats;
+ import com.gemstone.gemfire.internal.statistics.platform.OSXSystemStats;
+ import com.gemstone.gemfire.internal.statistics.platform.OsStatisticsFactory;
+ import com.gemstone.gemfire.internal.statistics.platform.ProcessStats;
+ import com.gemstone.gemfire.internal.statistics.platform.SolarisProcessStats;
+ import com.gemstone.gemfire.internal.statistics.platform.SolarisSystemStats;
+ import com.gemstone.gemfire.internal.statistics.platform.WindowsProcessStats;
+ import com.gemstone.gemfire.internal.statistics.platform.WindowsSystemStats;
+ 
+ import java.net.InetAddress;
+ import java.net.UnknownHostException;
+ 
+ /**
+  * Provides native methods which fetch operating system statistics.
+  */
+ public class HostStatHelper {
+   static final int SOLARIS_CODE = 1; // Sparc Solaris
+   static final int WINDOWS_CODE = 2;
+   static final int LINUX_CODE = 3; // x86 Linux
+   static final int OSX_CODE = 4;  // Mac OS X
+ 
+   static final int PROCESS_STAT_FLAG = 1;
+   static final int SYSTEM_STAT_FLAG = 2;
+   
+   static final int osCode;
+ 
+   static {
+     String osName = System.getProperty("os.name", "unknown");
+     if (! PureJavaMode.osStatsAreAvailable()) {
+       throw new RuntimeException(LocalizedStrings.HostStatHelper_HOSTSTATHELPER_NOT_ALLOWED_IN_PURE_JAVA_MODE.toLocalizedString());
+     } else if (osName.equals("SunOS")) {
+       osCode = SOLARIS_CODE;
+     } else if (osName.startsWith("Windows")) {
+       osCode = WINDOWS_CODE;
+     } else if (osName.startsWith("Linux")) {
+       osCode = LINUX_CODE;
+     } else if (osName.equals("Mac OS X")) { 
+       osCode = OSX_CODE;
+     } else {
+       throw new InternalGemFireException(LocalizedStrings.HostStatHelper_UNSUPPORTED_OS_0_SUPPORTED_OSS_ARE_SUNOSSPARC_SOLARIS_LINUXX86_AND_WINDOWS.toLocalizedString(osName));
+     }
+   }
+   public static boolean isWindows() {
+     return osCode == WINDOWS_CODE;
+   }
+   public static boolean isUnix() {
+     return osCode != WINDOWS_CODE;
+   }
+   public static boolean isSolaris() {
+     return osCode == SOLARIS_CODE;
+   }
+   public static boolean isLinux() {
+     return osCode == LINUX_CODE;
+   }
+   public static boolean isOSX() {
+       return osCode == OSX_CODE;
+   }
+   
+   private HostStatHelper() {
+     // instances are not allowed
+   }
+ 
+   static int initOSStats() {
+     if(isLinux()) {
+       return LinuxProcFsStatistics.init();
+     } else {
+       return HostStatHelper.init();
+     }
+   }
+   
+   static void closeOSStats() {
+     if(isLinux()) {
+       LinuxProcFsStatistics.close();
+     } else {
+       HostStatHelper.close();
+     }
+   }
+   
+   static void readyRefreshOSStats() {
+     if(isLinux()) {
+       LinuxProcFsStatistics.readyRefresh();
+     } else {
+       HostStatHelper.readyRefresh();
+     }
+   }
+   
+   /**
+    * Allocates and initializes any resources required to sample
+    * operating system statistics.
+    * returns 0 if initialization succeeded
+    */
+   private static native int init();
+   /**
+    * Frees up resources used by this class. Once close is called this
+    * class can no longer be used.
+    */
+   private static native void close();
+   /**
+    * Should be called before any calls to the refresh methods.
+    * On some platforms if this is not called then the refesh methods
+    * will just keep returning the same old data.
+    */
+   private static native void readyRefresh();
+   /**
+    * Refreshes the specified process stats instance by fetching
+    * the current OS values for the given stats and storing them in the instance.
+    */
+   private static void refreshProcess(LocalStatisticsImpl s) {
+     int pid = (int)s.getNumericId();
+     if(isLinux()) {
+       LinuxProcFsStatistics.refreshProcess(pid, s._getIntStorage(), s._getLongStorage(), s._getDoubleStorage());
+     } else {
+       refreshProcess(pid, s._getIntStorage(), s._getLongStorage(), s._getDoubleStorage());
+     }  
+   }
+   private static native void refreshProcess(int pid, int[] ints, long[] longs, double[] doubles);
+   /**
+    * Refreshes the specified system stats instance by fetching
+    * the current OS values for the local machine and storing them in
+    * the instance.
+    */
+   private static void refreshSystem(LocalStatisticsImpl s) {
+     if(isLinux()) {
+       LinuxProcFsStatistics.refreshSystem(s._getIntStorage(), s._getLongStorage(), s._getDoubleStorage());
+     } else {
+       refreshSystem(s._getIntStorage(), s._getLongStorage(), s._getDoubleStorage());
+     }
+   }
+   private static native void refreshSystem(int[] ints, long[] longs, double[] doubles);
+ 
+   /**
+    * The call should have already checked to make sure
+    * usesSystemCalls returns true.
+    */
+   public static void refresh(LocalStatisticsImpl stats) {
+     int flags = stats.getOsStatFlags();
+     if ((flags & PROCESS_STAT_FLAG) != 0) {
+       HostStatHelper.refreshProcess(stats);
+     } else if ((flags & SYSTEM_STAT_FLAG) != 0) {
+       HostStatHelper.refreshSystem(stats);
+     } else {
+       throw new RuntimeException(LocalizedStrings.HostStatHelper_UNEXPECTED_OS_STATS_FLAGS_0.toLocalizedString(Integer.valueOf(flags)));
+     }
+   }
+   
+   /**
+    * Creates and returns a {@link Statistics} with
+    * the given pid and name. The resource's stats will contain a snapshot
+    * of the current statistic values for the specified process.
+    */
+   public static Statistics newProcess(OsStatisticsFactory f, long pid, String name) {
+     Statistics stats;
+     switch (osCode) {
+     case SOLARIS_CODE:
+       stats = f.createOsStatistics(SolarisProcessStats.getType(),
+                                    name, pid, PROCESS_STAT_FLAG);
+       break;
+     case LINUX_CODE:
+       stats = f.createOsStatistics(LinuxProcessStats.getType(),
+                                    name, pid, PROCESS_STAT_FLAG);
+       break;
+     case OSX_CODE:
+         stats = f.createOsStatistics(OSXProcessStats.getType(),
+                                      name, pid, PROCESS_STAT_FLAG);
+         break;
+     case WINDOWS_CODE:
+       stats = f.createOsStatistics(WindowsProcessStats.getType(),
+                                    name, pid, PROCESS_STAT_FLAG);
+       break;
+     default:
+       throw new InternalGemFireException(LocalizedStrings.HostStatHelper_UNHANDLED_OSCODE_0_HOSTSTATHELPERNEWPROCESS.toLocalizedString(Integer.valueOf(osCode)));
+     }
+     // Note we don't call refreshProcess since we only want the manager to do that
+     return stats;
+   }
+ 
+   /**
+    * Creates a new <code>ProcessStats</code> instance that wraps the
+    * given <code>Statistics</code>.
+    *
+    * @see #newProcess
+    * @since GemFire 3.5
+    */
+   static ProcessStats newProcessStats(Statistics stats) {
+     switch (osCode) {
+     case SOLARIS_CODE:
+       return SolarisProcessStats.createProcessStats(stats);
+ 
+     case LINUX_CODE:
+       return LinuxProcessStats.createProcessStats(stats);
+ 
+     case WINDOWS_CODE:
+       return WindowsProcessStats.createProcessStats(stats);
+ 
+     case OSX_CODE:
+         return OSXProcessStats.createProcessStats(stats);
+         
+     default:
+       throw new InternalGemFireException(LocalizedStrings.HostStatHelper_UNHANDLED_OSCODE_0_HOSTSTATHELPERNEWPROCESSSTATS.toLocalizedString(Integer.valueOf(osCode)));
+     }
+   }
+ 
+   /**
+    * Creates and returns a {@link Statistics} with the current
+    * machine's stats. The resource's stats will contain a snapshot
+    * of the current statistic values for the local machine.
+    */
+   static void newSystem(OsStatisticsFactory f) {
+     Statistics stats;
+     switch (osCode) {
+     case SOLARIS_CODE:
+       stats = f.createOsStatistics(SolarisSystemStats.getType(),
+                                    getHostSystemName(),
+                                    getHostSystemId(),
+                                    SYSTEM_STAT_FLAG);
+       break;
+     case LINUX_CODE:
+       stats = f.createOsStatistics(LinuxSystemStats.getType(),
+                                    getHostSystemName(),
+                                    getHostSystemId(),
+                                    SYSTEM_STAT_FLAG);
+       break;
+     case WINDOWS_CODE:
+       stats = f.createOsStatistics(WindowsSystemStats.getType(),
+                                    getHostSystemName(),
+                                    getHostSystemId(),
+                                    SYSTEM_STAT_FLAG);
+       break;
+     case OSX_CODE:
+       stats = f.createOsStatistics(OSXSystemStats.getType(),
+                                      getHostSystemName(),
+                                      getHostSystemId(),
+                                      SYSTEM_STAT_FLAG);
+       break;
+     default:
+       throw new InternalGemFireException(LocalizedStrings.HostStatHelper_UNHANDLED_OSCODE_0_HOSTSTATHELPERNEWSYSTEM.toLocalizedString(Integer.valueOf(osCode)));
+     }
+     if (stats instanceof LocalStatisticsImpl) {
+       refreshSystem((LocalStatisticsImpl)stats);
+     } // otherwise its a Dummy implementation so do nothing
+   }
+ 
+   /**
+    * @return this machine's fully qualified hostname 
+    *         or "unknownHostName" if one cannot be found.
+    */
+   private static String getHostSystemName() {
+     String hostname = "unknownHostName";
+     try {
+       InetAddress addr = SocketCreator.getLocalHost();
+       hostname = addr.getCanonicalHostName();
+     } catch (UnknownHostException uhe) {
+     }
+     return hostname;
+   }
+   
+   /** 
+    * Generate a systemid based off of the ip address of the host.
+    * This duplicates the common implementation of 
+    * <code>long gethostid(void) </code>.
+    * Punt on the ipv6 case and just use the same algorithm.
+    * @return a psuedo unique id based on the ip address
+    */
+   private static long getHostSystemId() {
+     long id = 0L;
+     try {
+       InetAddress host = SocketCreator.getLocalHost();
+       byte[] addr = host.getAddress();
+       id = (addr[1] & 0xFFL) << 24 |  
+            (addr[0] & 0xFFL) << 16 |  
+            (addr[3] & 0xFFL) << 8  |  
+            (addr[2] & 0xFFL) << 0;
+     } catch (UnknownHostException uhe) {
+     }
+     return id;
+   }
+ }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/dfbc88b2/geode-core/src/main/java/com/gemstone/gemfire/internal/statistics/HostStatSampler.java
----------------------------------------------------------------------
diff --cc geode-core/src/main/java/com/gemstone/gemfire/internal/statistics/HostStatSampler.java
index 0000000,d414d2c..d7c3419
mode 000000,100644..100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/statistics/HostStatSampler.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/statistics/HostStatSampler.java
@@@ -1,0 -1,549 +1,554 @@@
+ /*
+  * Licensed to the Apache Software Foundation (ASF) under one or more
+  * contributor license agreements.  See the NOTICE file distributed with
+  * this work for additional information regarding copyright ownership.
+  * The ASF licenses this file to You under the Apache License, Version 2.0
+  * (the "License"); you may not use this file except in compliance with
+  * the License.  You may obtain a copy of the License at
+  *
+  *      http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  */
+ package com.gemstone.gemfire.internal.statistics;
+ 
+ import com.gemstone.gemfire.CancelCriterion;
+ import com.gemstone.gemfire.CancelException;
+ import com.gemstone.gemfire.Statistics;
+ import com.gemstone.gemfire.SystemFailure;
+ import com.gemstone.gemfire.distributed.internal.DistributionConfig;
+ import com.gemstone.gemfire.internal.NanoTimer;
+ import com.gemstone.gemfire.internal.SocketCreator;
+ import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
+ import com.gemstone.gemfire.internal.logging.LogService;
+ import com.gemstone.gemfire.internal.logging.LoggingThreadGroup;
+ import com.gemstone.gemfire.internal.logging.log4j.LocalizedMessage;
+ import com.gemstone.gemfire.internal.logging.log4j.LogMarker;
++import com.gemstone.gemfire.internal.net.SocketCreator;
++import com.gemstone.gemfire.internal.statistics.CallbackSampler;
++import com.gemstone.gemfire.internal.statistics.SampleCollector;
++import com.gemstone.gemfire.internal.statistics.StatArchiveHandlerConfig;
++import com.gemstone.gemfire.internal.statistics.StatisticsSampler;
+ import com.gemstone.gemfire.internal.statistics.platform.OsStatisticsFactory;
+ import com.gemstone.gemfire.internal.util.concurrent.StoppableCountDownLatch;
+ import org.apache.logging.log4j.Logger;
+ 
+ import java.io.File;
+ import java.net.UnknownHostException;
+ import java.util.List;
+ import java.util.concurrent.TimeUnit;
+ 
+ /**
+  * HostStatSampler implements a thread which will monitor, sample, and archive
+  * statistics. It only has the common functionality that any sampler needs.
+ 
+  */
+ public abstract class HostStatSampler 
+     implements Runnable, StatisticsSampler, StatArchiveHandlerConfig {
+ 
+   private static final Logger logger = LogService.getLogger();
+ 
+   public static final String TEST_FILE_SIZE_LIMIT_IN_KB_PROPERTY = DistributionConfig.GEMFIRE_PREFIX + "stats.test.fileSizeLimitInKB";
+   public static final String OS_STATS_DISABLED_PROPERTY = "osStatsDisabled";
+ 
+   protected static final String INITIALIZATION_TIMEOUT_PROPERTY = DistributionConfig.GEMFIRE_PREFIX + "statSamplerInitializationTimeout";
+   protected static final int INITIALIZATION_TIMEOUT_DEFAULT = 30000;
+   protected static final long INITIALIZATION_TIMEOUT_MILLIS = 
+       Long.getLong(INITIALIZATION_TIMEOUT_PROPERTY, INITIALIZATION_TIMEOUT_DEFAULT);
+   
+   /** 
+    * Used to check if the sampler thread wake-up is delayed, and log a warning if it is delayed by longer than 
+    * the amount of milliseconds specified by this property. The value of 0 disables the check. 
+    */
+   private static final long STAT_SAMPLER_DELAY_THRESHOLD = Long.getLong(DistributionConfig.GEMFIRE_PREFIX + "statSamplerDelayThreshold", 3000);
+   private static final long STAT_SAMPLER_DELAY_THRESHOLD_NANOS = NanoTimer.millisToNanos(STAT_SAMPLER_DELAY_THRESHOLD);
+   
+   private static final int MIN_MS_SLEEP = 1;
+   
+   private static final int WAIT_FOR_SLEEP_INTERVAL = 10;
+   
+   private static Thread statThread = null;
+ 
+   private volatile boolean stopRequested = false;
+   
+   private final boolean osStatsDisabled = Boolean.getBoolean(OS_STATS_DISABLED_PROPERTY);
+   private final boolean fileSizeLimitInKB;
+   private final StatSamplerStats samplerStats;
+   
+   private VMStatsContract vmStats;
+   private SampleCollector sampleCollector;
+ 
+   /**
+    * Used to signal thread that are waiting for the stat sampler to be initialized.
+    */
+   private final StoppableCountDownLatch statSamplerInitializedLatch;
+ 
+   private final CancelCriterion stopper;
+ 
+   private final CallbackSampler callbackSampler;
+   
+   protected HostStatSampler(CancelCriterion stopper, 
+                             StatSamplerStats samplerStats) {
+     this.stopper = stopper;
+     this.statSamplerInitializedLatch = new StoppableCountDownLatch(this.stopper, 1);
+     this.samplerStats = samplerStats;
+     this.fileSizeLimitInKB = Boolean.getBoolean(TEST_FILE_SIZE_LIMIT_IN_KB_PROPERTY);
+     this.callbackSampler = new CallbackSampler(stopper, samplerStats);
+   }
+   
+   public final StatSamplerStats getStatSamplerStats() {
+     return this.samplerStats;
+   }
+   
+   /**
+    * Returns the number of times a statistics resource has been add or deleted.
+    */
+   @Override
+   public final int getStatisticsModCount() {
+     return getStatisticsManager().getStatListModCount();
+   }
+ 
+   /**
+    * Returns an array of all the current statistic resource instances.
+    */
+   @Override
+   public final Statistics[] getStatistics() {
+     return getStatisticsManager().getStatistics();
+   }
+ 
+   /**
+    * Returns a unique id for the sampler's system.
+    */
+   @Override
+   public final long getSystemId() {
+     return getStatisticsManager().getId();
+   }
+ 
+   /**
+    * Returns the time this sampler's system was started.
+    */
+   @Override
+   public final long getSystemStartTime() {
+     return getStatisticsManager().getStartTime();
+   }
+ 
+   /**
+    * Returns the path to this sampler's system directory; if it has one.
+    */
+   @Override
+   public final String getSystemDirectoryPath() {
+     try {
+       return SocketCreator.getHostName(SocketCreator.getLocalHost());
+     } catch (UnknownHostException ignore) {
+       return "";
+     }
+   }
+ 
+   @Override
+   public boolean waitForSample(long timeout) throws InterruptedException {
+     final long endTime = System.currentTimeMillis() + timeout;
+     final int startSampleCount = this.samplerStats.getSampleCount();
+     while (System.currentTimeMillis() < endTime && 
+         this.samplerStats.getSampleCount() <= startSampleCount) {
+       Thread.sleep(WAIT_FOR_SLEEP_INTERVAL);
+     }
+     return this.samplerStats.getSampleCount() > startSampleCount;
+   }
+ 
+   @Override
+   public SampleCollector waitForSampleCollector(long timeout) throws InterruptedException {
+     final long endTime = System.currentTimeMillis() + timeout;
+     while (System.currentTimeMillis() < endTime && 
+         this.sampleCollector == null || !this.sampleCollector.isInitialized()) {
+       Thread.sleep(WAIT_FOR_SLEEP_INTERVAL);
+     }
+     return this.sampleCollector;
+   }
+   
+   /**
+    * This service's main loop
+    */
+   @Override
+   public final void run() {
+     NanoTimer timer = new NanoTimer();
+ 
+     final boolean isDebugEnabled_STATISTICS = logger.isTraceEnabled(LogMarker.STATISTICS);
+     if (isDebugEnabled_STATISTICS) {
+       logger.trace(LogMarker.STATISTICS, "HostStatSampler started");
+     }
+     boolean latchCountedDown = false;
+     try {
+       initSpecialStats();
+       
+       this.sampleCollector = new SampleCollector(this);
+       this.sampleCollector.initialize(this, NanoTimer.getTime());
+       
+       this.statSamplerInitializedLatch.countDown();
+       latchCountedDown = true;
+ 
+       timer.reset();
+       // subtract getNanoRate from lastTS to force a quick initial sample
+       long nanosLastTimeStamp = timer.getLastResetTime() - getNanoRate();
+       while (!stopRequested()) {
+         SystemFailure.checkFailure();
+         if (Thread.currentThread().isInterrupted()) {
+           break;
+         }
+         final long nanosBeforeSleep = timer.getLastResetTime();
+         final long nanosToDelay = nanosLastTimeStamp + getNanoRate();
+         delay(timer, nanosToDelay);
+         nanosLastTimeStamp = timer.getLastResetTime();
+         if (!stopRequested() && isSamplingEnabled()) {
+           final long nanosTimeStamp = timer.getLastResetTime();
+           final long nanosElapsedSleeping = nanosTimeStamp - nanosBeforeSleep;
+           checkElapsedSleepTime(nanosElapsedSleeping);
+           if (stopRequested()) break;
+           sampleSpecialStats(false);
+           if (stopRequested()) break;
+           checkListeners();
+           if (stopRequested()) break;
+           
+           this.sampleCollector.sample(nanosTimeStamp);
+           
+           final long nanosSpentWorking = timer.reset();
+           accountForTimeSpentWorking(nanosSpentWorking, nanosElapsedSleeping);
+         } else if (!stopRequested() && !isSamplingEnabled()) {
+           sampleSpecialStats(true); // fixes bug 42527
+         }
+       }
+     } 
+     catch (InterruptedException ex) {
+       // Silently exit
+     }
+     catch (CancelException ex) {
+       // Silently exit
+     }
+     catch (RuntimeException ex) {
+       logger.fatal(LogMarker.STATISTICS, ex.getMessage(), ex);
+       throw ex;
+     } 
+     catch (VirtualMachineError err) {
+       SystemFailure.initiateFailure(err);
+       // If this ever returns, rethrow the error.  We're poisoned
+       // now, so don't let this thread continue.
+       throw err;
+     }
+     catch (Error ex) {
+       // Whenever you catch Error or Throwable, you must also
+       // catch VirtualMachineError (see above).  However, there is
+       // _still_ a possibility that you are dealing with a cascading
+       // error condition, so you also need to check to see if the JVM
+       // is still usable:
+       SystemFailure.checkFailure();
+       logger.fatal(LogMarker.STATISTICS, ex.getMessage(), ex);
+       throw ex;
+     } finally {
+       try {
+       closeSpecialStats();
+       if (this.sampleCollector != null) {
+         this.sampleCollector.close();
+       }
+       } finally {
+         if (!latchCountedDown) {
+           // Make sure the latch gets counted down since
+           // other threads wait for this to indicate that 
+           // the sampler is initialized.
+           this.statSamplerInitializedLatch.countDown();
+         }
+       }
+       if (isDebugEnabled_STATISTICS) {
+         logger.trace(LogMarker.STATISTICS, "HostStatSampler stopped");
+       }
+     }
+   }
+ 
+   /**
+    * Starts the main thread for this service.
+    * @throws IllegalStateException if an instance of the {@link #statThread} is still running from a previous DistributedSystem.
+    */
+   public final void start() {
+     synchronized(HostStatSampler.class) { 
+       if (statThread != null) {
+         try {
+           int msToWait = getSampleRate() + 100;
+           statThread.join(msToWait);
+         } catch (InterruptedException ex) {
+           Thread.currentThread().interrupt();
+         } 
+         if (statThread.isAlive()) {
+           throw new IllegalStateException(LocalizedStrings.HostStatSampler_STATISTICS_SAMPLING_THREAD_IS_ALREADY_RUNNING_INDICATING_AN_INCOMPLETE_SHUTDOWN_OF_A_PREVIOUS_CACHE.toLocalizedString());
+         }
+       }  
+       ThreadGroup group = 
+         LoggingThreadGroup.createThreadGroup("StatSampler Threads");
+ 
+       this.callbackSampler.start(getStatisticsManager(), group, getSampleRate(), TimeUnit.MILLISECONDS);
+       statThread = new Thread(group, this);
+       statThread.setName(statThread.getName() + " StatSampler");
+       statThread.setPriority(Thread.MAX_PRIORITY);
+       statThread.setDaemon(true);
+       statThread.start();
+       // fix #46310 (race between management and sampler init) by waiting for init here
+       try {
+         waitForInitialization(INITIALIZATION_TIMEOUT_MILLIS);
+       } catch (InterruptedException e) {
+         Thread.currentThread().interrupt();
+       }
+     }
+   }
+   
+   /**
+    * Tell this service's main thread to terminate.
+    */
+   public final void stop() {
+     stop(true);
+   }
+   private final void stop(boolean interruptIfAlive) {
+     synchronized (HostStatSampler.class) {
+       this.callbackSampler.stop();
+       if ( statThread == null) {
+         return; 
+       }
+ 
+       this.stopRequested = true;
+       synchronized (this) {
+         this.notifyAll();
+       }
+       try {
+         statThread.join(5000);
+       } catch (InterruptedException ignore) {
+         //It is important that we shutdown so we'll continue trying for another 2 seconds
+         try {
+           statThread.join(2000);
+         } catch (InterruptedException ex) {
+         } finally {
+           Thread.currentThread().interrupt();
+         }
+       } finally {
+         if ( statThread.isAlive() ) {
+           if (interruptIfAlive) {
+             // It is still alive so interrupt the thread
+             statThread.interrupt();
+             stop(false);
+           } else {
+             logger.warn(LogMarker.STATISTICS, LocalizedMessage.create(LocalizedStrings.HostStatSampler_HOSTSTATSAMPLER_THREAD_COULD_NOT_BE_STOPPED));
+           }
+         } else {
+           this.stopRequested = false;
+           statThread = null;
+         }
+       }
+     }
+   }
+   
+   public final boolean isAlive() {
+     synchronized (HostStatSampler.class) {
+       return statThread != null && statThread.isAlive();
+     }
+   }
+ 
+   /**
+    * Waits for the special statistics to be initialized. For tests, please
+    * use {@link #waitForInitialization(long)} instead.
+    *
+    * @see #initSpecialStats
+    * @since GemFire 3.5
+    */
+   public final void waitForInitialization() throws InterruptedException {
+     this.statSamplerInitializedLatch.await();
+   }
+   
+   /**
+    * Waits for the special statistics to be initialized. This overridden
+    * version of {@link #waitForInitialization()} should always be used
+    * within tests.
+    *
+    * @see #initSpecialStats
+    * @since GemFire 7.0
+    */
+   public final boolean waitForInitialization(long ms) throws InterruptedException {
+     return this.statSamplerInitializedLatch.await(ms);
+   }
+   
+   public final void changeArchive(File newFile) {
+     this.sampleCollector.changeArchive(newFile, NanoTimer.getTime());
+   }
+   
+   /**
+    * Returns the <code>VMStatsContract</code> for this VM.
+    *
+    * @since GemFire 3.5
+    */
+   public final VMStatsContract getVMStats() {
+     return this.vmStats;
+   }
+ 
+   @Override
+   public String toString() {
+     final StringBuilder sb = new StringBuilder(getClass().getName());
+     sb.append("@").append(System.identityHashCode(this));
+     return sb.toString();
+   }
+ 
+   protected abstract void checkListeners();
+ 
+   /**
+    * Gets the sample rate in milliseconds
+    */
+   protected abstract int getSampleRate();
+   
+   /**
+    * Returns true if sampling is enabled.
+    */
+   public abstract boolean isSamplingEnabled();
+   
+   /**
+    * Returns the statistics manager using this sampler.
+    */
+   protected abstract StatisticsManager getStatisticsManager();
+ 
+   protected OsStatisticsFactory getOsStatisticsFactory() {
+     return null;
+   }
+   
+   protected void initProcessStats(long id) {
+     // do nothing by default
+   }
+   
+   protected void sampleProcessStats(boolean prepareOnly) {
+     // do nothing by default
+   }
+   
+   protected void closeProcessStats() {
+     // do nothing by default
+   }
+ 
+   protected long getSpecialStatsId() {
+     return getStatisticsManager().getId();
+   }
+   
+   protected final boolean fileSizeLimitInKB() {
+     return this.fileSizeLimitInKB;
+   }
+   
+   protected final boolean osStatsDisabled() {
+     return this.osStatsDisabled;
+   }
+   
+   protected final boolean stopRequested() {
+     return stopper.isCancelInProgress() || this.stopRequested;
+   }
+ 
+   public final SampleCollector getSampleCollector() {
+     return this.sampleCollector;
+   }
+   
+   /**
+    * Initialize any special sampler stats
+    */
+   private synchronized void initSpecialStats() {
+     // add a vm resource
+     long id = getSpecialStatsId();
+     this.vmStats = VMStatsContractFactory.create(getStatisticsManager(), id);
+     initProcessStats(id);
+   }
+ 
+   /**
+    * Closes down anything initialied by initSpecialStats.
+    */
+   private synchronized void closeSpecialStats() {
+     if (this.vmStats != null) {
+       this.vmStats.close();
+     }
+     closeProcessStats();
+   }
+   
+   /**
+    * Called when this sampler has spent some time working and wants
+    * it to be accounted for.
+    */
+   private void accountForTimeSpentWorking(long nanosSpentWorking, 
+                                           long nanosSpentSleeping) {
+     this.samplerStats.tookSample(
+         nanosSpentWorking, getStatisticsManager().getStatisticsCount(), nanosSpentSleeping);
+   }
+   
+   /**
+    * @param timer a NanoTimer used to compute the elapsed delay
+    * @param nanosToDelay the timestamp to delay until it is the current time
+    */
+   private void delay(NanoTimer timer, final long nanosToDelay) throws InterruptedException {
+     timer.reset();
+     long now = timer.getLastResetTime();
+     long remainingNanos = nanosToDelay - now;
+     if (remainingNanos <= 0) {
+       remainingNanos = NanoTimer.millisToNanos(MIN_MS_SLEEP);
+     }
+     while (remainingNanos > 0 && !stopRequested()) {
+       long ms = NanoTimer.nanosToMillis(remainingNanos);
+       if (ms <= 0) {
+         Thread.yield();
+       } else {
+         if (ms > MIN_MS_SLEEP) {
+           ms -= MIN_MS_SLEEP;
+         }
+         synchronized (this) {
+           if (stopRequested()) {
+             // check stopRequested inside the sync to prevent a race in which the wait misses the stopper's notify.
+             return;
+           }
+           this.wait(ms); // spurious wakeup ok
+         }
+       }
+       timer.reset();
+       now = timer.getLastResetTime();
+       remainingNanos = nanosToDelay - now;
+     }
+   }
+   
+   private long getNanoRate() {
+     return NanoTimer.millisToNanos(getSampleRate());
+   }
+   
+   /**
+    * Collect samples of any operating system statistics
+    * 
+    * @param prepareOnly
+    *          set to true if you only want to call prepareForSample
+    */
+   private void sampleSpecialStats(boolean prepareOnly) {
+     List<Statistics> statsList = getStatisticsManager().getStatsList();
+     for (Statistics s : statsList) {
+       if (stopRequested()) return;
+       if (s instanceof StatisticsImpl) {
+         ((StatisticsImpl)s).prepareForSample();
+       }
+     }
+ 
+     if (!prepareOnly && this.vmStats != null) {
+       if (stopRequested()) return;
+       this.vmStats.refresh();
+     }
+     sampleProcessStats(prepareOnly);
+   }
+ 
+   /**
+    * Check the elapsed sleep time upon wakeup, and log a warning if it is longer than the delay
+    * threshold.
+    * 
+    * @param elapsedSleepTime duration of sleep in nanoseconds
+    */
+   private void checkElapsedSleepTime(long elapsedSleepTime) {
+     if (STAT_SAMPLER_DELAY_THRESHOLD > 0) {
+       final long wakeupDelay = elapsedSleepTime - getNanoRate();
+       if (wakeupDelay > STAT_SAMPLER_DELAY_THRESHOLD_NANOS) {
+         this.samplerStats.incJvmPauses();
+         logger.warn(LogMarker.STATISTICS, LocalizedMessage.create(LocalizedStrings.HostStatSampler_STATISTICS_SAMPLING_THREAD_DETECTED_A_WAKEUP_DELAY_OF_0_MS_INDICATING_A_POSSIBLE_RESOURCE_ISSUE, NanoTimer.nanosToMillis(wakeupDelay)));
+       }
+     }
+   }
+ }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/dfbc88b2/geode-core/src/main/java/com/gemstone/gemfire/internal/statistics/StatArchiveWriter.java
----------------------------------------------------------------------
diff --cc geode-core/src/main/java/com/gemstone/gemfire/internal/statistics/StatArchiveWriter.java
index 0000000,027bde1..ef3a91a
mode 000000,100644..100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/statistics/StatArchiveWriter.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/statistics/StatArchiveWriter.java
@@@ -1,0 -1,732 +1,737 @@@
+ /*
+  * Licensed to the Apache Software Foundation (ASF) under one or more
+  * contributor license agreements.  See the NOTICE file distributed with
+  * this work for additional information regarding copyright ownership.
+  * The ASF licenses this file to You under the Apache License, Version 2.0
+  * (the "License"); you may not use this file except in compliance with
+  * the License.  You may obtain a copy of the License at
+  *
+  *      http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  */
+ package com.gemstone.gemfire.internal.statistics;
+ 
+ import com.gemstone.gemfire.GemFireIOException;
+ import com.gemstone.gemfire.InternalGemFireException;
+ import com.gemstone.gemfire.StatisticDescriptor;
+ import com.gemstone.gemfire.distributed.internal.DistributionConfig;
+ import com.gemstone.gemfire.internal.NanoTimer;
+ import com.gemstone.gemfire.internal.SocketCreator;
+ import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
+ import com.gemstone.gemfire.internal.logging.LogService;
+ import com.gemstone.gemfire.internal.logging.log4j.LogMarker;
++import com.gemstone.gemfire.internal.net.SocketCreator;
++import com.gemstone.gemfire.internal.statistics.ResourceInstance;
++import com.gemstone.gemfire.internal.statistics.ResourceType;
++import com.gemstone.gemfire.internal.statistics.SampleHandler;
++import com.gemstone.gemfire.internal.statistics.StatArchiveDescriptor;
+ 
+ import org.apache.logging.log4j.Logger;
+ 
+ import java.io.*;
+ import java.net.UnknownHostException;
+ import java.util.*;
+ import java.util.zip.GZIPOutputStream;
+ 
+ /**
+  * StatArchiveWriter provides APIs to write statistic snapshots to an archive
+  * file.
+  *
+  */
+ public class StatArchiveWriter implements StatArchiveFormat, SampleHandler {
+ 
+   private static final Logger logger = LogService.getLogger();
+   
+   private static volatile String traceStatisticsName = null;
+   private static volatile String traceStatisticsTypeName = null;
+   private static volatile int traceResourceInstId = -1;
+ 
+   private final boolean trace = Boolean.getBoolean(DistributionConfig.GEMFIRE_PREFIX + "stats.debug.traceStatArchiveWriter");
+   
+   private final Set<ResourceInstance> sampleWrittenForResources = 
+       new HashSet<ResourceInstance>();
+   private final Set<ResourceInstance> addedResources = 
+       new HashSet<ResourceInstance>();
+   private final StatArchiveDescriptor archiveDescriptor;
+   private long initialDate;
+   private final OutputStream outStream;
+   private final MyDataOutputStream dataOut;
+   private final OutputStream traceOutStream;
+   private final PrintStream traceDataOut;
+   private long previousMillisTimeStamp;
+   private int sampleCount;
+   
+   /**
+    * Opens a StatArchiveWriter that will archive to the specified file.
+    * @throws GemFireIOException if <code>archiveName</code> can not be written to
+    */
+   public StatArchiveWriter(StatArchiveDescriptor archiveDescriptor) {
+     this.archiveDescriptor = archiveDescriptor;
+     
+     if (archiveDescriptor.getArchiveName().endsWith(".gz")) {
+       try {
+         this.outStream = new GZIPOutputStream(new FileOutputStream(archiveDescriptor.getArchiveName()), 32768);
+       } catch (IOException ex) {
+         throw new GemFireIOException(LocalizedStrings.StatArchiveWriter_COULD_NOT_OPEN_0.toLocalizedString(archiveDescriptor.getArchiveName()), ex);
+       }
+     } else {
+       try {
+         this.outStream = new BufferedOutputStream(new FileOutputStream(archiveDescriptor.getArchiveName()), 32768);
+       } catch (IOException ex) {
+         throw new GemFireIOException(LocalizedStrings.StatArchiveWriter_COULD_NOT_OPEN_0.toLocalizedString(archiveDescriptor.getArchiveName()), ex);
+       }
+     }
+ 
+     this.dataOut = new MyDataOutputStream(this.outStream);
+     
+     if (this.trace) {
+       String traceFileName = archiveDescriptor.getArchiveName() + ".trace";
+       try {
+         this.traceOutStream = new BufferedOutputStream(new FileOutputStream(traceFileName), 32768);
+       } catch (IOException ex) {
+         throw new GemFireIOException("Could not open " + traceFileName, ex);
+       }
+       this.traceDataOut = new PrintStream(this.traceOutStream);
+     } else {
+       this.traceOutStream = null;
+       this.traceDataOut = null;
+     }
+   }
+ 
+   public String getArchiveName() {
+     return this.archiveDescriptor.getArchiveName();
+   }
+   
+   public void initialize(long nanosTimeStamp) {
+     this.previousMillisTimeStamp = initPreviousMillisTimeStamp(nanosTimeStamp);
+     this.initialDate = initInitialDate();
+     writeHeader(this.initialDate, this.archiveDescriptor);
+   }
+ 
+   @Override
+   public String toString() {
+     final StringBuilder sb = new StringBuilder(getClass().getName());
+     sb.append("@").append(System.identityHashCode(this)).append("{");
+     sb.append("archiveName=").append(this.archiveDescriptor.getArchiveName());
+     sb.append("productDescription=").append(this.archiveDescriptor.getProductDescription());
+     sb.append("systemDirectoryPath=").append(this.archiveDescriptor.getSystemDirectoryPath());
+     sb.append("systemId=").append(this.archiveDescriptor.getSystemId());
+     sb.append("systemStartTime=").append(this.archiveDescriptor.getSystemStartTime());
+     sb.append("previousMillisTimeStamp=").append(this.previousMillisTimeStamp);
+     sb.append("initialDate=").append(this.initialDate);
+     return sb.toString();
+   }
+   
+   /**
+    * Closes the statArchiver by flushing its data to disk a closing its output stream.
+    * @throws GemFireIOException if the archive file could not be closed.
+    */
+   public final void close() {
+     try {
+       this.dataOut.flush();
+       if (this.trace) {
+         this.traceDataOut.flush();
+       }
+     } catch (IOException ignore) {
+     }
+     try {
+       outStream.close();
+       if (this.trace) {
+         this.traceOutStream.close();
+       }
+     } catch (IOException ex) {
+       throw new GemFireIOException(LocalizedStrings.StatArchiveWriter_COULD_NOT_CLOSE_STATARCHIVER_FILE.toLocalizedString(), ex);
+     }
+     if (getSampleCount() == 0) {
+       // If we are closing an empty file go ahead and delete it.
+       // This prevents the fix for 46917 from leaving a bunch of
+       // empty gfs files around.
+       deleteFileIfPossible(new File(getArchiveName()));
+     }
+   }
+   
+   @edu.umd.cs.findbugs.annotations.SuppressWarnings(value="RV_RETURN_VALUE_IGNORED_BAD_PRACTICE", justification="Best effort attempt to delete a GFS file without any samples.") 
+   private static void deleteFileIfPossible(File file) {
+     file.delete();
+   }
+ 
+   /**
+    * Returns the number of bytes written so far to this archive.
+    * This does not take compression into account.
+    */
+   public final long bytesWritten() {
+     return this.dataOut.getBytesWritten();
+   }
+ 
+   protected long initPreviousMillisTimeStamp(long nanosTimeStamp) {
+     return NanoTimer.nanosToMillis(nanosTimeStamp);
+   }
+   
+   protected long initInitialDate() {
+     return System.currentTimeMillis();
+   }
+   
+   protected TimeZone getTimeZone() {
+     return Calendar.getInstance().getTimeZone();
+   }
+   
+   protected String getOSInfo() {
+     return System.getProperty("os.name") + " " + System.getProperty("os.version");
+   }
+   
+   protected String getMachineInfo() {
+     String machineInfo = System.getProperty("os.arch");
+     try {
+       String hostName = SocketCreator.getHostName(SocketCreator.getLocalHost());
+       machineInfo += " " + hostName;
+     } catch (UnknownHostException ignore) {
+     }
+     return machineInfo;
+   }
+   
+   private void writeHeader(long initialDate, StatArchiveDescriptor archiveDescriptor) {
+     if (logger.isTraceEnabled(LogMarker.STATISTICS)) {
+       logger.trace(LogMarker.STATISTICS, "StatArchiveWriter#writeHeader initialDate={} archiveDescriptor={}", initialDate, archiveDescriptor);
+     }
+     try {
+       this.dataOut.writeByte(HEADER_TOKEN);
+       this.dataOut.writeByte(ARCHIVE_VERSION);
+       this.dataOut.writeLong(initialDate);
+       this.dataOut.writeLong(archiveDescriptor.getSystemId());
+       this.dataOut.writeLong(archiveDescriptor.getSystemStartTime());
+       TimeZone timeZone = getTimeZone();
+       this.dataOut.writeInt(timeZone.getRawOffset());
+       this.dataOut.writeUTF(timeZone.getID());
+       this.dataOut.writeUTF(archiveDescriptor.getSystemDirectoryPath());
+       this.dataOut.writeUTF(archiveDescriptor.getProductDescription());
+       this.dataOut.writeUTF(getOSInfo());
+       this.dataOut.writeUTF(getMachineInfo());
+       
+       if (this.trace) {
+         this.traceDataOut.println("writeHeader traceStatisticsName: " + traceStatisticsName);
+         this.traceDataOut.println("writeHeader traceStatisticsTypeName: " + traceStatisticsTypeName);
+         this.traceDataOut.println("writeHeader#writeByte HEADER_TOKEN: " + HEADER_TOKEN);
+         this.traceDataOut.println("writeHeader#writeByte ARCHIVE_VERSION: " + ARCHIVE_VERSION);
+         this.traceDataOut.println("writeHeader#writeLong initialDate: " + initialDate);
+         this.traceDataOut.println("writeHeader#writeLong archiveDescriptor.getSystemId(): " + archiveDescriptor.getSystemId());
+         this.traceDataOut.println("writeHeader#writeLong archiveDescriptor.getSystemStartTime(): " + archiveDescriptor.getSystemStartTime());
+         this.traceDataOut.println("writeHeader#writeInt timeZone.getRawOffset(): " + timeZone.getRawOffset());
+         this.traceDataOut.println("writeHeader#writeUTF timeZone.getID(): " + timeZone.getID());
+         this.traceDataOut.println("writeHeader#writeUTF archiveDescriptor.getSystemDirectoryPath(): " + archiveDescriptor.getSystemDirectoryPath());
+         this.traceDataOut.println("writeHeader#writeUTF archiveDescriptor.getProductDescription(): " + archiveDescriptor.getProductDescription());
+         this.traceDataOut.println("writeHeader#writeUTF getOSInfo(): " + getOSInfo());
+         this.traceDataOut.println("writeHeader#writeUTF getMachineInfo(): " + getMachineInfo());
+       }
+     } catch (IOException ex) {
+       throw new GemFireIOException(LocalizedStrings.StatArchiveWriter_FAILED_WRITING_HEADER_TO_STATISTIC_ARCHIVE.toLocalizedString(), ex);
+     }
+   }
+ 
+   public void allocatedResourceType(ResourceType resourceType) {
+     if (logger.isTraceEnabled(LogMarker.STATISTICS)) {
+       logger.trace(LogMarker.STATISTICS, "StatArchiveWriter#allocatedResourceType resourceType={}", resourceType);
+     }
+     if (resourceType.getStatisticDescriptors().length >= ILLEGAL_STAT_OFFSET) {
+       throw new InternalGemFireException(LocalizedStrings.StatArchiveWriter_COULD_NOT_ARCHIVE_TYPE_0_BECAUSE_IT_HAD_MORE_THAN_1_STATISTICS.toLocalizedString(new Object[] {resourceType.getStatisticsType().getName(), Integer.valueOf(ILLEGAL_STAT_OFFSET-1)}));
+     }
+     // write the type to the archive
+     try {
+       this.dataOut.writeByte(RESOURCE_TYPE_TOKEN);
+       this.dataOut.writeInt(resourceType.getId());
+       this.dataOut.writeUTF(resourceType.getStatisticsType().getName());
+       this.dataOut.writeUTF(resourceType.getStatisticsType().getDescription());
+       StatisticDescriptor[] stats = resourceType.getStatisticDescriptors();
+       this.dataOut.writeShort(stats.length);
+       if (this.trace && (traceStatisticsTypeName == null || traceStatisticsTypeName.equals(resourceType.getStatisticsType().getName()))) {
+         this.traceDataOut.println("allocatedResourceType#writeByte RESOURCE_TYPE_TOKEN: " + RESOURCE_TYPE_TOKEN);
+         this.traceDataOut.println("allocatedResourceType#writeInt resourceType.getId(): " + resourceType.getId());
+         this.traceDataOut.println("allocatedResourceType#writeUTF resourceType.getStatisticsType().getName(): " + resourceType.getStatisticsType().getName());
+         this.traceDataOut.println("allocatedResourceType#writeUTF resourceType.getStatisticsType().getDescription(): " + resourceType.getStatisticsType().getDescription());
+         this.traceDataOut.println("allocatedResourceType#writeShort stats.length: " + stats.length);
+       }
+       for (int i=0; i < stats.length; i++) {
+         this.dataOut.writeUTF(stats[i].getName());
+         this.dataOut.writeByte(((StatisticDescriptorImpl)stats[i]).getTypeCode());
+         this.dataOut.writeBoolean(stats[i].isCounter());
+         this.dataOut.writeBoolean(stats[i].isLargerBetter());
+         this.dataOut.writeUTF(stats[i].getUnit());
+         this.dataOut.writeUTF(stats[i].getDescription());
+         if (this.trace && (traceStatisticsTypeName == null || traceStatisticsTypeName.equals(resourceType.getStatisticsType().getName()))) {
+           this.traceDataOut.println("allocatedResourceType#writeUTF stats[i].getName(): " + stats[i].getName());
+           this.traceDataOut.println("allocatedResourceType#writeByte ((StatisticDescriptorImpl)stats[i]).getTypeCode(): " + ((StatisticDescriptorImpl)stats[i]).getTypeCode());
+           this.traceDataOut.println("allocatedResourceType#writeBoolean stats[i].isCounter(): " + stats[i].isCounter());
+           this.traceDataOut.println("allocatedResourceType#writeBoolean stats[i].isLargerBetter(): " + stats[i].isLargerBetter());
+           this.traceDataOut.println("allocatedResourceType#writeUTF stats[i].getUnit(): " + stats[i].getUnit());
+           this.traceDataOut.println("allocatedResourceType#writeUTF stats[i].getDescription(): " + stats[i].getDescription());
+         }
+       }
+     } catch (IOException ex) {
+       throw new GemFireIOException(LocalizedStrings.StatArchiveWriter_FAILED_WRITING_NEW_RESOURCE_TYPE_TO_STATISTIC_ARCHIVE.toLocalizedString(), ex);
+     }
+   }
+   
+   @edu.umd.cs.findbugs.annotations.SuppressWarnings(value="ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD", justification="This is only for debugging and there is never more than one instance being traced because there is only one stat sampler.") 
+   public void allocatedResourceInstance(ResourceInstance statResource) {
+     if (logger.isTraceEnabled(LogMarker.STATISTICS)) {
+       logger.trace(LogMarker.STATISTICS, "StatArchiveWriter#allocatedResourceInstance statResource={}", statResource);
+     }
+     if (statResource.getResourceType().getStatisticDescriptors().length >= ILLEGAL_STAT_OFFSET) {
+       throw new InternalGemFireException(LocalizedStrings.StatArchiveWriter_COULD_NOT_ARCHIVE_TYPE_0_BECAUSE_IT_HAD_MORE_THAN_1_STATISTICS.toLocalizedString(new Object[] {statResource.getResourceType().getStatisticsType().getName(), Integer.valueOf(ILLEGAL_STAT_OFFSET-1)}));
+     }
+     if (statResource.getStatistics().isClosed()) {
+       return;
+     }
+     this.addedResources.add(statResource);
+     try {
+       this.dataOut.writeByte(RESOURCE_INSTANCE_CREATE_TOKEN);
+       this.dataOut.writeInt(statResource.getId());
+       this.dataOut.writeUTF(statResource.getStatistics().getTextId());
+       this.dataOut.writeLong(statResource.getStatistics().getNumericId());
+       this.dataOut.writeInt(statResource.getResourceType().getId());
+       if (this.trace && (traceStatisticsName == null || traceStatisticsName.equals(statResource.getStatistics().getTextId())) && (traceStatisticsTypeName == null || traceStatisticsTypeName.equals(statResource.getResourceType().getStatisticsType().getName()))) {
+         traceResourceInstId = statResource.getId();
+         this.traceDataOut.println("writeHeader traceResourceInstId: " + traceResourceInstId);
+         this.traceDataOut.println("allocatedResourceInstance#writeByte RESOURCE_INSTANCE_CREATE_TOKEN: " + RESOURCE_INSTANCE_CREATE_TOKEN);
+         this.traceDataOut.println("allocatedResourceInstance#writeInt statResource.getId(): " + statResource.getId());
+         this.traceDataOut.println("allocatedResourceInstance#writeUTF statResource.getStatistics().getTextId(): " + statResource.getStatistics().getTextId());
+         this.traceDataOut.println("allocatedResourceInstance#writeLong statResource.getStatistics().getNumericId(): " + statResource.getStatistics().getNumericId());
+         this.traceDataOut.println("allocatedResourceInstance#writeInt statResource.getResourceType().getId(): " + statResource.getResourceType().getId());
+       }
+     } catch (IOException ex) {
+       throw new GemFireIOException(LocalizedStrings.StatArchiveWriter_FAILED_WRITING_NEW_RESOURCE_INSTANCE_TO_STATISTIC_ARCHIVE.toLocalizedString(), ex);
+     }
+   }
+   
+   public void destroyedResourceInstance(ResourceInstance resourceInstance) {
+     if (logger.isTraceEnabled(LogMarker.STATISTICS)) {
+       logger.trace(LogMarker.STATISTICS, "StatArchiveWriter#destroyedResourceInstance resourceInstance={}", resourceInstance);
+     }
+     if (!this.addedResources.contains(resourceInstance)) {    // Fix for bug #45377
+       return;
+     }
+ 
+     this.sampleWrittenForResources.remove(resourceInstance);
+     this.addedResources.remove(resourceInstance);
+ 
+     try {
+       this.dataOut.writeByte(RESOURCE_INSTANCE_DELETE_TOKEN);
+       this.dataOut.writeInt(resourceInstance.getId());
+       if (this.trace && (traceStatisticsName == null || traceStatisticsName.equals(resourceInstance.getStatistics().getTextId())) && (traceStatisticsTypeName == null || traceStatisticsTypeName.equals(resourceInstance.getResourceType().getStatisticsType().getName()))) {
+         this.traceDataOut.println("destroyedResourceInstance#writeByte RESOURCE_INSTANCE_DELETE_TOKEN: " + RESOURCE_INSTANCE_DELETE_TOKEN);
+         this.traceDataOut.println("destroyedResourceInstance#writeInt resourceInstance.getId(): " + resourceInstance.getId());
+       }
+     } catch (IOException ex) {
+       throw new GemFireIOException(LocalizedStrings.StatArchiveWriter_FAILED_WRITING_DELETE_RESOURCE_INSTANCE_TO_STATISTIC_ARCHIVE.toLocalizedString(), ex);
+     }
+   }
+   
+   static long calcDelta(long previousMillis, long currentMillis) {
+     long delta = currentMillis - previousMillis;
+     if (delta <= 0) {
+       throw new IllegalArgumentException("Sample timestamp must be greater than previous timestamp (millisTimeStamp is " + currentMillis + ", previousMillis is " + previousMillis + " and delta is " + delta + ").");
+     }
+     return delta;
+   }
+   
+   private void writeTimeStamp(long nanosTimeStamp) throws IOException {
+     final long millisTimeStamp = NanoTimer.nanosToMillis(nanosTimeStamp);
+     final long delta = calcDelta(this.previousMillisTimeStamp, millisTimeStamp);
+     if (logger.isTraceEnabled(LogMarker.STATISTICS)) {
+       logger.trace(LogMarker.STATISTICS, "StatArchiveWriter#writeTimeStamp millisTimeStamp={}, delta={}", millisTimeStamp, (int)delta);
+     }
+     if (delta > MAX_SHORT_TIMESTAMP) {
+       if (delta > Integer.MAX_VALUE) {
+         throw new InternalGemFireException(LocalizedStrings.StatArchiveWriter_TIMESTAMP_DELTA_0_WAS_GREATER_THAN_1.toLocalizedString(new Object[] {Long.valueOf(delta), Integer.valueOf(Integer.MAX_VALUE)}));
+       }
+       this.dataOut.writeShort(INT_TIMESTAMP_TOKEN);
+       this.dataOut.writeInt((int)delta);
+       if (this.trace) {
+         this.traceDataOut.println("writeTimeStamp#writeShort INT_TIMESTAMP_TOKEN: " + INT_TIMESTAMP_TOKEN);
+         this.traceDataOut.println("writeTimeStamp#writeInt (int)delta: " + (int)delta);
+       }
+     } else {
+       this.dataOut.writeShort((int)delta);
+       if (this.trace) {
+         this.traceDataOut.println("writeTimeStamp#writeShort (int)delta: " + (int)delta);
+       }
+     }
+     this.previousMillisTimeStamp = millisTimeStamp;
+   }
+ 
+   /**
+    * Writes the resource instance id to the <code>dataOut</code> stream.
+    */
+   private void writeResourceInst(int instId) throws IOException {
+     if (logger.isTraceEnabled(LogMarker.STATISTICS)) {
+       logger.trace(LogMarker.STATISTICS, "StatArchiveWriter#writeResourceInst instId={}", instId);
+     }
+     if (instId > MAX_BYTE_RESOURCE_INST_ID) {
+       if (instId > MAX_SHORT_RESOURCE_INST_ID) {
+         this.dataOut.writeByte(INT_RESOURCE_INST_ID_TOKEN);
+         this.dataOut.writeInt(instId);
+         if (this.trace && (traceResourceInstId == -1 || traceResourceInstId == instId)) {
+           this.traceDataOut.println("writeResourceInst#writeByte INT_RESOURCE_INST_ID_TOKEN: " + INT_RESOURCE_INST_ID_TOKEN);
+           if (instId == ILLEGAL_RESOURCE_INST_ID) {
+             this.traceDataOut.println("writeResourceInst#writeInt ILLEGAL_RESOURCE_INST_ID: " + ILLEGAL_RESOURCE_INST_ID);
+           } else {
+             this.traceDataOut.println("writeResourceInst#writeInt instId: " + instId);
+           }
+         }
+       } else {
+         this.dataOut.writeByte(SHORT_RESOURCE_INST_ID_TOKEN);
+         this.dataOut.writeShort(instId);
+         if (this.trace && (traceResourceInstId == -1 || traceResourceInstId == instId)) {
+           this.traceDataOut.println("writeResourceInst#writeByte SHORT_RESOURCE_INST_ID_TOKEN: " + SHORT_RESOURCE_INST_ID_TOKEN);
+           if (instId == ILLEGAL_RESOURCE_INST_ID) {
+             this.traceDataOut.println("writeResourceInst#writeShort ILLEGAL_RESOURCE_INST_ID: " + ILLEGAL_RESOURCE_INST_ID);
+           } else {
+             this.traceDataOut.println("writeResourceInst#writeShort instId: " + instId);
+           }
+         }
+       }
+     } else {
+       this.dataOut.writeByte(instId);
+       if (this.trace && (traceResourceInstId == -1 || traceResourceInstId == instId)) {
+         if (instId == ILLEGAL_RESOURCE_INST_ID) {
+           this.traceDataOut.println("writeResourceInst#writeByte ILLEGAL_RESOURCE_INST_ID: " + ILLEGAL_RESOURCE_INST_ID);
+         } else {
+           this.traceDataOut.println("writeResourceInst#writeByte instId: " + instId);
+         }
+       }
+     }
+   }
+ 
+   public void sampled(long nanosTimeStamp, List<ResourceInstance> resourceInstances) {
+     if (logger.isTraceEnabled(LogMarker.STATISTICS)) {
+       logger.trace(LogMarker.STATISTICS, "StatArchiveWriter#sampled nanosTimeStamp={}, resourceInstances={}", nanosTimeStamp, resourceInstances);
+     }
+     try {
+       this.dataOut.writeByte(SAMPLE_TOKEN);
+       if (this.trace) {
+         this.traceDataOut.println("sampled#writeByte SAMPLE_TOKEN: " + SAMPLE_TOKEN);
+       }
+       writeTimeStamp(nanosTimeStamp);
+       for (ResourceInstance ri : resourceInstances) {
+         writeSample(ri);
+       }
+       writeResourceInst(ILLEGAL_RESOURCE_INST_ID);
+       this.dataOut.flush();
+       if (this.trace) {
+         this.traceDataOut.flush();
+       }
+     } catch (IOException ex) {
+       throw new GemFireIOException(LocalizedStrings.StatArchiveWriter_FAILED_WRITING_SAMPLE_TO_STATISTIC_ARCHIVE.toLocalizedString(), ex);
+     }
+     this.sampleCount++; // only inc after sample done w/o an exception thrown
+   }
+   
+   public int getSampleCount() {
+     return this.sampleCount;
+   }
+   
+   private void writeSample(ResourceInstance ri) throws IOException {
+     final boolean isDebugEnabled_STATISTICS = logger.isTraceEnabled(LogMarker.STATISTICS);
+     if (isDebugEnabled_STATISTICS) {
+       logger.trace(LogMarker.STATISTICS, "StatArchiveWriter#writeSample ri={}", ri);
+     }
+     if (this.trace && (traceStatisticsName == null || traceStatisticsName.equals(ri.getStatistics().getTextId())) && (traceStatisticsTypeName == null || traceStatisticsTypeName.equals(ri.getResourceType().getStatisticsType().getName()))) {
+       this.traceDataOut.println("writeSample#writeSample for ri=" + ri);
+     }
+     if (ri.getStatistics().isClosed()) {
+       return;
+     }
+     StatisticDescriptor[] stats = ri.getResourceType().getStatisticDescriptors();
+     if (stats.length > 254) {
+       throw new Error("StatisticsType " + ri.getResourceType().getStatisticsType().getName() + " has too many stats: " + stats.length);
+     }
+     boolean wroteInstId = false;
+     boolean checkForChange = true;
+     
+     if (!this.sampleWrittenForResources.contains(ri)) {
+       // first time for this instance so all values need to be written
+       checkForChange = false;
+       this.sampleWrittenForResources.add(ri);
+     }
+     
+     long[] previousStatValues = ri.getPreviousStatValues();
+     if (isDebugEnabled_STATISTICS) {
+       logger.trace(LogMarker.STATISTICS, "StatArchiveWriter#writeSample checkForChange={}, previousStatValues={}, stats.length={}",
+           checkForChange, Arrays.toString(previousStatValues), stats.length);
+     }
+     if (previousStatValues == null) {
+       previousStatValues = new long[stats.length];
+       ri.setPreviousStatValues(previousStatValues);
+     }
+     
+     int statsWritten = 0;
+     try {
+       for (int i=0; i < stats.length; i++) {
+         long value = ri.getLatestStatValues()[i];
+         if (!checkForChange || value != previousStatValues[i]) {
+           long delta = checkForChange ? value - previousStatValues[i] : value;
+           if (!wroteInstId) {
+             wroteInstId = true;
+             writeResourceInst(ri.getId());
+           }
+           this.dataOut.writeByte(i);
+           if (this.trace && (traceStatisticsName == null || traceStatisticsName.equals(ri.getStatistics().getTextId())) && (traceStatisticsTypeName == null || traceStatisticsTypeName.equals(ri.getResourceType().getStatisticsType().getName()))) {
+             this.traceDataOut.println("writeSample#writeByte i: " + i);
+           }
+           if (isDebugEnabled_STATISTICS) {
+             logger.trace(LogMarker.STATISTICS, "StatArchiveWriter#writeStatValue stats[{}]={}, delta={}", i, stats[i], delta);
+           }
+           writeStatValue(stats[i], delta, this.dataOut);
+           if (this.trace && (traceStatisticsName == null || traceStatisticsName.equals(ri.getStatistics().getTextId())) && (traceStatisticsTypeName == null || traceStatisticsTypeName.equals(ri.getResourceType().getStatisticsType().getName()))) {
+             byte typeCode = ((StatisticDescriptorImpl)stats[i]).getTypeCode();
+             switch(typeCode) {
+             case BYTE_CODE:
+               this.traceDataOut.println("writeStatValue#writeByte " + typeCodeToString(typeCode) + " delta: " + delta);
+               break;
+             case SHORT_CODE:
+               this.traceDataOut.println("writeStatValue#writeShort" + typeCodeToString(typeCode) + " delta: " + delta);
+               break;
+             case INT_CODE:
+             case FLOAT_CODE:
+             case LONG_CODE:
+             case DOUBLE_CODE:
+               this.traceDataOut.println("writeStatValue#writeCompactValue " + typeCodeToString(typeCode) + " delta: " + delta);
+               break;
+             default:
+             }
+           }
+         }
+       }
+     } catch (IllegalStateException closedEx) {
+       // resource was closed causing getStatValue to throw this exception
+     }
+     
+     if (wroteInstId) {
+       this.dataOut.writeByte(ILLEGAL_STAT_OFFSET);
+       if (this.trace && (traceStatisticsName == null
+           || traceStatisticsName.equals(ri.getStatistics().getTextId()))
+           && (traceStatisticsTypeName == null
+           || traceStatisticsTypeName.equals(ri.getResourceType().getStatisticsType().getName()))) {
+         this.traceDataOut.println("writeSample#writeByte ILLEGAL_STAT_OFFSET: " + ILLEGAL_STAT_OFFSET);
+       }
+     }
+     if (isDebugEnabled_STATISTICS) {
+       logger.trace(LogMarker.STATISTICS, "StatArchiveWriter#writeSample statsWritten={}", statsWritten);
+     }
+   }
+   
+   public static void writeCompactValue(long v, DataOutput dataOut) throws IOException {
+     if (v <= MAX_1BYTE_COMPACT_VALUE && v >= MIN_1BYTE_COMPACT_VALUE) {
+       dataOut.writeByte((int)v);
+     } else if (v <= MAX_2BYTE_COMPACT_VALUE && v >= MIN_2BYTE_COMPACT_VALUE) {
+       dataOut.writeByte(COMPACT_VALUE_2_TOKEN);
+       dataOut.writeShort((int)v);
+     } else {
+       byte[] buffer = new byte[8];
+       int idx = 0;
+       long originalValue = v;
+       if (v < 0) {
+         while (v != -1 && v != 0) {
+           buffer[idx++] = (byte)(v & 0xFF);
+           v >>= 8;
+         }
+         // On windows v goes to zero somtimes; seems like a bug
+         if (v == 0) {
+           // when this happens we end up with a bunch of -1 bytes
+           // so strip off the high order ones
+           while (buffer[idx-1] == -1) {
+             idx--;
+           }
+           //               System.out.print("DEBUG: originalValue=" + originalValue);
+           //               for (int dbx=0; dbx<idx; dbx++) {
+           //                   System.out.print(" " + buffer[dbx]);
+           //               }
+           //               System.out.println();
+         }
+         if ((buffer[idx-1] & 0x80) == 0) {
+           /* If the most significant byte does not have its high order bit set
+            * then add a -1 byte so we know this is a negative number
+            */
+           buffer[idx++] = -1;
+         }
+       } else {
+         while (v != 0) {
+           buffer[idx++] = (byte)(v & 0xFF);
+           v >>= 8;
+         }
+         if ((buffer[idx-1] & 0x80) != 0) {
+           /* If the most significant byte has its high order bit set
+            * then add a zero byte so we know this is a positive number
+            */
+           buffer[idx++] = 0;
+         }
+       }
+       if (idx <= 2) {
+         throw new InternalGemFireException(LocalizedStrings.StatArchiveWriter_EXPECTED_IDX_TO_BE_GREATER_THAN_2_IT_WAS_0_FOR_THE_VALUE_1.toLocalizedString(new Object[] {Integer.valueOf(idx), Long.valueOf(originalValue)}));
+       }
+       int token = COMPACT_VALUE_2_TOKEN + (idx - 2);
+       dataOut.writeByte(token);
+       for (int i=idx-1; i >= 0; i--) {
+         dataOut.writeByte(buffer[i]);
+       }
+     }
+   }
+ 
+   public static long readCompactValue(DataInput dataIn) throws IOException {
+     long v = dataIn.readByte();
+     boolean dump = false;
+     if (dump) {
+       System.out.print("compactValue(byte1)=" + v);
+     }
+     if (v < MIN_1BYTE_COMPACT_VALUE) {
+       if (v == COMPACT_VALUE_2_TOKEN) {
+         v = dataIn.readShort();
+         if (dump) {
+           System.out.print("compactValue(short)=" + v);
+         }
+       } else {
+         int bytesToRead = ((byte)v - COMPACT_VALUE_2_TOKEN) + 2;
+         v = dataIn.readByte(); // note the first byte will be a signed byte.
+         if (dump) {
+           System.out.print("compactValue(" + bytesToRead + ")=" + v);
+         }
+         bytesToRead--;
+         while (bytesToRead > 0) {
+           v <<= 8;
+           v |= dataIn.readUnsignedByte();
+           bytesToRead--;
+         }
+       }
+     }
+     return v;
+   }
+ 
+   protected static void writeStatValue(StatisticDescriptor f, long v, DataOutput dataOut) throws IOException {
+     byte typeCode = ((StatisticDescriptorImpl)f).getTypeCode();
+     writeStatValue(typeCode, v, dataOut);
+   }
+ 
+   public static void writeStatValue(byte typeCode, long v, DataOutput dataOut) throws IOException {
+     switch(typeCode) {
+     case BYTE_CODE:
+       dataOut.writeByte((int)v);
+       break;
+     case SHORT_CODE:
+       dataOut.writeShort((int)v);
+       break;
+     case INT_CODE:
+     case FLOAT_CODE:
+     case LONG_CODE:
+     case DOUBLE_CODE:
+       writeCompactValue(v, dataOut);
+       break;
+     default:
+       throw new InternalGemFireException(LocalizedStrings.StatArchiveWriter_UNEXPECTED_TYPE_CODE_0.toLocalizedString(Byte.valueOf(typeCode)));
+     }
+   }
+     
+   protected static void setTraceFilter(String traceStatisticsName, String traceStatisticsTypeName) {
+     StatArchiveWriter.traceStatisticsName = traceStatisticsName;
+     StatArchiveWriter.traceStatisticsTypeName = traceStatisticsTypeName;
+     StatArchiveWriter.traceResourceInstId = -1;
+   }
+   
+   protected static void clearTraceFilter() {
+     StatArchiveWriter.traceStatisticsName = null;
+     StatArchiveWriter.traceStatisticsTypeName = null;
+     StatArchiveWriter.traceResourceInstId = -1;
+   }
+   
+   private static String typeCodeToString(byte typeCode) {
+     switch(typeCode) {
+     case BYTE_CODE:
+       return "BYTE_CODE";
+     case SHORT_CODE:
+       return "SHORT_CODE";
+     case INT_CODE:
+       return "INT_CODE";
+     case FLOAT_CODE:
+       return "FLOAT_CODE";
+     case LONG_CODE:
+       return "LONG_CODE";
+     case DOUBLE_CODE:
+       return "DOUBLE_CODE";
+     default:
+       return "unknown typeCode " + typeCode;
+     }
+   }
+     
+   private static class MyDataOutputStream implements DataOutput {
+     private long bytesWritten = 0;
+     private final DataOutputStream dataOut;
+ 
+     public MyDataOutputStream(OutputStream out) {
+       this.dataOut = new DataOutputStream(out);
+     }
+     
+     public final long getBytesWritten() {
+       return this.bytesWritten;
+     }
+     public final void flush() throws IOException {
+       this.dataOut.flush();
+     }
+     @SuppressWarnings("unused")
+     public final void close() throws IOException {
+       this.dataOut.close();
+     }
+     
+     public final void write(int b) throws IOException {
+       throw new RuntimeException(LocalizedStrings.StatArchiveWriter_METHOD_UNIMPLEMENTED.toLocalizedString());
+     }
+     public final void write(byte[] b, int off, int len) throws IOException {
+       throw new RuntimeException(LocalizedStrings.StatArchiveWriter_METHOD_UNIMPLEMENTED.toLocalizedString());
+     }
+     public final void write(byte[] b) throws IOException {
+       throw new RuntimeException(LocalizedStrings.StatArchiveWriter_METHOD_UNIMPLEMENTED.toLocalizedString());
+     }
+     public final void writeBytes(String v) throws IOException {
+       throw new RuntimeException(LocalizedStrings.StatArchiveWriter_METHOD_UNIMPLEMENTED.toLocalizedString());
+     }
+     public final void writeChar(int v) throws IOException {
+       throw new RuntimeException(LocalizedStrings.StatArchiveWriter_METHOD_UNIMPLEMENTED.toLocalizedString());
+     }
+     public final void writeChars(String v) throws IOException {
+       throw new RuntimeException(LocalizedStrings.StatArchiveWriter_METHOD_UNIMPLEMENTED.toLocalizedString());
+     }
+     public final void writeDouble(double v) throws IOException {
+       throw new RuntimeException(LocalizedStrings.StatArchiveWriter_METHOD_UNIMPLEMENTED.toLocalizedString());
+     }
+     public final void writeFloat(float v) throws IOException {
+       throw new RuntimeException(LocalizedStrings.StatArchiveWriter_METHOD_UNIMPLEMENTED.toLocalizedString());
+     }
+ 
+     public final void writeBoolean(boolean v) throws IOException {
+       this.dataOut.writeBoolean(v);
+       this.bytesWritten += 1;
+     }
+     public final void writeByte(int v) throws IOException {
+       this.dataOut.writeByte(v);
+       this.bytesWritten += 1;
+     }
+     public final void writeShort(int v) throws IOException {
+       this.dataOut.writeShort(v);
+       this.bytesWritten += 2;
+     }
+     public final void writeInt(int v) throws IOException {
+       this.dataOut.writeInt(v);
+       this.bytesWritten += 4;
+     }
+     public final void writeLong(long v) throws IOException {
+       this.dataOut.writeLong(v);
+       this.bytesWritten += 8;
+     }
+     public final void writeUTF(String v) throws IOException {
+       this.dataOut.writeUTF(v);
+       this.bytesWritten += v.length() + 2; // this is the minimum. The max is v.size()*3 +2
+     }
+   }
+ }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/dfbc88b2/geode-core/src/main/java/com/gemstone/gemfire/internal/tcp/Connection.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/dfbc88b2/geode-core/src/main/java/com/gemstone/gemfire/internal/tcp/ConnectionTable.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/dfbc88b2/geode-core/src/main/java/com/gemstone/gemfire/internal/tcp/TCPConduit.java
----------------------------------------------------------------------
diff --cc geode-core/src/main/java/com/gemstone/gemfire/internal/tcp/TCPConduit.java
index d5e2c16,a38244c..800a203
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/tcp/TCPConduit.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/tcp/TCPConduit.java
@@@ -1199,9 -1166,9 +1199,9 @@@ public class TCPConduit implements Runn
     * Returns true if member is part of view, false if membership is not confirmed before timeout.
     */
    public boolean waitForMembershipCheck(InternalDistributedMember remoteId) {
-     return membershipManager.waitForMembershipCheck(remoteId);
+     return membershipManager.waitForNewMember(remoteId);
    }
 -  
 +
    /**
     * simulate being sick
     */

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/dfbc88b2/geode-core/src/main/java/com/gemstone/gemfire/management/internal/ManagementAgent.java
----------------------------------------------------------------------
diff --cc geode-core/src/main/java/com/gemstone/gemfire/management/internal/ManagementAgent.java
index a3a65b0,f3c771f..d4baf0e
--- a/geode-core/src/main/java/com/gemstone/gemfire/management/internal/ManagementAgent.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/management/internal/ManagementAgent.java
@@@ -57,10 -57,8 +57,11 @@@ import com.gemstone.gemfire.internal.Ge
  import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
  import com.gemstone.gemfire.internal.lang.StringUtils;
  import com.gemstone.gemfire.internal.logging.LogService;
 +import com.gemstone.gemfire.internal.net.SSLConfigurationFactory;
 +import com.gemstone.gemfire.internal.net.SSLEnabledComponent;
 +import com.gemstone.gemfire.internal.net.SocketCreator;
 +import com.gemstone.gemfire.internal.net.SocketCreatorFactory;
+ import com.gemstone.gemfire.internal.security.GeodeSecurityUtil;
  import com.gemstone.gemfire.internal.security.shiro.JMXShiroAuthenticator;
  import com.gemstone.gemfire.internal.tcp.TCPConduit;
  import com.gemstone.gemfire.management.ManagementException;
@@@ -92,9 -90,10 +93,10 @@@ public class ManagementAgent 
     */
    private boolean running = false;
    private Registry registry;
 -  private JMXConnectorServer cs;
 +  private JMXConnectorServer jmxConnectorServer;
    private JMXShiroAuthenticator shiroAuthenticator;
    private final DistributionConfig config;
+   // TODO: add this -- private boolean isSecured;
    private boolean isHttpServiceRunning = false;
  
    /**
@@@ -438,11 -453,10 +440,10 @@@
        }
      };
  
-     String shiroConfig = this.config.getShiroInit();
-     if (!StringUtils.isBlank(shiroConfig) || isIntegratedSecurity()) {
+     if (isIntegratedSecurity()) {
        shiroAuthenticator = new JMXShiroAuthenticator();
        env.put(JMXConnectorServer.AUTHENTICATOR, shiroAuthenticator);
 -      cs.addNotificationListener(shiroAuthenticator, null, cs.getAttributes());
 +      jmxConnectorServer.addNotificationListener(shiroAuthenticator, null, jmxConnectorServer.getAttributes());
        // always going to assume authorization is needed as well, if no custom AccessControl, then the CustomAuthRealm
        // should take care of that
        MBeanServerWrapper mBeanServerWrapper = new MBeanServerWrapper();
@@@ -498,15 -514,14 +499,14 @@@
  
  
    private boolean isIntegratedSecurity() {
-     String factoryName = config.getSecurityManager();
-     return factoryName != null && !factoryName.isEmpty();
+     return GeodeSecurityUtil.isJmxSecurityRequired();
    }
  
 -  private static class GemFireRMIClientSocketFactory implements RMIClientSocketFactory,
 -      Serializable {
 +  private static class GemFireRMIClientSocketFactory implements RMIClientSocketFactory, Serializable {
 +
      private static final long serialVersionUID = -7604285019188827617L;
  
 -    private/* final hack to prevent serialization */transient SocketCreator sc;
 +    private/* final hack to prevent serialization */ transient SocketCreator sc;
  
      public GemFireRMIClientSocketFactory(SocketCreator sc) {
        this.sc = sc;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/dfbc88b2/geode-core/src/main/java/com/gemstone/gemfire/management/internal/RestAgent.java
----------------------------------------------------------------------
diff --cc geode-core/src/main/java/com/gemstone/gemfire/management/internal/RestAgent.java
index 75d4d56,e835bab..110d447
mode 100755,100644..100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/management/internal/RestAgent.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/management/internal/RestAgent.java

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/dfbc88b2/geode-core/src/main/java/com/gemstone/gemfire/management/internal/beans/MemberMBeanBridge.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/dfbc88b2/geode-core/src/test/java/com/gemstone/gemfire/cache/client/internal/AutoConnectionSourceImplJUnitTest.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/dfbc88b2/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/DistributionConfigJUnitTest.java
----------------------------------------------------------------------
diff --cc geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/DistributionConfigJUnitTest.java
index a843457,6d6f36d..47cc08c
--- a/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/DistributionConfigJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/DistributionConfigJUnitTest.java
@@@ -78,7 -81,7 +81,7 @@@ public class DistributionConfigJUnitTes
    @Test
    public void testGetAttributeNames() {
      String[] attNames = AbstractDistributionConfig._getAttNames();
-     assertEquals(attNames.length, 155);
 -    assertEquals(attNames.length, 144);
++    assertEquals(attNames.length, 156);
  
      List boolList = new ArrayList();
      List intList = new ArrayList();
@@@ -353,36 -354,76 +357,106 @@@
      props.put("security-username", "testName");
  
      DistributionConfig config = new DistributionConfigImpl(props);
-     assertEquals(config.getSecurityProps().size(), 4);
+     // SECURITY_ENABLED_COMPONENTS is automatically added to getSecurityProps
+     assertEquals(config.getSecurityProps().size(), 5);
+   }
+ 
+   @Test
+   public void securityEnabledComponentsDefaultShouldBeAll() throws Exception {
+     Properties props = new Properties();
+     props.put(SECURITY_MANAGER, SampleSecurityManager.class.getName());
+ 
+     DistributionConfig config = new DistributionConfigImpl(props);
+ 
+     assertThat(config.getSecurityEnabledComponents()).contains(SecurableComponents.ALL);
+   }
+ 
+   @Test
+   public void oneSecurityEnabledComponent() throws Exception {
+     Properties props = new Properties();
+     props.put(SECURITY_MANAGER, SampleSecurityManager.class.getName());
+     props.put(SECURITY_ENABLED_COMPONENTS, SecurableComponents.JMX);
+ 
+     DistributionConfig config = new DistributionConfigImpl(props);
+ 
+     assertThat(config.getSecurityEnabledComponents())
+       .doesNotContain(SecurableComponents.ALL)
+       .doesNotContain(SecurableComponents.GATEWAY)
+       .doesNotContain(SecurableComponents.SERVER)
+       .doesNotContain(SecurableComponents.HTTP_SERVICE)
+       .doesNotContain(SecurableComponents.CLUSTER)
+       .contains(SecurableComponents.JMX);
+   }
+ 
+   @Test
+   public void twoSecurityEnabledComponents() throws Exception {
+     Properties props = new Properties();
+     props.put(SECURITY_MANAGER, SampleSecurityManager.class.getName());
+     props.put(SECURITY_ENABLED_COMPONENTS, SecurableComponents.JMX + "," + SecurableComponents.CLUSTER);
+ 
+     DistributionConfig config = new DistributionConfigImpl(props);
+ 
+     assertThat(config.getSecurityEnabledComponents())
+       .doesNotContain(SecurableComponents.ALL)
+       .doesNotContain(SecurableComponents.GATEWAY)
+       .doesNotContain(SecurableComponents.SERVER)
+       .doesNotContain(SecurableComponents.HTTP_SERVICE)
+       .contains(SecurableComponents.CLUSTER)
+       .contains(SecurableComponents.JMX);
+   }
+ 
+   @Test
+   public void multipleSecurityEnabledComponents() throws Exception {
+     Properties props = new Properties();
+     props.put(SECURITY_MANAGER, SampleSecurityManager.class.getName());
+     props.put(SECURITY_ENABLED_COMPONENTS, SecurableComponents.JMX + "," + SecurableComponents.CLUSTER+ "," + SecurableComponents.HTTP_SERVICE);
+ 
+     DistributionConfig config = new DistributionConfigImpl(props);
+ 
+     assertThat(config.getSecurityEnabledComponents())
+       .doesNotContain(SecurableComponents.ALL)
+       .doesNotContain(SecurableComponents.GATEWAY)
+       .doesNotContain(SecurableComponents.SERVER)
+       .contains(SecurableComponents.HTTP_SERVICE)
+       .contains(SecurableComponents.CLUSTER)
+       .contains(SecurableComponents.JMX);
+   }
+ 
+   @Test
+   public void nonExistentSecurityEnabledComponentShouldThrow() throws Exception {
+     Properties props = new Properties();
+     props.put(SECURITY_ENABLED_COMPONENTS, "notapplicable");
+ 
+     assertThatThrownBy(() -> new DistributionConfigImpl(props)).isExactlyInstanceOf(GemFireConfigException.class);
    }
 +
 +  @Test
 +  public void testSSLEnabledComponents() {
 +    Properties props = new Properties();
 +    props.put(MCAST_PORT, "0");
 +    props.put(SSL_ENABLED_COMPONENTS, "all");
 +
 +    DistributionConfig config = new DistributionConfigImpl(props);
 +  }
 +
 +  @Test(expected = IllegalArgumentException.class)
 +  public void testSSLEnabledComponentsLegacyFail() {
 +    Properties props = new Properties();
 +    props.put(MCAST_PORT, "0");
 +    props.put(CLUSTER_SSL_ENABLED, "true");
 +    props.put(HTTP_SERVICE_SSL_ENABLED, "true");
 +    props.put(SSL_ENABLED_COMPONENTS, "all");
 +
 +    DistributionConfig config = new DistributionConfigImpl(props);
 +  }
 +  @Test
 +  public void testSSLEnabledComponentsLegacyPass() {
 +    Properties props = new Properties();
 +    props.put(MCAST_PORT, "0");
 +    props.put(CLUSTER_SSL_ENABLED, "true");
 +    props.put(HTTP_SERVICE_SSL_ENABLED, "true");
 +    props.put(SSL_ENABLED_COMPONENTS, "");
 +
 +    DistributionConfig config = new DistributionConfigImpl(props);
 +  }
  }



[21/50] [abbrv] incubator-geode git commit: GEODE-420: Code review changes Removal of SSLEnabledComponent.java and SSLEnabledComponents.java

Posted by ud...@apache.org.
GEODE-420: Code review changes
Removal of SSLEnabledComponent.java and SSLEnabledComponents.java


Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/24545408
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/24545408
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/24545408

Branch: refs/heads/develop
Commit: 24545408840c17a107b60b3d2da91ebbad0bf970
Parents: 075e109
Author: Udo Kohlmeyer <uk...@pivotal.io>
Authored: Wed Aug 24 16:39:49 2016 +1000
Committer: Udo Kohlmeyer <uk...@pivotal.io>
Committed: Wed Aug 24 16:39:49 2016 +1000

----------------------------------------------------------------------
 .../controllers/RestAPIsWithSSLDUnitTest.java   |  30 ++--
 .../client/internal/ConnectionFactoryImpl.java  |   7 +-
 .../distributed/SSLEnabledComponents.java       |  68 --------
 .../internal/AbstractDistributionConfig.java    |  19 ++-
 .../internal/DistributionConfig.java            |  10 +-
 .../internal/DistributionConfigImpl.java        |  26 +--
 .../membership/gms/fd/GMSHealthMonitor.java     |   7 +-
 .../internal/tcpserver/TcpClient.java           |   4 +-
 .../internal/tcpserver/TcpServer.java           |   6 +-
 .../gemfire/internal/AbstractConfig.java        |  16 +-
 .../gemfire/internal/admin/SSLConfig.java       |   8 +-
 .../cache/tier/sockets/AcceptorImpl.java        |   6 +-
 .../internal/net/SSLConfigurationFactory.java   |  31 ++--
 .../internal/net/SSLEnabledComponent.java       |  59 -------
 .../gemfire/internal/net/SocketCreator.java     |   3 +-
 .../internal/net/SocketCreatorFactory.java      |  30 ++--
 .../internal/security/SecurableComponent.java   |   3 +-
 .../gemfire/internal/tcp/TCPConduit.java        |   4 +-
 .../management/internal/JettyHelper.java        |   4 +-
 .../management/internal/ManagementAgent.java    |  12 +-
 .../gemfire/management/internal/RestAgent.java  |   5 +-
 .../geode/security/SecurableComponents.java     |   5 +
 .../CacheServerSSLConnectionDUnitTest.java      |   6 +-
 .../gemfire/distributed/LocatorDUnitTest.java   |  12 +-
 .../LocatorLauncherLocalIntegrationTest.java    |   7 +-
 .../LocatorLauncherRemoteIntegrationTest.java   |   8 +-
 .../ServerLauncherLocalIntegrationTest.java     |   9 +-
 .../ServerLauncherRemoteIntegrationTest.java    |   9 +-
 .../internal/net/JSSESocketJUnitTest.java       |  15 +-
 .../net/SSLConfigurationFactoryTest.java        |  47 +++---
 .../net/SocketCreatorFactoryJUnitTest.java      | 161 +++++++++----------
 .../gemfire/management/JMXMBeanDUnitTest.java   | 126 ++++++---------
 .../internal/JettyHelperJUnitTest.java          |   8 +-
 .../HTTPServiceSSLSupportJUnitTest.java         |   1 -
 .../internal/JUnit4DistributedTestCase.java     |   2 +-
 .../tools/pulse/testbed/driver/PulseUITest.java |   4 +-
 .../tools/pulse/tests/PulseAbstractTest.java    |   4 +-
 37 files changed, 312 insertions(+), 470 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/24545408/geode-assembly/src/test/java/com/gemstone/gemfire/rest/internal/web/controllers/RestAPIsWithSSLDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-assembly/src/test/java/com/gemstone/gemfire/rest/internal/web/controllers/RestAPIsWithSSLDUnitTest.java b/geode-assembly/src/test/java/com/gemstone/gemfire/rest/internal/web/controllers/RestAPIsWithSSLDUnitTest.java
index f1a4d5b..e6abfa1 100644
--- a/geode-assembly/src/test/java/com/gemstone/gemfire/rest/internal/web/controllers/RestAPIsWithSSLDUnitTest.java
+++ b/geode-assembly/src/test/java/com/gemstone/gemfire/rest/internal/web/controllers/RestAPIsWithSSLDUnitTest.java
@@ -65,11 +65,11 @@ import com.gemstone.gemfire.cache.client.ClientRegionShortcut;
 import com.gemstone.gemfire.cache.client.internal.LocatorTestBase;
 import com.gemstone.gemfire.cache.server.CacheServer;
 import com.gemstone.gemfire.distributed.DistributedSystem;
-import com.gemstone.gemfire.distributed.SSLEnabledComponents;
 import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem;
 import com.gemstone.gemfire.internal.AvailablePort;
 import com.gemstone.gemfire.internal.AvailablePortHelper;
 import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
+import com.gemstone.gemfire.internal.security.SecurableComponent;
 import com.gemstone.gemfire.management.ManagementException;
 import com.gemstone.gemfire.test.dunit.Host;
 import com.gemstone.gemfire.test.dunit.IgnoredException;
@@ -314,8 +314,8 @@ public class RestAPIsWithSSLDUnitTest extends LocatorTestBase {
       sslPropertyConverter(sslProperties, props, HTTP_SERVICE_SSL_TRUSTSTORE, null);
       sslPropertyConverter(sslProperties, props, HTTP_SERVICE_SSL_TRUSTSTORE_PASSWORD, null);
     }
-    String sslEnabledComponentsProperty = sslProperties.getProperty(SSL_ENABLED_COMPONENTS);
-    if (sslEnabledComponentsProperty != null && sslEnabledComponentsProperty.length() > 0) {
+    String SecurableComponentProperty = sslProperties.getProperty(SSL_ENABLED_COMPONENTS);
+    if (SecurableComponentProperty != null && SecurableComponentProperty.length() > 0) {
       sslPropertyConverter(sslProperties, props, SSL_KEYSTORE, null);
       sslPropertyConverter(sslProperties, props, SSL_KEYSTORE_PASSWORD, null);
       sslPropertyConverter(sslProperties, props, SSL_KEYSTORE_TYPE, null);
@@ -481,7 +481,7 @@ public class RestAPIsWithSSLDUnitTest extends LocatorTestBase {
     props.setProperty(SSL_KEYSTORE_PASSWORD, "password");
     props.setProperty(SSL_TRUSTSTORE_PASSWORD, "password");
     props.setProperty(SSL_KEYSTORE_TYPE, "JKS");
-    props.setProperty(SSL_ENABLED_COMPONENTS, SSLEnabledComponents.HTTP_SERVICE);
+    props.setProperty(SSL_ENABLED_COMPONENTS, SecurableComponent.HTTP_SERVICE.getConstant());
     String restEndpoint = startInfraWithSSL(props, false);
     validateConnection(restEndpoint, "SSL", props);
   }
@@ -495,7 +495,7 @@ public class RestAPIsWithSSLDUnitTest extends LocatorTestBase {
     props.setProperty(SSL_KEYSTORE_PASSWORD, "password");
     props.setProperty(SSL_TRUSTSTORE_PASSWORD, "password");
     props.setProperty(SSL_KEYSTORE_TYPE, "JKS");
-    props.setProperty(SSL_ENABLED_COMPONENTS, SSLEnabledComponents.HTTP_SERVICE);
+    props.setProperty(SSL_ENABLED_COMPONENTS, SecurableComponent.HTTP_SERVICE.getConstant());
     props.setProperty(SSL_HTTP_SERVICE_ALIAS, "httpservicekey");
     props.setProperty(SSL_HTTP_SERVICE_REQUIRE_AUTHENTICATION, "true");
     String restEndpoint = startInfraWithSSL(props, false);
@@ -511,7 +511,7 @@ public class RestAPIsWithSSLDUnitTest extends LocatorTestBase {
     props.setProperty(SSL_KEYSTORE_PASSWORD, "password");
     props.setProperty(SSL_TRUSTSTORE_PASSWORD, "password");
     props.setProperty(SSL_KEYSTORE_TYPE, "JKS");
-    props.setProperty(SSL_ENABLED_COMPONENTS, SSLEnabledComponents.HTTP_SERVICE);
+    props.setProperty(SSL_ENABLED_COMPONENTS, SecurableComponent.HTTP_SERVICE.getConstant());
     props.setProperty(SSL_HTTP_SERVICE_REQUIRE_AUTHENTICATION, "true");
     props.setProperty(SSL_HTTP_SERVICE_ALIAS, "httpservicekey");
     props.setProperty(INVALID_CLIENT_ALIAS, "someAlias");
@@ -526,7 +526,7 @@ public class RestAPIsWithSSLDUnitTest extends LocatorTestBase {
     props.setProperty(SSL_TRUSTSTORE, findTrustedJKSWithSingleEntry().getCanonicalPath());
     props.setProperty(SSL_KEYSTORE_PASSWORD, "password");
     props.setProperty(SSL_TRUSTSTORE_PASSWORD, "password");
-    props.setProperty(SSL_ENABLED_COMPONENTS, SSLEnabledComponents.HTTP_SERVICE);
+    props.setProperty(SSL_ENABLED_COMPONENTS, SecurableComponent.HTTP_SERVICE.getConstant());
 
     String restEndpoint = startInfraWithSSL(props, false);
     validateConnection(restEndpoint, "SSL", props);
@@ -541,7 +541,7 @@ public class RestAPIsWithSSLDUnitTest extends LocatorTestBase {
     props.setProperty(SSL_TRUSTSTORE_PASSWORD, "password");
     props.setProperty(SSL_KEYSTORE_TYPE, "JKS");
     props.setProperty(SSL_PROTOCOLS, "SSL");
-    props.setProperty(SSL_ENABLED_COMPONENTS, SSLEnabledComponents.HTTP_SERVICE);
+    props.setProperty(SSL_ENABLED_COMPONENTS, SecurableComponent.HTTP_SERVICE.getConstant());
 
     String restEndpoint = startInfraWithSSL(props, false);
     validateConnection(restEndpoint, "SSL", props);
@@ -556,7 +556,7 @@ public class RestAPIsWithSSLDUnitTest extends LocatorTestBase {
     props.setProperty(SSL_TRUSTSTORE_PASSWORD, "password");
     props.setProperty(SSL_KEYSTORE_TYPE, "JKS");
     props.setProperty(SSL_PROTOCOLS, "TLS");
-    props.setProperty(SSL_ENABLED_COMPONENTS, SSLEnabledComponents.HTTP_SERVICE);
+    props.setProperty(SSL_ENABLED_COMPONENTS, SecurableComponent.HTTP_SERVICE.getConstant());
 
     String restEndpoint = startInfraWithSSL(props, false);
     validateConnection(restEndpoint, "TLS", props);
@@ -571,7 +571,7 @@ public class RestAPIsWithSSLDUnitTest extends LocatorTestBase {
     props.setProperty(SSL_TRUSTSTORE_PASSWORD, "password");
     props.setProperty(SSL_KEYSTORE_TYPE, "JKS");
     props.setProperty(SSL_PROTOCOLS, "TLSv1.1");
-    props.setProperty(SSL_ENABLED_COMPONENTS, SSLEnabledComponents.HTTP_SERVICE);
+    props.setProperty(SSL_ENABLED_COMPONENTS, SecurableComponent.HTTP_SERVICE.getConstant());
 
     String restEndpoint = startInfraWithSSL(props, false);
     validateConnection(restEndpoint, "TLSv1.1", props);
@@ -586,7 +586,7 @@ public class RestAPIsWithSSLDUnitTest extends LocatorTestBase {
     props.setProperty(SSL_TRUSTSTORE_PASSWORD, "password");
     props.setProperty(SSL_KEYSTORE_TYPE, "JKS");
     props.setProperty(SSL_PROTOCOLS, "TLSv1.2");
-    props.setProperty(SSL_ENABLED_COMPONENTS, SSLEnabledComponents.HTTP_SERVICE);
+    props.setProperty(SSL_ENABLED_COMPONENTS, SecurableComponent.HTTP_SERVICE.getConstant());
 
     String restEndpoint = startInfraWithSSL(props, false);
     validateConnection(restEndpoint, "TLSv1.2", props);
@@ -601,7 +601,7 @@ public class RestAPIsWithSSLDUnitTest extends LocatorTestBase {
     props.setProperty(SSL_TRUSTSTORE_PASSWORD, "password");
     props.setProperty(SSL_KEYSTORE_TYPE, "JKS");
     props.setProperty(SSL_PROTOCOLS, "SSL,TLSv1.2");
-    props.setProperty(SSL_ENABLED_COMPONENTS, SSLEnabledComponents.HTTP_SERVICE);
+    props.setProperty(SSL_ENABLED_COMPONENTS, SecurableComponent.HTTP_SERVICE.getConstant());
 
     String restEndpoint = startInfraWithSSL(props, false);
     validateConnection(restEndpoint, "TLSv1.2", props);
@@ -617,7 +617,7 @@ public class RestAPIsWithSSLDUnitTest extends LocatorTestBase {
     props.setProperty(SSL_TRUSTSTORE_PASSWORD, "password");
     props.setProperty(SSL_KEYSTORE_TYPE, "JKS");
     props.setProperty(SSL_PROTOCOLS, "TLSv1.2");
-    props.setProperty(SSL_ENABLED_COMPONENTS, SSLEnabledComponents.HTTP_SERVICE);
+    props.setProperty(SSL_ENABLED_COMPONENTS, SecurableComponent.HTTP_SERVICE.getConstant());
 
     SSLContext ssl = SSLContext.getInstance("TLSv1.2");
 
@@ -639,7 +639,7 @@ public class RestAPIsWithSSLDUnitTest extends LocatorTestBase {
     props.setProperty(SSL_TRUSTSTORE_PASSWORD, "password");
     props.setProperty(SSL_KEYSTORE_TYPE, "JKS");
     props.setProperty(SSL_PROTOCOLS, "TLSv1.2");
-    props.setProperty(SSL_ENABLED_COMPONENTS, SSLEnabledComponents.HTTP_SERVICE);
+    props.setProperty(SSL_ENABLED_COMPONENTS, SecurableComponent.HTTP_SERVICE.getConstant());
 
     SSLContext ssl = SSLContext.getInstance("TLSv1.2");
 
@@ -664,7 +664,7 @@ public class RestAPIsWithSSLDUnitTest extends LocatorTestBase {
     props.setProperty(SSL_PROTOCOLS, "SSL");
     props.setProperty(SSL_REQUIRE_AUTHENTICATION, "true");
     props.setProperty(SSL_HTTP_SERVICE_REQUIRE_AUTHENTICATION, "true");
-    props.setProperty(SSL_ENABLED_COMPONENTS, SSLEnabledComponents.HTTP_SERVICE);
+    props.setProperty(SSL_ENABLED_COMPONENTS, SecurableComponent.HTTP_SERVICE.getConstant());
 
     String restEndpoint = startInfraWithSSL(props, false);
     validateConnection(restEndpoint, "SSL", props);

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/24545408/geode-core/src/main/java/com/gemstone/gemfire/cache/client/internal/ConnectionFactoryImpl.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/cache/client/internal/ConnectionFactoryImpl.java b/geode-core/src/main/java/com/gemstone/gemfire/cache/client/internal/ConnectionFactoryImpl.java
index 45850e1..5f286af 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/cache/client/internal/ConnectionFactoryImpl.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/cache/client/internal/ConnectionFactoryImpl.java
@@ -22,10 +22,8 @@ import com.gemstone.gemfire.cache.GatewayConfigurationException;
 import com.gemstone.gemfire.cache.client.ServerRefusedConnectionException;
 import com.gemstone.gemfire.cache.client.internal.ServerBlackList.FailureTracker;
 import com.gemstone.gemfire.cache.wan.GatewaySender;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
 import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem;
 import com.gemstone.gemfire.distributed.internal.ServerLocation;
-import com.gemstone.gemfire.internal.net.SSLEnabledComponent;
 import com.gemstone.gemfire.internal.net.SocketCreator;
 import com.gemstone.gemfire.internal.cache.tier.Acceptor;
 import com.gemstone.gemfire.internal.cache.tier.sockets.CacheClientUpdater;
@@ -35,6 +33,7 @@ import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
 import com.gemstone.gemfire.internal.logging.LogService;
 import com.gemstone.gemfire.internal.logging.log4j.LocalizedMessage;
 import com.gemstone.gemfire.internal.net.SocketCreatorFactory;
+import com.gemstone.gemfire.internal.security.SecurableComponent;
 import com.gemstone.gemfire.security.GemFireSecurityException;
 import org.apache.logging.log4j.Logger;
 
@@ -97,13 +96,13 @@ public class ConnectionFactoryImpl implements ConnectionFactory {
     this.cancelCriterion = cancelCriterion;
     this.pool = pool;
     if (this.usedByGateway || (this.gatewaySender != null)) {
-      this.socketCreator = SocketCreatorFactory.getSSLSocketCreatorForComponent(SSLEnabledComponent.GATEWAY);
+      this.socketCreator = SocketCreatorFactory.getSSLSocketCreatorForComponent(SecurableComponent.GATEWAY);
       if (sender!= null && !sender.getGatewayTransportFilters().isEmpty()) {
         this.socketCreator.initializeTransportFilterClientSocketFactory(sender);
       }
     } else {
       //If configured use SSL properties for cache-server
-      this.socketCreator = SocketCreatorFactory.getSSLSocketCreatorForComponent(SSLEnabledComponent.SERVER);
+      this.socketCreator = SocketCreatorFactory.getSSLSocketCreatorForComponent(SecurableComponent.SERVER);
     }
   }
   

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/24545408/geode-core/src/main/java/com/gemstone/gemfire/distributed/SSLEnabledComponents.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/distributed/SSLEnabledComponents.java b/geode-core/src/main/java/com/gemstone/gemfire/distributed/SSLEnabledComponents.java
deleted file mode 100644
index c4310bd..0000000
--- a/geode-core/src/main/java/com/gemstone/gemfire/distributed/SSLEnabledComponents.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.gemstone.gemfire.distributed;
-
-/**
- * This class defines all the static definitions for the {@link ConfigurationProperties#SSL_ENABLED_COMPONENTS}
- * <U>Since</U>: Geode 1.0
- */
-public interface SSLEnabledComponents {
-
-  /**
-   * This determines that none of the components will use the SSL for their communications.
-   * <U>Since</U>: Geode 1.0
-   */
-  String NONE = "none";
-
-  /**
-   * This determines that all components will use the SSL for their communications.
-   * <U>Since</U>: Geode 1.0
-   */
-  String ALL = "all";
-  /**
-   * This determines that only the server components will use the SSL for their communications. This means that all communications
-   * between clients and servers will use SSL. In addition this also means that client-locator and server-locator communications will use SSL credentials.
-   * <U>Since</U>: Geode 1.0
-   */
-  String SERVER = "server";
-  /**
-   * This determines that only the inter-server (or server-to-server) communication will use the SSL.
-   * In addition this also means that server-locator communications will use SSL credentials.
-   * <U>Since</U>: Geode 1.0
-   */
-  String CLUSTER = "cluster";
-  /**
-   * This determines that only the jmx component will use the SSL for its communications.
-   * <U>Since</U>: Geode 1.0
-   */
-  String JMX = "jmx";
-  /**
-   * This determines that the http service component will use the SSL for its communications
-   * <U>Since</U>: Geode 1.0
-   */
-  String HTTP_SERVICE = "http";
-  /**
-   * This determines that the gateway component will use the SSL for its communications.
-   * <U>Since</U>: Geode 1.0
-   */
-  String GATEWAY = "gateway";
-  /**
-   * This determines that the locator component will use the SSL for its communications between server and locator and client and locator.
-   * <U>Since</U>: Geode 1.0
-   */
-  String LOCATOR = "locator";
-}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/24545408/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/AbstractDistributionConfig.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/AbstractDistributionConfig.java b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/AbstractDistributionConfig.java
index f46aede..9168503 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/AbstractDistributionConfig.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/AbstractDistributionConfig.java
@@ -40,7 +40,6 @@ import com.gemstone.gemfire.internal.ConfigSource;
 import com.gemstone.gemfire.internal.admin.remote.DistributionLocatorId;
 import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
 import com.gemstone.gemfire.internal.logging.LogWriterImpl;
-import com.gemstone.gemfire.internal.net.SSLEnabledComponent;
 import com.gemstone.gemfire.internal.net.SocketCreator;
 import com.gemstone.gemfire.internal.security.SecurableComponent;
 import com.gemstone.gemfire.memcached.GemFireMemcachedServer;
@@ -463,8 +462,8 @@ public abstract class AbstractDistributionConfig extends AbstractConfig implemen
    * This would mean one is mixing the "old" with the "new"
    */
   @ConfigAttributeChecker(name = SSL_ENABLED_COMPONENTS)
-  protected SSLEnabledComponent[] checkLegacySSLWhenSSLEnabledComponentsSet(SSLEnabledComponent[] value) {
-    for (SSLEnabledComponent component : value) {
+  protected SecurableComponent[] checkLegacySSLWhenSSLEnabledComponentsSet(SecurableComponent[] value) {
+    for (SecurableComponent component : value) {
       switch (component) {
         case ALL:
         case CLUSTER:
@@ -477,13 +476,13 @@ public abstract class AbstractDistributionConfig extends AbstractConfig implemen
         default:
           throw new IllegalArgumentException(LocalizedStrings.AbstractDistributionConfig_SSL_ENABLED_COMPONENTS_0_INVALID_TRY_1.toLocalizedString(new Object[] {
             value, StringUtils.join(new String[] {
-            SSLEnabledComponent.ALL.getConstant(),
-            SSLEnabledComponent.CLUSTER.getConstant(),
-            SSLEnabledComponent.SERVER.getConstant(),
-            SSLEnabledComponent.GATEWAY.getConstant(),
-            SSLEnabledComponent.JMX.getConstant(),
-            SSLEnabledComponent.HTTP_SERVICE.getConstant(),
-            SSLEnabledComponent.LOCATOR.getConstant()
+            SecurableComponent.ALL.getConstant(),
+            SecurableComponent.CLUSTER.getConstant(),
+            SecurableComponent.SERVER.getConstant(),
+            SecurableComponent.GATEWAY.getConstant(),
+            SecurableComponent.JMX.getConstant(),
+            SecurableComponent.HTTP_SERVICE.getConstant(),
+            SecurableComponent.LOCATOR.getConstant()
           }, ",")
           }));
       }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/24545408/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionConfig.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionConfig.java b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionConfig.java
index 3663be2..1b0ad96 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionConfig.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionConfig.java
@@ -36,7 +36,7 @@ import com.gemstone.gemfire.internal.Config;
 import com.gemstone.gemfire.internal.ConfigSource;
 import com.gemstone.gemfire.internal.logging.InternalLogWriter;
 import com.gemstone.gemfire.internal.logging.LogConfig;
-import com.gemstone.gemfire.internal.net.SSLEnabledComponent;
+import com.gemstone.gemfire.internal.security.SecurableComponent;
 import com.gemstone.gemfire.internal.tcp.Connection;
 import com.gemstone.gemfire.memcached.GemFireMemcachedServer;
 
@@ -4337,7 +4337,7 @@ public interface DistributionConfig extends Config, LogConfig {
    * @since Geode 1.0
    */
   @ConfigAttributeGetter(name = SSL_ENABLED_COMPONENTS)
-  SSLEnabledComponent[] getSSLEnabledComponents();
+  SecurableComponent[] getSSLEnabledComponents();
 
   /**
    * Sets the value of the {@link ConfigurationProperties#SSL_ENABLED_COMPONENTS}
@@ -4345,20 +4345,20 @@ public interface DistributionConfig extends Config, LogConfig {
    * @since Geode 1.0
    */
   @ConfigAttributeSetter(name = SSL_ENABLED_COMPONENTS)
-  void setSSLEnabledComponents(SSLEnabledComponent[] sslEnabledComponents);
+  void setSSLEnabledComponents(SecurableComponent[] sslEnabledComponents);
 
   /**
    * The name of the {@link ConfigurationProperties#SSL_ENABLED_COMPONENTS} property
    * @since Geode 1.0
    */
-  @ConfigAttribute(type = SSLEnabledComponent[].class)
+  @ConfigAttribute(type = SecurableComponent[].class)
   String SSL_ENABLED_COMPONENTS_NAME = SSL_ENABLED_COMPONENTS;
 
   /**
    * The default ssl enabled components
    * @since Geode 1.0
    */
-  SSLEnabledComponent[] DEFAULT_SSL_ENABLED_COMPONENTS = new SSLEnabledComponent[] {};
+  SecurableComponent[] DEFAULT_SSL_ENABLED_COMPONENTS = new SecurableComponent[] {};
 
   /**
    * Returns the value of the {@link ConfigurationProperties#SSL_PROTOCOLS}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/24545408/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionConfigImpl.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionConfigImpl.java b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionConfigImpl.java
index 2b26a58..23569a2 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionConfigImpl.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionConfigImpl.java
@@ -49,9 +49,9 @@ import com.gemstone.gemfire.distributed.ConfigurationProperties;
 import com.gemstone.gemfire.distributed.DistributedSystem;
 import com.gemstone.gemfire.internal.ConfigSource;
 import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
-import com.gemstone.gemfire.internal.net.SSLEnabledComponent;
 import com.gemstone.gemfire.internal.net.SocketCreator;
 import com.gemstone.gemfire.internal.process.ProcessLauncherContext;
+import com.gemstone.gemfire.internal.security.SecurableComponent;
 import com.gemstone.gemfire.memcached.GemFireMemcachedServer;
 
 /**
@@ -550,7 +550,7 @@ public class DistributionConfigImpl extends AbstractDistributionConfig implement
 
   private String httpServiceSSLAlias = DEFAULT_SSL_ALIAS;
 
-  private SSLEnabledComponent[] sslEnabledComponents = DEFAULT_SSL_ENABLED_COMPONENTS;
+  private SecurableComponent[] sslEnabledComponents = DEFAULT_SSL_ENABLED_COMPONENTS;
 
   private String sslProtocols = DEFAULT_SSL_PROTOCOLS;
   private String sslCiphers = DEFAULT_SSL_CIPHERS;
@@ -955,8 +955,8 @@ public class DistributionConfigImpl extends AbstractDistributionConfig implement
         throw new InternalGemFireException("error invoking getter for property" + ConfigurationProperties.SSL_ENABLED_COMPONENTS);
       }
     }
-    SSLEnabledComponent[] sslEnabledComponents = (SSLEnabledComponent[]) value;
-    for (SSLEnabledComponent sslEnabledComponent : sslEnabledComponents) {
+    SecurableComponent[] sslEnabledComponents = (SecurableComponent[]) value;
+    for (SecurableComponent sslEnabledComponent : sslEnabledComponents) {
       if (!isAliasCorrectlyConfiguredForComponents(sslEnabledComponent)) {
         throw new IllegalArgumentException(LocalizedStrings.AbstractDistributionConfig_SSL_ENABLED_COMPONENTS_INVALID_ALIAS_OPTIONS.toLocalizedString());
       }
@@ -964,18 +964,18 @@ public class DistributionConfigImpl extends AbstractDistributionConfig implement
 
   }
 
-  private boolean isAliasCorrectlyConfiguredForComponents(final SSLEnabledComponent component) {
+  private boolean isAliasCorrectlyConfiguredForComponents(final SecurableComponent component) {
     switch (component) {
       case ALL: {
         //If the default alias is not set, then check that all the other component aliases are set
         if (StringUtils.isEmpty(getSSLDefaultAlias())) {
           boolean correctAlias = true;
-          correctAlias &= isAliasCorrectlyConfiguredForComponents(SSLEnabledComponent.CLUSTER);
-          correctAlias &= isAliasCorrectlyConfiguredForComponents(SSLEnabledComponent.GATEWAY);
-          correctAlias &= isAliasCorrectlyConfiguredForComponents(SSLEnabledComponent.HTTP_SERVICE);
-          correctAlias &= isAliasCorrectlyConfiguredForComponents(SSLEnabledComponent.JMX);
-          correctAlias &= isAliasCorrectlyConfiguredForComponents(SSLEnabledComponent.LOCATOR);
-          correctAlias &= isAliasCorrectlyConfiguredForComponents(SSLEnabledComponent.SERVER);
+          correctAlias &= isAliasCorrectlyConfiguredForComponents(SecurableComponent.CLUSTER);
+          correctAlias &= isAliasCorrectlyConfiguredForComponents(SecurableComponent.GATEWAY);
+          correctAlias &= isAliasCorrectlyConfiguredForComponents(SecurableComponent.HTTP_SERVICE);
+          correctAlias &= isAliasCorrectlyConfiguredForComponents(SecurableComponent.JMX);
+          correctAlias &= isAliasCorrectlyConfiguredForComponents(SecurableComponent.LOCATOR);
+          correctAlias &= isAliasCorrectlyConfiguredForComponents(SecurableComponent.SERVER);
           return correctAlias;
         }
       }
@@ -2567,12 +2567,12 @@ public class DistributionConfigImpl extends AbstractDistributionConfig implement
   }
 
   @Override
-  public SSLEnabledComponent[] getSSLEnabledComponents() {
+  public SecurableComponent[] getSSLEnabledComponents() {
     return sslEnabledComponents;
   }
 
   @Override
-  public void setSSLEnabledComponents(final SSLEnabledComponent[] sslEnabledComponents) {
+  public void setSSLEnabledComponents(final SecurableComponent[] sslEnabledComponents) {
     this.sslEnabledComponents = sslEnabledComponents;
   }
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/24545408/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/fd/GMSHealthMonitor.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/fd/GMSHealthMonitor.java b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/fd/GMSHealthMonitor.java
index 5af1521..00175d9 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/fd/GMSHealthMonitor.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/fd/GMSHealthMonitor.java
@@ -63,10 +63,9 @@ import com.gemstone.gemfire.distributed.internal.membership.gms.messages.Heartbe
 import com.gemstone.gemfire.distributed.internal.membership.gms.messages.SuspectMembersMessage;
 import com.gemstone.gemfire.distributed.internal.membership.gms.messages.SuspectRequest;
 import com.gemstone.gemfire.internal.ConnectionWatcher;
-import com.gemstone.gemfire.internal.net.SSLEnabledComponent;
-import com.gemstone.gemfire.internal.net.SocketCreator;
 import com.gemstone.gemfire.internal.Version;
 import com.gemstone.gemfire.internal.net.SocketCreatorFactory;
+import com.gemstone.gemfire.internal.security.SecurableComponent;
 
 /**
  * Failure Detection
@@ -490,7 +489,7 @@ public class GMSHealthMonitor implements HealthMonitor, MessageHandler {
     InternalDistributedSystem internalDistributedSystem = InternalDistributedSystem.getConnectedInstance();
     try {
       logger.debug("Checking member {} with TCP socket connection {}:{}.", suspectMember, suspectMember.getInetAddress(), port);
-      clientSocket = SocketCreatorFactory.getSSLSocketCreatorForComponent(SSLEnabledComponent.CLUSTER).connect(suspectMember.getInetAddress(), port,
+      clientSocket = SocketCreatorFactory.getSSLSocketCreatorForComponent(SecurableComponent.CLUSTER).connect(suspectMember.getInetAddress(), port,
           (int)memberTimeout, new ConnectTimeoutTask(services.getTimer(), memberTimeout), false, -1, false);
       clientSocket.setTcpNoDelay(true);
       return doTCPCheckMember(suspectMember, clientSocket);
@@ -636,7 +635,7 @@ public class GMSHealthMonitor implements HealthMonitor, MessageHandler {
   ServerSocket createServerSocket(InetAddress socketAddress, int[] portRange) {
     ServerSocket serverSocket;
     try {
-      serverSocket = SocketCreatorFactory.getSSLSocketCreatorForComponent(SSLEnabledComponent.CLUSTER).createServerSocketUsingPortRange(socketAddress, 50/*backlog*/,
+      serverSocket = SocketCreatorFactory.getSSLSocketCreatorForComponent(SecurableComponent.CLUSTER).createServerSocketUsingPortRange(socketAddress, 50/*backlog*/,
         true/*isBindAddress*/, false/*useNIO*/, 65536/*tcpBufferSize*/, portRange, false);
       socketPort = serverSocket.getLocalPort();
     } catch (IOException | SystemConnectException e) {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/24545408/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/tcpserver/TcpClient.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/tcpserver/TcpClient.java b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/tcpserver/TcpClient.java
index 968adc2..d4dac0c 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/tcpserver/TcpClient.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/tcpserver/TcpClient.java
@@ -37,9 +37,9 @@ import com.gemstone.gemfire.internal.Version;
 import com.gemstone.gemfire.internal.VersionedDataInputStream;
 import com.gemstone.gemfire.internal.VersionedDataOutputStream;
 import com.gemstone.gemfire.internal.logging.LogService;
-import com.gemstone.gemfire.internal.net.SSLEnabledComponent;
 import com.gemstone.gemfire.internal.net.SocketCreator;
 import com.gemstone.gemfire.internal.net.SocketCreatorFactory;
+import com.gemstone.gemfire.internal.security.SecurableComponent;
 
 /**
  * <p>Client for the TcpServer component of the Locator.
@@ -61,7 +61,7 @@ public class TcpClient {
    * SocketCreatorFactory should be initialized before invoking this method.
    */
   public TcpClient() {
-    this(SocketCreatorFactory.getSSLSocketCreatorForComponent(SSLEnabledComponent.LOCATOR));
+    this(SocketCreatorFactory.getSSLSocketCreatorForComponent(SecurableComponent.LOCATOR));
   }
 
   /**

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/24545408/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/tcpserver/TcpServer.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/tcpserver/TcpServer.java b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/tcpserver/TcpServer.java
index 36d05f0..45d61ab 100755
--- a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/tcpserver/TcpServer.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/tcpserver/TcpServer.java
@@ -58,9 +58,9 @@ import com.gemstone.gemfire.internal.VersionedDataInputStream;
 import com.gemstone.gemfire.internal.VersionedDataOutputStream;
 import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
 import com.gemstone.gemfire.internal.logging.LogService;
-import com.gemstone.gemfire.internal.net.SSLEnabledComponent;
 import com.gemstone.gemfire.internal.net.SocketCreator;
 import com.gemstone.gemfire.internal.net.SocketCreatorFactory;
+import com.gemstone.gemfire.internal.security.SecurableComponent;
 
 /**
  * TCP server which listens on a port and delegates requests to a request
@@ -166,10 +166,8 @@ public class TcpServer {
       cfg = new DistributionConfigImpl(sslConfig);
     }
 
-    //TODO Udo: How would I handle this case where the cfg is empty???
-
     if (this.socketCreator == null) {
-      this.socketCreator = SocketCreatorFactory.getSSLSocketCreatorForComponent(SSLEnabledComponent.LOCATOR);
+      this.socketCreator = SocketCreatorFactory.getSSLSocketCreatorForComponent(SecurableComponent.LOCATOR);
     } else {
       throw new RuntimeException("The socket Creator already exists");
     }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/24545408/geode-core/src/main/java/com/gemstone/gemfire/internal/AbstractConfig.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/AbstractConfig.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/AbstractConfig.java
index d046643..6fd4ae6 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/AbstractConfig.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/AbstractConfig.java
@@ -43,8 +43,8 @@ import com.gemstone.gemfire.UnmodifiableException;
 import com.gemstone.gemfire.distributed.internal.DistributionConfig;
 import com.gemstone.gemfire.distributed.internal.FlowControlParams;
 import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
-import com.gemstone.gemfire.internal.net.SSLEnabledComponent;
 import com.gemstone.gemfire.internal.net.SocketCreator;
+import com.gemstone.gemfire.internal.security.SecurableComponent;
 
 /**
  * Provides an implementation of the {@link Config} interface
@@ -405,8 +405,8 @@ public abstract class AbstractConfig implements Config {
           }));
         }
         attObjectValue = new FlowControlParams(credits, thresh, waittime);
-      } else if (valueType.isArray() && SSLEnabledComponent.class.equals(valueType.getComponentType())) {
-        attObjectValue = commaDelimitedStringToSSLEnabledComponents(attValue);
+      } else if (valueType.isArray() && SecurableComponent.class.equals(valueType.getComponentType())) {
+        attObjectValue = commaDelimitedStringToSecurableComponents(attValue);
       }else {
         throw new InternalGemFireException(LocalizedStrings.AbstractConfig_UNHANDLED_ATTRIBUTE_TYPE_0_FOR_1.toLocalizedString(new Object[] {
           valueType, attName
@@ -431,12 +431,16 @@ public abstract class AbstractConfig implements Config {
     return strings;
   }
 
-  private SSLEnabledComponent[] commaDelimitedStringToSSLEnabledComponents(final String tokenizeString) {
+  private SecurableComponent[] commaDelimitedStringToSecurableComponents(final String tokenizeString) {
     StringTokenizer stringTokenizer = new StringTokenizer(tokenizeString, ",");
-    SSLEnabledComponent[] returnArray = new SSLEnabledComponent[stringTokenizer.countTokens()];
+    SecurableComponent[] returnArray = new SecurableComponent[stringTokenizer.countTokens()];
     for (int i = 0; i < returnArray.length; i++) {
       String name = stringTokenizer.nextToken();
-      returnArray[i] = SSLEnabledComponent.getEnum(name);
+      try {
+        returnArray[i] = SecurableComponent.getEnum(name);
+      } catch (Exception e) {
+        throw new IllegalArgumentException(e);
+      }
     }
     return returnArray;
   }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/24545408/geode-core/src/main/java/com/gemstone/gemfire/internal/admin/SSLConfig.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/admin/SSLConfig.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/admin/SSLConfig.java
index ebf3a7e..063ee05 100755
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/admin/SSLConfig.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/admin/SSLConfig.java
@@ -22,7 +22,7 @@ import java.util.Iterator;
 import java.util.Properties;
 
 import com.gemstone.gemfire.distributed.internal.DistributionConfig;
-import com.gemstone.gemfire.internal.net.SSLEnabledComponent;
+import com.gemstone.gemfire.internal.security.SecurableComponent;
 import com.gemstone.gemfire.management.internal.SSLUtil;
 
 /**
@@ -41,7 +41,7 @@ public class SSLConfig {
   private String truststorePassword = DistributionConfig.DEFAULT_SSL_TRUSTSTORE_PASSWORD;
   private String truststoreType = DistributionConfig.DEFAULT_CLUSTER_SSL_KEYSTORE_TYPE;
   private String alias = null;
-  private SSLEnabledComponent sslEnabledComponent = null;
+  private SecurableComponent sslEnabledComponent = null;
 
   /**
    * SSL implementation-specific key-value pairs. Each key should be prefixed
@@ -163,11 +163,11 @@ public class SSLConfig {
     }
   }
 
-  public SSLEnabledComponent getSslEnabledComponent() {
+  public SecurableComponent getSecuredComponent() {
     return sslEnabledComponent;
   }
 
-  public void setSslEnabledComponent(final SSLEnabledComponent sslEnabledComponent) {
+  public void setSslEnabledComponent(final SecurableComponent sslEnabledComponent) {
     this.sslEnabledComponent = sslEnabledComponent;
   }
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/24545408/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/AcceptorImpl.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/AcceptorImpl.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/AcceptorImpl.java
index 5540a4a..335ce24 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/AcceptorImpl.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/AcceptorImpl.java
@@ -70,7 +70,6 @@ import com.gemstone.gemfire.cache.client.internal.PoolImpl;
 import com.gemstone.gemfire.cache.server.CacheServer;
 import com.gemstone.gemfire.cache.wan.GatewayTransportFilter;
 import com.gemstone.gemfire.distributed.internal.*;
-import com.gemstone.gemfire.internal.net.SSLEnabledComponent;
 import com.gemstone.gemfire.internal.net.SocketCreator;
 import com.gemstone.gemfire.internal.SystemTimer;
 import com.gemstone.gemfire.internal.cache.BucketAdvisor;
@@ -87,6 +86,7 @@ import com.gemstone.gemfire.internal.logging.LogService;
 import com.gemstone.gemfire.internal.logging.LoggingThreadGroup;
 import com.gemstone.gemfire.internal.logging.log4j.LocalizedMessage;
 import com.gemstone.gemfire.internal.security.IntegratedSecurityService;
+import com.gemstone.gemfire.internal.security.SecurableComponent;
 import com.gemstone.gemfire.internal.security.SecurityService;
 import com.gemstone.gemfire.internal.security.GeodeSecurityUtil;
 import com.gemstone.gemfire.internal.net.SocketCreatorFactory;
@@ -389,9 +389,9 @@ public class AcceptorImpl extends Acceptor implements Runnable
     {
       if(!isGatewayReceiver) {
         //If configured use SSL properties for cache-server
-        this.socketCreator = SocketCreatorFactory.getSSLSocketCreatorForComponent(SSLEnabledComponent.SERVER);
+        this.socketCreator = SocketCreatorFactory.getSSLSocketCreatorForComponent(SecurableComponent.SERVER);
       } else {
-        this.socketCreator = SocketCreatorFactory.getSSLSocketCreatorForComponent(SSLEnabledComponent.GATEWAY);
+        this.socketCreator = SocketCreatorFactory.getSSLSocketCreatorForComponent(SecurableComponent.GATEWAY);
       }
       
       final GemFireCacheImpl gc;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/24545408/geode-core/src/main/java/com/gemstone/gemfire/internal/net/SSLConfigurationFactory.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/net/SSLConfigurationFactory.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/net/SSLConfigurationFactory.java
index 33378b8..12528e3 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/net/SSLConfigurationFactory.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/net/SSLConfigurationFactory.java
@@ -24,15 +24,17 @@ import java.util.Properties;
 import org.apache.commons.lang.ArrayUtils;
 import org.springframework.util.StringUtils;
 
+import com.gemstone.gemfire.GemFireConfigException;
 import com.gemstone.gemfire.distributed.internal.DistributionConfig;
 import com.gemstone.gemfire.distributed.internal.DistributionConfigImpl;
 import com.gemstone.gemfire.internal.admin.SSLConfig;
+import com.gemstone.gemfire.internal.security.SecurableComponent;
 
 public class SSLConfigurationFactory {
 
   private static SSLConfigurationFactory instance = new SSLConfigurationFactory();
   private DistributionConfig distributionConfig = new DistributionConfigImpl(new Properties());
-  private Map<SSLEnabledComponent, SSLConfig> registeredSSLConfig = new HashMap<>();
+  private Map<SecurableComponent, SSLConfig> registeredSSLConfig = new HashMap<>();
 
   private SSLConfigurationFactory() {
   }
@@ -45,10 +47,14 @@ public class SSLConfigurationFactory {
   }
 
   public static void setDistributionConfig(final DistributionConfig distributionConfig) {
+    if(distributionConfig == null)
+    {
+      throw new GemFireConfigException("SSL Configuration requires a valid distribution config.");
+    }
     getInstance().distributionConfig = distributionConfig;
   }
 
-  public static SSLConfig getSSLConfigForComponent(SSLEnabledComponent sslEnabledComponent) {
+  public static SSLConfig getSSLConfigForComponent(SecurableComponent sslEnabledComponent) {
     SSLConfig sslConfig = getInstance().getRegisteredSSLConfigForComponent(sslEnabledComponent);
     if (sslConfig == null) {
       sslConfig = getInstance().createSSLConfigForComponent(sslEnabledComponent);
@@ -57,13 +63,13 @@ public class SSLConfigurationFactory {
     return sslConfig;
   }
 
-  private synchronized void registeredSSLConfigForComponent(final SSLEnabledComponent sslEnabledComponent, final SSLConfig sslConfig) {
+  private synchronized void registeredSSLConfigForComponent(final SecurableComponent sslEnabledComponent, final SSLConfig sslConfig) {
     registeredSSLConfig.put(sslEnabledComponent, sslConfig);
   }
 
-  private SSLConfig createSSLConfigForComponent(final SSLEnabledComponent sslEnabledComponent) {
+  private SSLConfig createSSLConfigForComponent(final SecurableComponent sslEnabledComponent) {
     SSLConfig sslConfig = createSSLConfig(sslEnabledComponent);
-    SSLEnabledComponent[] sslEnabledComponents = distributionConfig.getSSLEnabledComponents();
+    SecurableComponent[] sslEnabledComponents = distributionConfig.getSSLEnabledComponents();
     if (sslEnabledComponents.length == 0) {
       sslConfig = configureLegacyClusterSSL(sslConfig);
     }
@@ -71,12 +77,14 @@ public class SSLConfigurationFactory {
     switch (sslEnabledComponent) {
       case ALL: {
         //Create a SSLConfig separate for HTTP Service. As the require-authentication might differ
-        createSSLConfigForComponent(SSLEnabledComponent.HTTP_SERVICE);
+        createSSLConfigForComponent(SecurableComponent.HTTP_SERVICE);
         break;
       }
       case CLUSTER: {
         if (sslEnabledComponents.length > 0) {
           sslConfig = setAliasForComponent(sslConfig, distributionConfig.getClusterSSLAlias());
+        }else {
+          sslConfig = configureLegacyClusterSSL(sslConfig);
         }
         break;
       }
@@ -131,7 +139,7 @@ public class SSLConfigurationFactory {
     return sslConfig;
   }
 
-  private SSLConfig createSSLConfig(final SSLEnabledComponent sslEnabledComponent) {
+  private SSLConfig createSSLConfig(final SecurableComponent sslEnabledComponent) {
     SSLConfig sslConfig = new SSLConfig();
     sslConfig.setCiphers(distributionConfig.getSSLCiphers());
     sslConfig.setEnabled(determineIfSSLEnabledForSSLComponent(sslEnabledComponent));
@@ -146,11 +154,11 @@ public class SSLConfigurationFactory {
     return sslConfig;
   }
 
-  private boolean determineIfSSLEnabledForSSLComponent(final SSLEnabledComponent sslEnabledComponent) {
-    if (ArrayUtils.contains(distributionConfig.getSSLEnabledComponents(), SSLEnabledComponent.NONE)) {
+  private boolean determineIfSSLEnabledForSSLComponent(final SecurableComponent sslEnabledComponent) {
+    if (ArrayUtils.contains(distributionConfig.getSSLEnabledComponents(), SecurableComponent.NONE)) {
       return false;
     }
-    if (ArrayUtils.contains(distributionConfig.getSSLEnabledComponents(), SSLEnabledComponent.ALL)) {
+    if (ArrayUtils.contains(distributionConfig.getSSLEnabledComponents(), SecurableComponent.ALL)) {
       return true;
     }
     return ArrayUtils.contains(distributionConfig.getSSLEnabledComponents(), sslEnabledComponent) ? true : false;
@@ -293,14 +301,13 @@ public class SSLConfigurationFactory {
     return propertyValue;
   }
 
-  private SSLConfig getRegisteredSSLConfigForComponent(final SSLEnabledComponent sslEnabledComponent) {
+  private SSLConfig getRegisteredSSLConfigForComponent(final SecurableComponent sslEnabledComponent) {
     return registeredSSLConfig.get(sslEnabledComponent);
   }
 
   public static void close() {
     getInstance().clearSSLConfigForAllComponents();
     getInstance().distributionConfig = null;
-    instance = null;
   }
 
   private void clearSSLConfigForAllComponents() {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/24545408/geode-core/src/main/java/com/gemstone/gemfire/internal/net/SSLEnabledComponent.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/net/SSLEnabledComponent.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/net/SSLEnabledComponent.java
deleted file mode 100644
index fb9c776..0000000
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/net/SSLEnabledComponent.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.gemstone.gemfire.internal.net;
-
-import org.springframework.util.StringUtils;
-
-import com.gemstone.gemfire.GemFireConfigException;
-import com.gemstone.gemfire.distributed.SSLEnabledComponents;
-
-public enum SSLEnabledComponent {
-  ALL(SSLEnabledComponents.ALL),
-  CLUSTER(SSLEnabledComponents.CLUSTER),
-  SERVER(SSLEnabledComponents.SERVER),
-  JMX(SSLEnabledComponents.JMX),
-  HTTP_SERVICE(SSLEnabledComponents.HTTP_SERVICE),
-  GATEWAY(SSLEnabledComponents.GATEWAY),
-  LOCATOR(SSLEnabledComponents.LOCATOR),
-  NONE(SSLEnabledComponents.NONE);
-
-  private String constant;
-
-  SSLEnabledComponent(final String constant) {
-    this.constant = constant;
-  }
-
-  public static SSLEnabledComponent getEnum(String enumString) {
-    for (SSLEnabledComponent sslEnabledComponent : SSLEnabledComponent.values()) {
-      if (!StringUtils.isEmpty(enumString)) {
-        if (sslEnabledComponent.constant.equals(enumString)) {
-          return sslEnabledComponent;
-        }
-      }
-    }
-    throw new GemFireConfigException("There is no registered component for the name: " + enumString);
-  }
-
-  public String getConstant() {
-    return constant;
-  }
-
-  @Override
-  public String toString() {
-    return getConstant();
-  }
-}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/24545408/geode-core/src/main/java/com/gemstone/gemfire/internal/net/SocketCreator.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/net/SocketCreator.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/net/SocketCreator.java
index a11733a..0a2bfa3 100755
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/net/SocketCreator.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/net/SocketCreator.java
@@ -96,6 +96,7 @@ import com.gemstone.gemfire.internal.cache.wan.TransportFilterSocketFactory;
 import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
 import com.gemstone.gemfire.internal.logging.LogService;
 import com.gemstone.gemfire.internal.logging.log4j.LocalizedMessage;
+import com.gemstone.gemfire.internal.security.SecurableComponent;
 import com.gemstone.gemfire.internal.util.PasswordUtil;
 
 /**
@@ -330,7 +331,7 @@ public class SocketCreator {
   private void initialize() {
     try {
       // set p2p values...
-      if (SSLEnabledComponent.CLUSTER.equals(sslConfig.getSslEnabledComponent())) {
+      if (SecurableComponent.CLUSTER.equals(sslConfig.getSecuredComponent())) {
         if (this.sslConfig.isEnabled()) {
           System.setProperty("p2p.useSSL", "true");
           System.setProperty("p2p.oldIO", "true");

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/24545408/geode-core/src/main/java/com/gemstone/gemfire/internal/net/SocketCreatorFactory.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/net/SocketCreatorFactory.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/net/SocketCreatorFactory.java
index bd30bfb..20b649c 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/net/SocketCreatorFactory.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/net/SocketCreatorFactory.java
@@ -24,15 +24,16 @@ import java.util.Vector;
 
 import org.apache.commons.lang.ArrayUtils;
 
-import com.gemstone.gemfire.distributed.SSLEnabledComponents;
+import com.gemstone.gemfire.GemFireConfigException;
 import com.gemstone.gemfire.distributed.internal.DistributionConfig;
 import com.gemstone.gemfire.distributed.internal.DistributionConfigImpl;
 import com.gemstone.gemfire.internal.admin.SSLConfig;
+import com.gemstone.gemfire.internal.security.SecurableComponent;
 
 public class SocketCreatorFactory {
 
   private static SocketCreatorFactory instance = null;
-  private Map<SSLEnabledComponent, SocketCreator> socketCreators = new HashMap<>();
+  private Map<SecurableComponent, SocketCreator> socketCreators = new HashMap<>();
   private DistributionConfig distributionConfig;
 
   /**
@@ -40,7 +41,7 @@ public class SocketCreatorFactory {
    */
   private void initializeSocketCreators(final DistributionConfig distributionConfig) {
     if (distributionConfig == null) {
-      this.distributionConfig = new DistributionConfigImpl(new Properties());
+      throw new GemFireConfigException("SocketCreatorFactory requires a valid distribution config.");
     } else {
       this.distributionConfig = distributionConfig;
     }
@@ -58,24 +59,24 @@ public class SocketCreatorFactory {
     return getInstance(false);
   }
 
-  public static SocketCreator getSSLSocketCreatorForComponent(SSLEnabledComponent sslEnabledComponent) {
+  public static SocketCreator getSSLSocketCreatorForComponent(SecurableComponent sslEnabledComponent) {
     SSLConfig sslConfigForComponent = SSLConfigurationFactory.getSSLConfigForComponent(sslEnabledComponent);
     return getInstance().getOrCreateSocketCreatorForSSLEnabledComponent(sslEnabledComponent, sslConfigForComponent);
   }
 
-  private SocketCreator getSSLSocketCreator(final SSLEnabledComponent sslComponent, final DistributionConfig distributionConfig, final SSLConfig sslConfig) {
+  private SocketCreator getSSLSocketCreator(final SecurableComponent sslComponent, final DistributionConfig distributionConfig, final SSLConfig sslConfig) {
     if (sslConfig.isEnabled()) {
-      if (ArrayUtils.contains(distributionConfig.getSSLEnabledComponents(), SSLEnabledComponents.ALL)) {
-        return createSSLSocketCreator(SSLEnabledComponent.ALL, sslConfig);
+      if (ArrayUtils.contains(distributionConfig.getSSLEnabledComponents(), SecurableComponent.ALL)) {
+        return createSSLSocketCreator(SecurableComponent.ALL, sslConfig);
       } else if (ArrayUtils.contains(distributionConfig.getSSLEnabledComponents(), sslComponent)) {
         return createSSLSocketCreator(sslComponent, sslConfig);
       }
     }
-    return createSSLSocketCreator(SSLEnabledComponent.NONE, sslConfig);
+    return createSSLSocketCreator(SecurableComponent.NONE, sslConfig);
   }
 
 
-  private SocketCreator getOrCreateSocketCreatorForSSLEnabledComponent(final SSLEnabledComponent sslEnabledComponent, final SSLConfig sslConfig) {
+  private SocketCreator getOrCreateSocketCreatorForSSLEnabledComponent(final SecurableComponent sslEnabledComponent, final SSLConfig sslConfig) {
     SocketCreator socketCreator = getSocketCreatorForComponent(sslEnabledComponent);
     if (socketCreator == null) {
       return getSSLSocketCreator(sslEnabledComponent, distributionConfig, sslConfig);
@@ -84,26 +85,26 @@ public class SocketCreatorFactory {
     }
   }
 
-  private SocketCreator createSSLSocketCreator(final SSLEnabledComponent sslEnableComponent, final SSLConfig sslConfig) {
+  private SocketCreator createSSLSocketCreator(final SecurableComponent sslEnableComponent, final SSLConfig sslConfig) {
     SocketCreator socketCreator = null;
     if (sslConfig.isEnabled()) {
       socketCreator = new SocketCreator(sslConfig);
       addSocketCreatorForComponent(sslEnableComponent, socketCreator);
     } else {
-      socketCreator = getSocketCreatorForComponent(SSLEnabledComponent.NONE);
+      socketCreator = getSocketCreatorForComponent(SecurableComponent.NONE);
       if (socketCreator == null) {
         socketCreator = new SocketCreator(sslConfig);
-        addSocketCreatorForComponent(SSLEnabledComponent.NONE, socketCreator);
+        addSocketCreatorForComponent(SecurableComponent.NONE, socketCreator);
       }
     }
     return socketCreator;
   }
 
-  private synchronized void addSocketCreatorForComponent(SSLEnabledComponent sslEnabledComponent, SocketCreator socketCreator) {
+  private synchronized void addSocketCreatorForComponent(SecurableComponent sslEnabledComponent, SocketCreator socketCreator) {
     socketCreators.put(sslEnabledComponent, socketCreator);
   }
 
-  private synchronized SocketCreator getSocketCreatorForComponent(SSLEnabledComponent sslEnabledComponent) {
+  private synchronized SocketCreator getSocketCreatorForComponent(SecurableComponent sslEnabledComponent) {
     return socketCreators.get(sslEnabledComponent);
   }
 
@@ -150,7 +151,6 @@ public class SocketCreatorFactory {
     if (socketCreatorFactory != null) {
       socketCreatorFactory.clearSocketCreators();
       socketCreatorFactory.distributionConfig = null;
-      SocketCreatorFactory.instance = null;
       SSLConfigurationFactory.close();
     }
   }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/24545408/geode-core/src/main/java/com/gemstone/gemfire/internal/security/SecurableComponent.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/security/SecurableComponent.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/security/SecurableComponent.java
index ff78b9e..d3c57aa 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/security/SecurableComponent.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/security/SecurableComponent.java
@@ -28,6 +28,7 @@ public enum SecurableComponent {
   JMX(SecurableComponents.JMX),
   HTTP_SERVICE(SecurableComponents.HTTP_SERVICE),
   GATEWAY(SecurableComponents.GATEWAY),
+  LOCATOR(SecurableComponents.LOCATOR),
   NONE("NO_COMPONENT");
 
   private final String constant;
@@ -39,7 +40,7 @@ public enum SecurableComponent {
   public static SecurableComponent getEnum(String enumString) {
     for (SecurableComponent securableComponent : SecurableComponent.values()) {
       if (!StringUtils.isEmpty(enumString)) {
-        if (securableComponent.constant.equals(enumString)) {
+        if (securableComponent.constant.equalsIgnoreCase(enumString)) {
           return securableComponent;
         }
       }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/24545408/geode-core/src/main/java/com/gemstone/gemfire/internal/tcp/TCPConduit.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/tcp/TCPConduit.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/tcp/TCPConduit.java
index b8e067c..d97a479 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/tcp/TCPConduit.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/tcp/TCPConduit.java
@@ -60,9 +60,9 @@ import com.gemstone.gemfire.internal.logging.LoggingThreadGroup;
 import com.gemstone.gemfire.internal.logging.log4j.AlertAppender;
 import com.gemstone.gemfire.internal.logging.log4j.LocalizedMessage;
 import com.gemstone.gemfire.internal.logging.log4j.LogMarker;
-import com.gemstone.gemfire.internal.net.SSLEnabledComponent;
 import com.gemstone.gemfire.internal.net.SocketCreator;
 import com.gemstone.gemfire.internal.net.SocketCreatorFactory;
+import com.gemstone.gemfire.internal.security.SecurableComponent;
 
 /**
  * <p>TCPConduit manages a server socket and a collection of connections to
@@ -283,7 +283,7 @@ public class TCPConduit implements Runnable {
       }
     }
     
-    this.socketCreator = SocketCreatorFactory.getSSLSocketCreatorForComponent(SSLEnabledComponent.CLUSTER);
+    this.socketCreator = SocketCreatorFactory.getSSLSocketCreatorForComponent(SecurableComponent.CLUSTER);
 
     startAcceptor();
   }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/24545408/geode-core/src/main/java/com/gemstone/gemfire/management/internal/JettyHelper.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/management/internal/JettyHelper.java b/geode-core/src/main/java/com/gemstone/gemfire/management/internal/JettyHelper.java
index 8724d73..569cb7b 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/management/internal/JettyHelper.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/management/internal/JettyHelper.java
@@ -37,7 +37,7 @@ import com.gemstone.gemfire.internal.admin.SSLConfig;
 import com.gemstone.gemfire.internal.lang.StringUtils;
 import com.gemstone.gemfire.internal.logging.LogService;
 import com.gemstone.gemfire.internal.net.SSLConfigurationFactory;
-import com.gemstone.gemfire.internal.net.SSLEnabledComponent;
+import com.gemstone.gemfire.internal.security.SecurableComponent;
 
 /**
  * @since GemFire 8.1
@@ -197,7 +197,7 @@ public class JettyHelper {
     if (args.length > 1) {
       System.out.printf("Temporary Directory @ ($1%s)%n", USER_DIR);
 
-      final Server jetty = JettyHelper.initJetty(null, 8090, SSLConfigurationFactory.getSSLConfigForComponent(SSLEnabledComponent.HTTP_SERVICE));
+      final Server jetty = JettyHelper.initJetty(null, 8090, SSLConfigurationFactory.getSSLConfigForComponent(SecurableComponent.HTTP_SERVICE));
 
       for (int index = 0; index < args.length; index += 2) {
         final String webAppContext = args[index];

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/24545408/geode-core/src/main/java/com/gemstone/gemfire/management/internal/ManagementAgent.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/management/internal/ManagementAgent.java b/geode-core/src/main/java/com/gemstone/gemfire/management/internal/ManagementAgent.java
index d4baf0e..dc17391 100755
--- a/geode-core/src/main/java/com/gemstone/gemfire/management/internal/ManagementAgent.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/management/internal/ManagementAgent.java
@@ -58,10 +58,10 @@ import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
 import com.gemstone.gemfire.internal.lang.StringUtils;
 import com.gemstone.gemfire.internal.logging.LogService;
 import com.gemstone.gemfire.internal.net.SSLConfigurationFactory;
-import com.gemstone.gemfire.internal.net.SSLEnabledComponent;
 import com.gemstone.gemfire.internal.net.SocketCreator;
 import com.gemstone.gemfire.internal.net.SocketCreatorFactory;
 import com.gemstone.gemfire.internal.security.GeodeSecurityUtil;
+import com.gemstone.gemfire.internal.security.SecurableComponent;
 import com.gemstone.gemfire.internal.security.shiro.JMXShiroAuthenticator;
 import com.gemstone.gemfire.internal.tcp.TCPConduit;
 import com.gemstone.gemfire.management.ManagementException;
@@ -228,7 +228,7 @@ public class ManagementAgent {
 
           boolean isRestWebAppAdded = false;
 
-          this.httpServer = JettyHelper.initJetty(bindAddress, port, SSLConfigurationFactory.getSSLConfigForComponent(SSLEnabledComponent.HTTP_SERVICE));
+          this.httpServer = JettyHelper.initJetty(bindAddress, port, SSLConfigurationFactory.getSSLConfigForComponent(SecurableComponent.HTTP_SERVICE));
 
           if (agentUtil.isWebApplicationAvailable(gemfireWar)) {
             this.httpServer = JettyHelper
@@ -337,10 +337,8 @@ public class ManagementAgent {
   /**
    * http://docs.oracle.com/javase/6/docs/technotes/guides/management/agent.html
    * #gdfvq https://blogs.oracle.com/jmxetc/entry/java_5_premain_rmi_connectors
-   * https
-   * ://blogs.oracle.com/jmxetc/entry/building_a_remotely_stoppable_connector
-   * https
-   * ://blogs.oracle.com/jmxetc/entry/jmx_connecting_through_firewalls_using
+   * https://blogs.oracle.com/jmxetc/entry/building_a_remotely_stoppable_connector
+   * https://blogs.oracle.com/jmxetc/entry/jmx_connecting_through_firewalls_using
    */
   private void configureAndStart() throws IOException {
     // KIRK: I copied this from
@@ -359,7 +357,7 @@ public class ManagementAgent {
       bindAddr = InetAddress.getByName(hostname);
     }
 
-    final SocketCreator socketCreator = SocketCreatorFactory.getSSLSocketCreatorForComponent(SSLEnabledComponent.JMX);
+    final SocketCreator socketCreator = SocketCreatorFactory.getSSLSocketCreatorForComponent(SecurableComponent.JMX);
 
     final boolean ssl = socketCreator.useSSL();
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/24545408/geode-core/src/main/java/com/gemstone/gemfire/management/internal/RestAgent.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/management/internal/RestAgent.java b/geode-core/src/main/java/com/gemstone/gemfire/management/internal/RestAgent.java
index 110d447..a8c480b 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/management/internal/RestAgent.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/management/internal/RestAgent.java
@@ -31,13 +31,12 @@ import com.gemstone.gemfire.cache.RegionAttributes;
 import com.gemstone.gemfire.cache.Scope;
 import com.gemstone.gemfire.distributed.internal.DistributionConfig;
 import com.gemstone.gemfire.internal.GemFireVersion;
-import com.gemstone.gemfire.internal.admin.SSLConfig;
 import com.gemstone.gemfire.internal.net.SSLConfigurationFactory;
-import com.gemstone.gemfire.internal.net.SSLEnabledComponent;
 import com.gemstone.gemfire.internal.net.SocketCreator;
 import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
 import com.gemstone.gemfire.internal.cache.InternalRegionArguments;
 import com.gemstone.gemfire.internal.logging.LogService;
+import com.gemstone.gemfire.internal.security.SecurableComponent;
 import com.gemstone.gemfire.management.ManagementService;
 
 /**
@@ -134,7 +133,7 @@ public class RestAgent {
 
         final int port = this.config.getHttpServicePort();
 
-        this.httpServer = JettyHelper.initJetty(httpServiceBindAddress, port, SSLConfigurationFactory.getSSLConfigForComponent(SSLEnabledComponent.HTTP_SERVICE));
+        this.httpServer = JettyHelper.initJetty(httpServiceBindAddress, port, SSLConfigurationFactory.getSSLConfigForComponent(SecurableComponent.HTTP_SERVICE));
 
         this.httpServer = JettyHelper.addWebApplication(httpServer, "/gemfire-api", gemfireAPIWar);
         this.httpServer = JettyHelper.addWebApplication(httpServer, "/geode", gemfireAPIWar);

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/24545408/geode-core/src/main/java/org/apache/geode/security/SecurableComponents.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/security/SecurableComponents.java b/geode-core/src/main/java/org/apache/geode/security/SecurableComponents.java
index a7ae766..2c739b9 100644
--- a/geode-core/src/main/java/org/apache/geode/security/SecurableComponents.java
+++ b/geode-core/src/main/java/org/apache/geode/security/SecurableComponents.java
@@ -54,4 +54,9 @@ public interface SecurableComponents {
    * <U>Since</U>: Geode 1.0
    */
   String GATEWAY = "gateway";
+  /**
+   * This determines that the locator communication will be secured.
+   * <U>Since</U>: Geode 1.0
+   */
+  String LOCATOR = "locator";
 }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/24545408/geode-core/src/test/java/com/gemstone/gemfire/cache/client/internal/CacheServerSSLConnectionDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache/client/internal/CacheServerSSLConnectionDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache/client/internal/CacheServerSSLConnectionDUnitTest.java
index 6d524ef..5884c1f 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache/client/internal/CacheServerSSLConnectionDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache/client/internal/CacheServerSSLConnectionDUnitTest.java
@@ -37,8 +37,8 @@ import com.gemstone.gemfire.cache.client.ClientCacheFactory;
 import com.gemstone.gemfire.cache.client.ClientRegionFactory;
 import com.gemstone.gemfire.cache.client.ClientRegionShortcut;
 import com.gemstone.gemfire.cache.server.CacheServer;
-import com.gemstone.gemfire.internal.net.SSLEnabledComponent;
 import com.gemstone.gemfire.internal.net.SocketCreatorFactory;
+import com.gemstone.gemfire.internal.security.SecurableComponent;
 import com.gemstone.gemfire.security.AuthenticationRequiredException;
 import com.gemstone.gemfire.test.dunit.Host;
 import com.gemstone.gemfire.test.dunit.IgnoredException;
@@ -111,7 +111,7 @@ public class CacheServerSSLConnectionDUnitTest extends JUnit4DistributedTestCase
     String cacheServerSslciphers = "any";
     boolean cacheServerSslRequireAuth = true;
     if (!legacy) {
-      gemFireProps.put(SSL_ENABLED_COMPONENTS, SSLEnabledComponent.CLUSTER+","+SSLEnabledComponent.SERVER);
+      gemFireProps.put(SSL_ENABLED_COMPONENTS, SecurableComponent.CLUSTER + "," + SecurableComponent.SERVER);
       gemFireProps.put(SSL_PROTOCOLS, cacheServerSslprotocols);
       gemFireProps.put(SSL_CIPHERS, cacheServerSslciphers);
       gemFireProps.put(SSL_REQUIRE_AUTHENTICATION, String.valueOf(cacheServerSslRequireAuth));
@@ -248,14 +248,12 @@ public class CacheServerSSLConnectionDUnitTest extends JUnit4DistributedTestCase
   public static void closeCacheTask() {
     if (instance != null && instance.cache != null) {
       instance.cache.close();
-      SocketCreatorFactory.close();
     }
   }
 
   public static void closeClientCacheTask() {
     if (instance != null && instance.clientCache != null) {
       instance.clientCache.close();
-      SocketCreatorFactory.close();
     }
   }
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/24545408/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorDUnitTest.java
index 530cf20..4a82789 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorDUnitTest.java
@@ -55,8 +55,8 @@ import com.gemstone.gemfire.internal.AvailablePortHelper;
 import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
 import com.gemstone.gemfire.internal.logging.InternalLogWriter;
 import com.gemstone.gemfire.internal.logging.LocalLogWriter;
-import com.gemstone.gemfire.internal.net.SSLEnabledComponent;
 import com.gemstone.gemfire.internal.net.SocketCreatorFactory;
+import com.gemstone.gemfire.internal.security.SecurableComponent;
 import com.gemstone.gemfire.internal.tcp.Connection;
 import com.gemstone.gemfire.test.dunit.DistributedTestUtils;
 import com.gemstone.gemfire.test.dunit.Host;
@@ -366,7 +366,7 @@ public class LocatorDUnitTest extends JUnit4DistributedTestCase {
     properties.put(SSL_KEYSTORE_TYPE, "JKS");
     properties.put(SSL_TRUSTSTORE, getSingleKeyKeystore());
     properties.put(SSL_TRUSTSTORE_PASSWORD, "password");
-    properties.put(SSL_ENABLED_COMPONENTS, SSLEnabledComponent.LOCATOR.getConstant());
+    properties.put(SSL_ENABLED_COMPONENTS, SecurableComponent.LOCATOR.getConstant());
 
     try {
       loc2.invoke("startLocator2", () -> startLocatorWithPortAndProperties(port2, properties));
@@ -415,7 +415,7 @@ public class LocatorDUnitTest extends JUnit4DistributedTestCase {
     properties.put(SSL_TRUSTSTORE, getMultiKeyTruststore());
     properties.put(SSL_TRUSTSTORE_PASSWORD, "password");
     properties.put(SSL_LOCATOR_ALIAS, "locatorkey");
-    properties.put(SSL_ENABLED_COMPONENTS, SSLEnabledComponent.LOCATOR.getConstant());
+    properties.put(SSL_ENABLED_COMPONENTS, SecurableComponent.LOCATOR.getConstant());
 
 
     try {
@@ -466,7 +466,7 @@ public class LocatorDUnitTest extends JUnit4DistributedTestCase {
     properties.put(SSL_TRUSTSTORE, getSingleKeyKeystore());
     properties.put(SSL_TRUSTSTORE_PASSWORD, "password");
     properties.put(SSL_REQUIRE_AUTHENTICATION, "true");
-    properties.put(SSL_ENABLED_COMPONENTS, SSLEnabledComponent.LOCATOR.getConstant());
+    properties.put(SSL_ENABLED_COMPONENTS, SecurableComponent.LOCATOR.getConstant());
 
     try {
       loc1.invoke("start Locator1", () -> startLocator(port1, properties));
@@ -532,7 +532,7 @@ public class LocatorDUnitTest extends JUnit4DistributedTestCase {
       properties.put(SSL_TRUSTSTORE, getSingleKeyKeystore());
       properties.put(SSL_TRUSTSTORE_PASSWORD, "password");
       properties.put(SSL_REQUIRE_AUTHENTICATION, "true");
-      properties.put(SSL_ENABLED_COMPONENTS, SSLEnabledComponent.LOCATOR.getConstant());
+      properties.put(SSL_ENABLED_COMPONENTS, SecurableComponent.LOCATOR.getConstant());
 
       loc2.invoke("start Locator2", () -> startLocator(port2, properties));
     } finally {
@@ -583,7 +583,7 @@ public class LocatorDUnitTest extends JUnit4DistributedTestCase {
     properties.put(SSL_TRUSTSTORE, getSingleKeyKeystore());
     properties.put(SSL_TRUSTSTORE_PASSWORD, "password");
     properties.put(SSL_REQUIRE_AUTHENTICATION, "true");
-    properties.put(SSL_ENABLED_COMPONENTS, SSLEnabledComponent.LOCATOR.getConstant());
+    properties.put(SSL_ENABLED_COMPONENTS, SecurableComponent.LOCATOR.getConstant());
 
     try {
       loc1.invoke("start Locator1", () -> startLocator(port1, properties));

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/24545408/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorLauncherLocalIntegrationTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorLauncherLocalIntegrationTest.java b/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorLauncherLocalIntegrationTest.java
index 48778f3..9d3556e 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorLauncherLocalIntegrationTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorLauncherLocalIntegrationTest.java
@@ -21,12 +21,11 @@ import com.gemstone.gemfire.distributed.LocatorLauncher.Builder;
 import com.gemstone.gemfire.distributed.LocatorLauncher.LocatorState;
 import com.gemstone.gemfire.distributed.internal.InternalLocator;
 import com.gemstone.gemfire.internal.*;
-import com.gemstone.gemfire.internal.net.SSLEnabledComponent;
-import com.gemstone.gemfire.internal.net.SocketCreator;
 import com.gemstone.gemfire.internal.net.SocketCreatorFactory;
 import com.gemstone.gemfire.internal.process.ProcessControllerFactory;
 import com.gemstone.gemfire.internal.process.ProcessType;
 import com.gemstone.gemfire.internal.process.ProcessUtils;
+import com.gemstone.gemfire.internal.security.SecurableComponent;
 import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
 import com.gemstone.gemfire.test.junit.runners.CategoryWithParameterizedRunnerFactory;
 import org.junit.After;
@@ -328,7 +327,7 @@ public class LocatorLauncherLocalIntegrationTest extends AbstractLocatorLauncher
       return;
     }
 
-    this.socket = SocketCreatorFactory.getSSLSocketCreatorForComponent(SSLEnabledComponent.CLUSTER).createServerSocket(this.locatorPort, 50, null, -1);
+    this.socket = SocketCreatorFactory.getSSLSocketCreatorForComponent(SecurableComponent.CLUSTER).createServerSocket(this.locatorPort, 50, null, -1);
     assertTrue(this.socket.isBound());
     assertFalse(this.socket.isClosed());
     assertFalse(AvailablePort.isPortAvailable(this.locatorPort, AvailablePort.SOCKET));
@@ -545,7 +544,7 @@ public class LocatorLauncherLocalIntegrationTest extends AbstractLocatorLauncher
     }
 
     // generate one free port and then use it instead of default
-    this.socket = SocketCreatorFactory.getSSLSocketCreatorForComponent(SSLEnabledComponent.CLUSTER).createServerSocket(this.locatorPort, 50, null, -1);
+    this.socket = SocketCreatorFactory.getSSLSocketCreatorForComponent(SecurableComponent.CLUSTER).createServerSocket(this.locatorPort, 50, null, -1);
     
     this.launcher = new Builder()
         .setMemberName(getUniqueName())

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/24545408/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorLauncherRemoteIntegrationTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorLauncherRemoteIntegrationTest.java b/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorLauncherRemoteIntegrationTest.java
index a94f6bd..a788b1d 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorLauncherRemoteIntegrationTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorLauncherRemoteIntegrationTest.java
@@ -20,12 +20,9 @@ import com.gemstone.gemfire.distributed.AbstractLauncher.Status;
 import com.gemstone.gemfire.distributed.LocatorLauncher.Builder;
 import com.gemstone.gemfire.distributed.LocatorLauncher.LocatorState;
 import com.gemstone.gemfire.distributed.internal.DistributionConfig;
-import com.gemstone.gemfire.distributed.internal.DistributionConfigImpl;
 import com.gemstone.gemfire.internal.AvailablePort;
 import com.gemstone.gemfire.internal.DistributionLocator;
 import com.gemstone.gemfire.internal.GemFireVersion;
-import com.gemstone.gemfire.internal.net.SSLEnabledComponent;
-import com.gemstone.gemfire.internal.net.SocketCreator;
 import com.gemstone.gemfire.internal.logging.InternalLogWriter;
 import com.gemstone.gemfire.internal.logging.LocalLogWriter;
 import com.gemstone.gemfire.internal.net.SocketCreatorFactory;
@@ -33,6 +30,7 @@ import com.gemstone.gemfire.internal.process.ProcessControllerFactory;
 import com.gemstone.gemfire.internal.process.ProcessStreamReader;
 import com.gemstone.gemfire.internal.process.ProcessType;
 import com.gemstone.gemfire.internal.process.ProcessUtils;
+import com.gemstone.gemfire.internal.security.SecurableComponent;
 import com.gemstone.gemfire.test.junit.categories.FlakyTest;
 import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
 import com.gemstone.gemfire.test.junit.runners.CategoryWithParameterizedRunnerFactory;
@@ -401,7 +399,7 @@ public class LocatorLauncherRemoteIntegrationTest extends AbstractLocatorLaunche
 
   @Test
   public void testStartUsingPortInUseFails() throws Throwable {
-    this.socket = SocketCreatorFactory.getSSLSocketCreatorForComponent(SSLEnabledComponent.CLUSTER).createServerSocket(this.locatorPort, 50, null, -1);
+    this.socket = SocketCreatorFactory.getSSLSocketCreatorForComponent(SecurableComponent.CLUSTER).createServerSocket(this.locatorPort, 50, null, -1);
     this.locatorPort = this.socket.getLocalPort();
 
     final List<String> jvmArguments = getJvmArguments();
@@ -473,7 +471,7 @@ public class LocatorLauncherRemoteIntegrationTest extends AbstractLocatorLaunche
     String expectedString = "java.net.BindException";
     AtomicBoolean outputContainedExpectedString = new AtomicBoolean();
 
-    this.socket = SocketCreatorFactory.getSSLSocketCreatorForComponent(SSLEnabledComponent.CLUSTER).createServerSocket(this.locatorPort, 50, null, -1);
+    this.socket = SocketCreatorFactory.getSSLSocketCreatorForComponent(SecurableComponent.CLUSTER).createServerSocket(this.locatorPort, 50, null, -1);
     this.locatorPort = this.socket.getLocalPort();
 
     assertFalse(AvailablePort.isPortAvailable(this.locatorPort, AvailablePort.SOCKET));

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/24545408/geode-core/src/test/java/com/gemstone/gemfire/distributed/ServerLauncherLocalIntegrationTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/distributed/ServerLauncherLocalIntegrationTest.java b/geode-core/src/test/java/com/gemstone/gemfire/distributed/ServerLauncherLocalIntegrationTest.java
index cfc3960..32ed996 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/distributed/ServerLauncherLocalIntegrationTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/distributed/ServerLauncherLocalIntegrationTest.java
@@ -27,8 +27,6 @@ import com.gemstone.gemfire.distributed.ServerLauncher.ServerState;
 import com.gemstone.gemfire.internal.AvailablePort;
 import com.gemstone.gemfire.internal.AvailablePortHelper;
 import com.gemstone.gemfire.internal.GemFireVersion;
-import com.gemstone.gemfire.internal.net.SSLEnabledComponent;
-import com.gemstone.gemfire.internal.net.SocketCreator;
 import com.gemstone.gemfire.internal.cache.AbstractCacheServer;
 import com.gemstone.gemfire.internal.cache.xmlcache.CacheCreation;
 import com.gemstone.gemfire.internal.cache.xmlcache.CacheXmlGenerator;
@@ -37,6 +35,7 @@ import com.gemstone.gemfire.internal.net.SocketCreatorFactory;
 import com.gemstone.gemfire.internal.process.ProcessControllerFactory;
 import com.gemstone.gemfire.internal.process.ProcessType;
 import com.gemstone.gemfire.internal.process.ProcessUtils;
+import com.gemstone.gemfire.internal.security.SecurableComponent;
 import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
 import org.junit.After;
 import org.junit.Before;
@@ -351,7 +350,7 @@ public class ServerLauncherLocalIntegrationTest extends AbstractServerLauncherIn
     String rootFolder = this.temporaryFolder.getRoot().getCanonicalPath();
 
     // generate one free port and then use TEST_OVERRIDE_DEFAULT_PORT_PROPERTY
-    this.socket = SocketCreatorFactory.getSSLSocketCreatorForComponent(SSLEnabledComponent.CLUSTER).createServerSocket(this.serverPort, 50, null, -1);
+    this.socket = SocketCreatorFactory.getSSLSocketCreatorForComponent(SecurableComponent.CLUSTER).createServerSocket(this.serverPort, 50, null, -1);
     assertFalse(AvailablePort.isPortAvailable(this.serverPort, AvailablePort.SOCKET));
     
     // build and start the server
@@ -610,7 +609,7 @@ public class ServerLauncherLocalIntegrationTest extends AbstractServerLauncherIn
     String rootFolder = this.temporaryFolder.getRoot().getCanonicalPath();
 
     // generate one free port and then use TEST_OVERRIDE_DEFAULT_PORT_PROPERTY
-    this.socket = SocketCreatorFactory.getSSLSocketCreatorForComponent(SSLEnabledComponent.CLUSTER).createServerSocket(this.serverPort, 50, null, -1);
+    this.socket = SocketCreatorFactory.getSSLSocketCreatorForComponent(SecurableComponent.CLUSTER).createServerSocket(this.serverPort, 50, null, -1);
     assertFalse(AvailablePort.isPortAvailable(this.serverPort, AvailablePort.SOCKET));
     
     // build and start the server
@@ -771,7 +770,7 @@ public class ServerLauncherLocalIntegrationTest extends AbstractServerLauncherIn
 
     // generate one free port and then use TEST_OVERRIDE_DEFAULT_PORT_PROPERTY
     final int freeTCPPort = AvailablePort.getRandomAvailablePort(AvailablePort.SOCKET);
-    this.socket = SocketCreatorFactory.getSSLSocketCreatorForComponent(SSLEnabledComponent.CLUSTER).createServerSocket(freeTCPPort, 50, null, -1);
+    this.socket = SocketCreatorFactory.getSSLSocketCreatorForComponent(SecurableComponent.CLUSTER).createServerSocket(freeTCPPort, 50, null, -1);
     
     // build and start the server
     final Builder builder = new Builder()

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/24545408/geode-core/src/test/java/com/gemstone/gemfire/distributed/ServerLauncherRemoteIntegrationTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/distributed/ServerLauncherRemoteIntegrationTest.java b/geode-core/src/test/java/com/gemstone/gemfire/distributed/ServerLauncherRemoteIntegrationTest.java
index 96686a0..6483a9b 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/distributed/ServerLauncherRemoteIntegrationTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/distributed/ServerLauncherRemoteIntegrationTest.java
@@ -25,8 +25,6 @@ import com.gemstone.gemfire.distributed.internal.DistributionConfig;
 import com.gemstone.gemfire.internal.AvailablePort;
 import com.gemstone.gemfire.internal.AvailablePortHelper;
 import com.gemstone.gemfire.internal.GemFireVersion;
-import com.gemstone.gemfire.internal.net.SSLEnabledComponent;
-import com.gemstone.gemfire.internal.net.SocketCreator;
 import com.gemstone.gemfire.internal.cache.AbstractCacheServer;
 import com.gemstone.gemfire.internal.cache.xmlcache.CacheCreation;
 import com.gemstone.gemfire.internal.cache.xmlcache.CacheXmlGenerator;
@@ -35,6 +33,7 @@ import com.gemstone.gemfire.internal.logging.InternalLogWriter;
 import com.gemstone.gemfire.internal.logging.LocalLogWriter;
 import com.gemstone.gemfire.internal.net.SocketCreatorFactory;
 import com.gemstone.gemfire.internal.process.*;
+import com.gemstone.gemfire.internal.security.SecurableComponent;
 import com.gemstone.gemfire.test.junit.categories.FlakyTest;
 import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
 import com.gemstone.gemfire.test.process.ProcessWrapper;
@@ -429,7 +428,7 @@ public class ServerLauncherRemoteIntegrationTest extends AbstractServerLauncherR
   @Test
   public void testStartUsingDisableDefaultServerSkipsPortCheck() throws Throwable {
     // make serverPort in use
-    this.socket = SocketCreatorFactory.getSSLSocketCreatorForComponent(SSLEnabledComponent.CLUSTER).createServerSocket(this.serverPort, 50, null, -1);
+    this.socket = SocketCreatorFactory.getSSLSocketCreatorForComponent(SecurableComponent.CLUSTER).createServerSocket(this.serverPort, 50, null, -1);
     assertFalse(AvailablePort.isPortAvailable(this.serverPort, AvailablePort.SOCKET));
     
     // build and start the server
@@ -553,7 +552,7 @@ public class ServerLauncherRemoteIntegrationTest extends AbstractServerLauncherR
   @Test
   public void testStartUsingServerPortInUseFails() throws Throwable {
     // make serverPort in use
-    this.socket = SocketCreatorFactory.getSSLSocketCreatorForComponent(SSLEnabledComponent.CLUSTER).createServerSocket(this.serverPort, 50, null, -1);
+    this.socket = SocketCreatorFactory.getSSLSocketCreatorForComponent(SecurableComponent.CLUSTER).createServerSocket(this.serverPort, 50, null, -1);
     assertFalse(AvailablePort.isPortAvailable(this.serverPort, AvailablePort.SOCKET));
     
     final List<String> jvmArguments = getJvmArguments();
@@ -800,7 +799,7 @@ public class ServerLauncherRemoteIntegrationTest extends AbstractServerLauncherR
     AtomicBoolean outputContainedExpectedString = new AtomicBoolean();
 
     // make serverPort in use
-    this.socket = SocketCreatorFactory.getSSLSocketCreatorForComponent(SSLEnabledComponent.CLUSTER).createServerSocket(this.serverPort, 50, null, -1);
+    this.socket = SocketCreatorFactory.getSSLSocketCreatorForComponent(SecurableComponent.CLUSTER).createServerSocket(this.serverPort, 50, null, -1);
     assertFalse(AvailablePort.isPortAvailable(this.serverPort, AvailablePort.SOCKET));
     
     // launch server


[28/50] [abbrv] incubator-geode git commit: GEODE-420: Fixing last few tests for LauncherLifecycleCommandsDUnitTest.java

Posted by ud...@apache.org.
GEODE-420: Fixing last few tests for LauncherLifecycleCommandsDUnitTest.java


Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/7272c644
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/7272c644
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/7272c644

Branch: refs/heads/develop
Commit: 7272c644493f04b5c8451c9fee5a9d09599e13c9
Parents: 59adbcc
Author: Udo Kohlmeyer <uk...@pivotal.io>
Authored: Tue Aug 30 12:21:11 2016 +1000
Committer: Udo Kohlmeyer <uk...@pivotal.io>
Committed: Tue Aug 30 12:21:11 2016 +1000

----------------------------------------------------------------------
 .../LauncherLifecycleCommandsDUnitTest.java     | 476 ++++++++++---------
 .../gemfire/distributed/LocatorLauncher.java    |   3 +-
 .../internal/tcpserver/TcpClient.java           |   5 +
 .../internal/net/SocketCreatorFactory.java      |   6 +-
 .../gemfire/management/JMXMBeanDUnitTest.java   |  25 -
 5 files changed, 253 insertions(+), 262 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/7272c644/geode-assembly/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/LauncherLifecycleCommandsDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-assembly/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/LauncherLifecycleCommandsDUnitTest.java b/geode-assembly/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/LauncherLifecycleCommandsDUnitTest.java
index 1d91834..1610b8e 100644
--- a/geode-assembly/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/LauncherLifecycleCommandsDUnitTest.java
+++ b/geode-assembly/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/LauncherLifecycleCommandsDUnitTest.java
@@ -16,8 +16,51 @@
  */
 package com.gemstone.gemfire.management.internal.cli.commands;
 
+import static com.gemstone.gemfire.distributed.ConfigurationProperties.*;
+import static com.gemstone.gemfire.test.dunit.Assert.*;
+import static com.gemstone.gemfire.test.dunit.Wait.*;
+
+import java.io.BufferedReader;
+import java.io.BufferedWriter;
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.FileReader;
+import java.io.FileWriter;
+import java.io.IOException;
+import java.io.OutputStreamWriter;
+import java.lang.management.ManagementFactory;
+import java.net.InetAddress;
+import java.nio.charset.Charset;
+import java.text.DateFormat;
+import java.text.MessageFormat;
+import java.text.SimpleDateFormat;
+import java.util.Calendar;
+import java.util.Queue;
+import java.util.Set;
+import java.util.concurrent.ConcurrentLinkedDeque;
+import java.util.concurrent.TimeUnit;
+import javax.management.MBeanServerConnection;
+import javax.management.ObjectName;
+import javax.management.Query;
+import javax.management.QueryExp;
+import javax.management.remote.JMXConnector;
+import javax.management.remote.JMXConnectorFactory;
+import javax.management.remote.JMXServiceURL;
+
+import org.apache.commons.io.FileUtils;
+import org.junit.FixMethodOrder;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+import org.junit.runners.MethodSorters;
+
 import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.client.*;
+import com.gemstone.gemfire.cache.client.ClientCache;
+import com.gemstone.gemfire.cache.client.ClientCacheFactory;
+import com.gemstone.gemfire.cache.client.ClientRegionFactory;
+import com.gemstone.gemfire.cache.client.ClientRegionShortcut;
+import com.gemstone.gemfire.cache.client.Pool;
+import com.gemstone.gemfire.cache.client.PoolFactory;
+import com.gemstone.gemfire.cache.client.PoolManager;
 import com.gemstone.gemfire.distributed.AbstractLauncher.ServiceState;
 import com.gemstone.gemfire.distributed.AbstractLauncher.Status;
 import com.gemstone.gemfire.distributed.LocatorLauncher;
@@ -39,39 +82,10 @@ import com.gemstone.gemfire.management.internal.cli.result.CommandResult;
 import com.gemstone.gemfire.management.internal.cli.util.CommandStringBuilder;
 import com.gemstone.gemfire.test.dunit.WaitCriterion;
 import com.gemstone.gemfire.test.junit.categories.DistributedTest;
-import org.junit.FixMethodOrder;
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-import org.junit.runners.MethodSorters;
-
-import javax.management.MBeanServerConnection;
-import javax.management.ObjectName;
-import javax.management.Query;
-import javax.management.QueryExp;
-import javax.management.remote.JMXConnector;
-import javax.management.remote.JMXConnectorFactory;
-import javax.management.remote.JMXServiceURL;
-import java.io.*;
-import java.lang.management.ManagementFactory;
-import java.net.InetAddress;
-import java.nio.charset.Charset;
-import java.text.DateFormat;
-import java.text.MessageFormat;
-import java.text.SimpleDateFormat;
-import java.util.Calendar;
-import java.util.Queue;
-import java.util.Set;
-import java.util.concurrent.ConcurrentLinkedDeque;
-import java.util.concurrent.TimeUnit;
-
-import static com.gemstone.gemfire.distributed.ConfigurationProperties.*;
-import static com.gemstone.gemfire.test.dunit.Assert.*;
-import static com.gemstone.gemfire.test.dunit.Wait.waitForCriterion;
 
 /**
  * The LauncherLifecycleCommandsDUnitTest class is a test suite of integration tests testing the contract and
  * functionality of the GemFire launcher lifecycle commands inside Gfsh.
- *
  * @see javax.management.MBeanServerConnection
  * @see javax.management.remote.JMXConnector
  * @see com.gemstone.gemfire.distributed.AbstractLauncher
@@ -88,8 +102,6 @@ import static com.gemstone.gemfire.test.dunit.Wait.waitForCriterion;
 @FixMethodOrder(MethodSorters.NAME_ASCENDING)
 public class LauncherLifecycleCommandsDUnitTest extends CliCommandTestBase {
 
-  protected static final long COMMAND_EXECUTION_TIMEOUT = TimeUnit.MINUTES.toSeconds(2);
-
   protected static final DateFormat TIMESTAMP = new SimpleDateFormat("yyyyMMddHHmmssSSS");
 
   private final Queue<Integer> processIds = new ConcurrentLinkedDeque<>();
@@ -98,13 +110,11 @@ public class LauncherLifecycleCommandsDUnitTest extends CliCommandTestBase {
     return getMemberId(InetAddress.getLocalHost().getHostName(), jmxManagerPort, memberName);
   }
 
-  protected static String getMemberId(final String jmxManagerHost, final int jmxManagerPort,
-      final String memberName) throws Exception {
+  protected static String getMemberId(final String jmxManagerHost, final int jmxManagerPort, final String memberName) throws Exception {
     JMXConnector connector = null;
 
     try {
-      connector = JMXConnectorFactory.connect(new JMXServiceURL(
-          String.format("service:jmx:rmi://%1$s/jndi/rmi://%1$s:%2$d/jmxrmi", jmxManagerHost, jmxManagerPort)));
+      connector = JMXConnectorFactory.connect(new JMXServiceURL(String.format("service:jmx:rmi://%1$s/jndi/rmi://%1$s:%2$d/jmxrmi", jmxManagerHost, jmxManagerPort)));
 
       MBeanServerConnection connection = connector.getMBeanServerConnection();
 
@@ -137,8 +147,7 @@ public class LauncherLifecycleCommandsDUnitTest extends CliCommandTestBase {
     while ((pid = processIds.poll()) != null) {
       if (launcherLifecycleCommands.isVmWithProcessIdRunning(pid)) {
         try {
-          String killCommand = String.format("%1$s %2$d", SystemUtils.isWindows() ? "taskkill /F /PID" : "kill -9",
-              pid);
+          String killCommand = String.format("%1$s %2$d", SystemUtils.isWindows() ? "taskkill /F /PID" : "kill -9", pid);
           Runtime.getRuntime().exec(killCommand);
         } catch (Throwable ignore) {
         }
@@ -161,15 +170,9 @@ public class LauncherLifecycleCommandsDUnitTest extends CliCommandTestBase {
   }
 
   protected Integer readPid(final File workingDirectory) throws IOException {
-    assertTrue(String.format("The working directory (%1$s) must exist!", workingDirectory),
-        workingDirectory != null && workingDirectory.isDirectory());
+    assertTrue(String.format("The working directory (%1$s) must exist!", workingDirectory), workingDirectory != null && workingDirectory.isDirectory());
 
-    File[] files = workingDirectory.listFiles(new FileFilter() {
-      @Override
-      public boolean accept(final File pathname) {
-        return (pathname != null && pathname.isFile() && pathname.getAbsolutePath().endsWith(".pid"));
-      }
-    });
+    File[] files = workingDirectory.listFiles(pathname -> (pathname != null && pathname.isFile() && pathname.getAbsolutePath().endsWith(".pid")));
 
     assertNotNull(files);
     assertTrue(files.length > 0);
@@ -195,11 +198,10 @@ public class LauncherLifecycleCommandsDUnitTest extends CliCommandTestBase {
   protected String serviceStateStatusStringNormalized(final String serviceStateStatus) {
     assertNotNull(serviceStateStatus);
     assertTrue("serviceStateStatus is missing 'Uptime': " + serviceStateStatus, serviceStateStatus.contains("Uptime"));
-    assertTrue("serviceStateStatus is missing 'JVM Arguments': " + serviceStateStatus,
-        serviceStateStatus.contains("JVM Arguments"));
+    assertTrue("serviceStateStatus is missing 'JVM Arguments': " + serviceStateStatus, serviceStateStatus.contains("JVM Arguments"));
 
-    return serviceStateStatus.substring(0, serviceStateStatus.indexOf("Uptime")).concat(
-        serviceStateStatus.substring(serviceStateStatus.indexOf("JVM Arguments")));
+    return serviceStateStatus.substring(0, serviceStateStatus.indexOf("Uptime"))
+                             .concat(serviceStateStatus.substring(serviceStateStatus.indexOf("JVM Arguments")));
   }
 
   protected Status stopLocator(final File workingDirectory) {
@@ -207,18 +209,14 @@ public class LauncherLifecycleCommandsDUnitTest extends CliCommandTestBase {
   }
 
   protected Status stopLocator(final String workingDirectory) {
-    return waitForGemFireProcessToStop(
-        new Builder().setCommand(Command.STOP).setWorkingDirectory(workingDirectory).build().stop(), workingDirectory);
-  }
-
-  protected Status stopServer(final File workingDirectory) {
-    return stopServer(IOUtils.tryGetCanonicalPathElseGetAbsolutePath(workingDirectory));
+    return waitForGemFireProcessToStop(new Builder().setCommand(Command.STOP).setWorkingDirectory(workingDirectory).build().stop(), workingDirectory);
   }
 
   protected Status stopServer(final String workingDirectory) {
-    return waitForGemFireProcessToStop(
-        new ServerLauncher.Builder().setCommand(ServerLauncher.Command.STOP).setWorkingDirectory(
-            workingDirectory).build().stop(), workingDirectory);
+    return waitForGemFireProcessToStop(new ServerLauncher.Builder().setCommand(ServerLauncher.Command.STOP)
+                                                                   .setWorkingDirectory(workingDirectory)
+                                                                   .build()
+                                                                   .stop(), workingDirectory);
   }
 
   protected String toString(final Result result) {
@@ -287,7 +285,7 @@ public class LauncherLifecycleCommandsDUnitTest extends CliCommandTestBase {
     final int locatorPort = AvailablePortHelper.getRandomAvailableTCPPort();
 
     String pathname = (getClass().getSimpleName() + "_" + getTestMethodName());
-    File workingDirectory = new File(pathname);
+    File workingDirectory = temporaryFolder.newFolder(pathname);
 
     assertTrue(workingDirectory.isDirectory() || workingDirectory.mkdir());
 
@@ -303,12 +301,11 @@ public class LauncherLifecycleCommandsDUnitTest extends CliCommandTestBase {
     CommandStringBuilder command = new CommandStringBuilder(CliStrings.START_LOCATOR);
 
     command.addOption(CliStrings.START_LOCATOR__MEMBER_NAME, pathname);
-    command.addOption(CliStrings.START_LOCATOR__DIR, pathname);
+    command.addOption(CliStrings.START_LOCATOR__DIR, workingDirectory.getCanonicalPath());
     command.addOption(CliStrings.START_LOCATOR__PORT, String.valueOf(locatorPort));
     command.addOption(CliStrings.START_LOCATOR__ENABLE__SHARED__CONFIGURATION, Boolean.FALSE.toString());
     command.addOption(CliStrings.START_LOCATOR__J, "-D" + DistributionConfig.GEMFIRE_PREFIX + "http-service-port=0");
-    command.addOption(CliStrings.START_LOCATOR__J,
-        "-D" + DistributionConfig.GEMFIRE_PREFIX + "jmx-manager-port=" + AvailablePortHelper.getRandomAvailableTCPPort());
+    command.addOption(CliStrings.START_LOCATOR__J, "-D" + DistributionConfig.GEMFIRE_PREFIX + "jmx-manager-port=" + AvailablePortHelper.getRandomAvailableTCPPort());
 
     CommandResult result = executeCommand(command.toString());
 
@@ -317,12 +314,10 @@ public class LauncherLifecycleCommandsDUnitTest extends CliCommandTestBase {
 
     String resultString = toString(result);
 
-    assertTrue(resultString, resultString.contains(
-        "Exception in thread \"main\" java.lang.RuntimeException: A PID file already exists and a Locator may be running in " + IOUtils.tryGetCanonicalFileElseGetAbsoluteFile(
-            workingDirectory)));
-    assertTrue(resultString, resultString.contains(
-        "Caused by: com.gemstone.gemfire.internal.process.FileAlreadyExistsException: Pid file already exists: " + IOUtils.tryGetCanonicalFileElseGetAbsoluteFile(
-            pidFile)));
+    assertTrue(resultString, resultString.contains("Exception in thread \"main\" java.lang.RuntimeException: A PID file already exists and a Locator may be running in " + IOUtils
+      .tryGetCanonicalFileElseGetAbsoluteFile(workingDirectory)));
+    assertTrue(resultString, resultString.contains("Caused by: com.gemstone.gemfire.internal.process.FileAlreadyExistsException: Pid file already exists: " + IOUtils
+      .tryGetCanonicalFileElseGetAbsoluteFile(pidFile)));
   }
 
   /*
@@ -344,12 +339,15 @@ public class LauncherLifecycleCommandsDUnitTest extends CliCommandTestBase {
   }
 
   @Test
-  public void test001StartLocatorFailsFastOnMissingGemFirePropertiesFile() {
+  public void test001StartLocatorFailsFastOnMissingGemFirePropertiesFile() throws IOException {
     String gemfirePropertiesPathname = "/path/to/missing/gemfire.properties";
 
     CommandStringBuilder command = new CommandStringBuilder(CliStrings.START_LOCATOR);
+    String pathName = getClass().getSimpleName().concat("_").concat(getTestMethodName());
+    final File workingDirectory = temporaryFolder.newFolder(pathName);
 
-    command.addOption(CliStrings.START_LOCATOR__MEMBER_NAME, getClass().getSimpleName().concat("_").concat(getTestMethodName()));
+    command.addOption(CliStrings.START_LOCATOR__MEMBER_NAME, pathName);
+    command.addOption(CliStrings.START_LOCATOR__DIR, workingDirectory.getCanonicalPath());
     command.addOption(CliStrings.START_LOCATOR__PORT, "0");
     command.addOption(CliStrings.START_LOCATOR__PROPERTIES, gemfirePropertiesPathname);
     command.addOption(CliStrings.START_LOCATOR__J, "-D" + DistributionConfig.GEMFIRE_PREFIX + "http-service-port=0");
@@ -364,18 +362,19 @@ public class LauncherLifecycleCommandsDUnitTest extends CliCommandTestBase {
 
     String resultString = toString(result);
 
-    assertTrue(resultString, resultString.contains(
-        MessageFormat.format(CliStrings.GEODE_0_PROPERTIES_1_NOT_FOUND_MESSAGE, StringUtils.EMPTY_STRING,
-            gemfirePropertiesPathname)));
+    assertTrue(resultString, resultString.contains(MessageFormat.format(CliStrings.GEODE_0_PROPERTIES_1_NOT_FOUND_MESSAGE, StringUtils.EMPTY_STRING, gemfirePropertiesPathname)));
   }
 
   @Test
-  public void test002StartLocatorFailsFastOnMissingGemFireSecurityPropertiesFile() {
+  public void test002StartLocatorFailsFastOnMissingGemFireSecurityPropertiesFile() throws IOException {
     String gemfireSecurityPropertiesPathname = "/path/to/missing/gemfire-security.properties";
+    String pathName = getClass().getSimpleName().concat("_").concat(getTestMethodName());
+    final File workingDirectory = temporaryFolder.newFolder(pathName);
 
     CommandStringBuilder command = new CommandStringBuilder(CliStrings.START_LOCATOR);
 
-    command.addOption(CliStrings.START_LOCATOR__MEMBER_NAME, getClass().getSimpleName().concat("_").concat(getTestMethodName()));
+    command.addOption(CliStrings.START_LOCATOR__MEMBER_NAME, pathName);
+    command.addOption(CliStrings.START_LOCATOR__DIR, workingDirectory.getCanonicalPath());
     command.addOption(CliStrings.START_LOCATOR__PORT, "0");
     command.addOption(CliStrings.START_LOCATOR__SECURITY_PROPERTIES, gemfireSecurityPropertiesPathname);
     command.addOption(CliStrings.START_LOCATOR__J, "-D" + DistributionConfig.GEMFIRE_PREFIX + "http-service-port=0");
@@ -390,18 +389,19 @@ public class LauncherLifecycleCommandsDUnitTest extends CliCommandTestBase {
 
     String resultString = toString(result);
 
-    assertTrue(resultString, resultString.contains(
-        MessageFormat.format(CliStrings.GEODE_0_PROPERTIES_1_NOT_FOUND_MESSAGE, "Security ",
-            gemfireSecurityPropertiesPathname)));
+    assertTrue(resultString, resultString.contains(MessageFormat.format(CliStrings.GEODE_0_PROPERTIES_1_NOT_FOUND_MESSAGE, "Security ", gemfireSecurityPropertiesPathname)));
   }
 
   @Test
-  public void test003StartServerFailsFastOnMissingCacheXmlFile() {
+  public void test003StartServerFailsFastOnMissingCacheXmlFile() throws IOException {
     String cacheXmlPathname = "/path/to/missing/cache.xml";
 
     CommandStringBuilder command = new CommandStringBuilder(CliStrings.START_SERVER);
+    String pathName = getClass().getSimpleName().concat("_").concat(getTestMethodName());
+    final File workingDirectory = temporaryFolder.newFolder(pathName);
 
-    command.addOption(CliStrings.START_SERVER__NAME, getClass().getSimpleName().concat("_").concat(getTestMethodName()));
+    command.addOption(CliStrings.START_SERVER__NAME, pathName);
+    command.addOption(CliStrings.START_SERVER__DIR, workingDirectory.getCanonicalPath());
     command.addOption(CliStrings.START_SERVER__CACHE_XML_FILE, cacheXmlPathname);
 
     CommandResult result = executeCommand(command.toString());
@@ -411,17 +411,20 @@ public class LauncherLifecycleCommandsDUnitTest extends CliCommandTestBase {
 
     String resultString = toString(result);
 
-    assertTrue(resultString,
-        resultString.contains(MessageFormat.format(CliStrings.CACHE_XML_NOT_FOUND_MESSAGE, cacheXmlPathname)));
+    assertTrue(resultString, resultString.contains(MessageFormat.format(CliStrings.CACHE_XML_NOT_FOUND_MESSAGE, cacheXmlPathname)));
   }
 
   @Test
-  public void test004StartServerFailsFastOnMissingGemFirePropertiesFile() {
+  public void test004StartServerFailsFastOnMissingGemFirePropertiesFile() throws IOException {
     String gemfirePropertiesFile = "/path/to/missing/gemfire.properties";
 
     CommandStringBuilder command = new CommandStringBuilder(CliStrings.START_SERVER);
 
-    command.addOption(CliStrings.START_SERVER__NAME, getClass().getSimpleName().concat("_").concat(getTestMethodName()));
+    String pathName = getClass().getSimpleName().concat("_").concat(getTestMethodName());
+    final File workingDirectory = temporaryFolder.newFolder(pathName);
+
+    command.addOption(CliStrings.START_SERVER__NAME, pathName);
+    command.addOption(CliStrings.START_SERVER__DIR, workingDirectory.getCanonicalPath());
     command.addOption(CliStrings.START_SERVER__PROPERTIES, gemfirePropertiesFile);
 
     CommandResult result = executeCommand(command.toString());
@@ -431,18 +434,20 @@ public class LauncherLifecycleCommandsDUnitTest extends CliCommandTestBase {
 
     String resultString = toString(result);
 
-    assertTrue(resultString, resultString.contains(
-        MessageFormat.format(CliStrings.GEODE_0_PROPERTIES_1_NOT_FOUND_MESSAGE, StringUtils.EMPTY_STRING,
-            gemfirePropertiesFile)));
+    assertTrue(resultString, resultString.contains(MessageFormat.format(CliStrings.GEODE_0_PROPERTIES_1_NOT_FOUND_MESSAGE, StringUtils.EMPTY_STRING, gemfirePropertiesFile)));
   }
 
   @Test
-  public void test005StartServerFailsFastOnMissingGemFireSecurityPropertiesFile() {
+  public void test005StartServerFailsFastOnMissingGemFireSecurityPropertiesFile() throws IOException {
     String gemfireSecuritiesPropertiesFile = "/path/to/missing/gemfire-securities.properties";
 
     CommandStringBuilder command = new CommandStringBuilder(CliStrings.START_SERVER);
 
-    command.addOption(CliStrings.START_SERVER__NAME, getClass().getSimpleName().concat("_").concat(getTestMethodName()));
+    String pathName = getClass().getSimpleName().concat("_").concat(getTestMethodName());
+    final File workingDirectory = temporaryFolder.newFolder(pathName);
+
+    command.addOption(CliStrings.START_SERVER__NAME, pathName);
+    command.addOption(CliStrings.START_SERVER__DIR, workingDirectory.getCanonicalPath());
     command.addOption(CliStrings.START_SERVER__SECURITY_PROPERTIES, gemfireSecuritiesPropertiesFile);
 
     CommandResult result = executeCommand(command.toString());
@@ -452,9 +457,7 @@ public class LauncherLifecycleCommandsDUnitTest extends CliCommandTestBase {
 
     String resultString = toString(result);
 
-    assertTrue(resultString, resultString.contains(
-        MessageFormat.format(CliStrings.GEODE_0_PROPERTIES_1_NOT_FOUND_MESSAGE, "Security ",
-            gemfireSecuritiesPropertiesFile)));
+    assertTrue(resultString, resultString.contains(MessageFormat.format(CliStrings.GEODE_0_PROPERTIES_1_NOT_FOUND_MESSAGE, "Security ", gemfireSecuritiesPropertiesFile)));
   }
 
   @Test
@@ -475,8 +478,7 @@ public class LauncherLifecycleCommandsDUnitTest extends CliCommandTestBase {
       command.addOption(CliStrings.START_LOCATOR__PORT, String.valueOf(locatorPort));
       command.addOption(CliStrings.START_LOCATOR__ENABLE__SHARED__CONFIGURATION, Boolean.FALSE.toString());
       command.addOption(CliStrings.START_LOCATOR__J, "-D" + DistributionConfig.GEMFIRE_PREFIX + "http-service-port=0");
-      command.addOption(CliStrings.START_LOCATOR__J,
-          "-D" + DistributionConfig.GEMFIRE_PREFIX + "jmx-manager-port=" + AvailablePortHelper.getRandomAvailableTCPPort());
+      command.addOption(CliStrings.START_LOCATOR__J, "-D" + DistributionConfig.GEMFIRE_PREFIX + "jmx-manager-port=" + AvailablePortHelper.getRandomAvailableTCPPort());
 
       CommandResult result = executeCommand(command.toString());
 
@@ -486,8 +488,7 @@ public class LauncherLifecycleCommandsDUnitTest extends CliCommandTestBase {
       String locatorOutput = toString(result);
 
       assertNotNull(locatorOutput);
-      assertTrue("Locator output was: " + locatorOutput,
-          locatorOutput.contains("Locator in " + IOUtils.tryGetCanonicalFileElseGetAbsoluteFile(workingDirectory)));
+      assertTrue("Locator output was: " + locatorOutput, locatorOutput.contains("Locator in " + IOUtils.tryGetCanonicalFileElseGetAbsoluteFile(workingDirectory)));
     } finally {
       stopLocator(workingDirectory);
     }
@@ -499,19 +500,18 @@ public class LauncherLifecycleCommandsDUnitTest extends CliCommandTestBase {
 
     assertNotNull(result);
     assertEquals(Result.Status.ERROR, result.getStatus());
-    assertEquals(CliStrings.format(CliStrings.STATUS_SERVICE__GFSH_NOT_CONNECTED_ERROR_MESSAGE, "Locator"),
-        StringUtils.trim(toString(result)));
+    assertEquals(CliStrings.format(CliStrings.STATUS_SERVICE__GFSH_NOT_CONNECTED_ERROR_MESSAGE, "Locator"), StringUtils.trim(toString(result)));
   }
 
   @Test
-  public void test008StatusLocatorUsingMemberName() {
+  public void test008StatusLocatorUsingMemberName() throws IOException {
     final int[] ports = AvailablePortHelper.getRandomAvailableTCPPorts(2);
 
     final int jmxManagerPort = ports[0];
     final int locatorPort = ports[1];
 
     String pathname = (getClass().getSimpleName() + "_" + getTestMethodName());
-    File workingDirectory = new File(pathname);
+    File workingDirectory = temporaryFolder.newFolder(pathname);
 
     assertTrue(workingDirectory.isDirectory() || workingDirectory.mkdir());
 
@@ -520,7 +520,7 @@ public class LauncherLifecycleCommandsDUnitTest extends CliCommandTestBase {
 
       command.addOption(CliStrings.START_LOCATOR__MEMBER_NAME, pathname);
       command.addOption(CliStrings.START_LOCATOR__CONNECT, Boolean.FALSE.toString());
-      command.addOption(CliStrings.START_LOCATOR__DIR, pathname);
+      command.addOption(CliStrings.START_LOCATOR__DIR, workingDirectory.getCanonicalPath());
       command.addOption(CliStrings.START_LOCATOR__PORT, String.valueOf(locatorPort));
       command.addOption(CliStrings.START_LOCATOR__ENABLE__SHARED__CONFIGURATION, Boolean.FALSE.toString());
       command.addOption(CliStrings.START_LOCATOR__FORCE, Boolean.TRUE.toString());
@@ -532,9 +532,11 @@ public class LauncherLifecycleCommandsDUnitTest extends CliCommandTestBase {
       assertNotNull(result);
       assertEquals(Result.Status.OK, result.getStatus());
 
-      LocatorLauncher locatorLauncher = new LocatorLauncher.Builder().setCommand(
-          LocatorLauncher.Command.STATUS).setBindAddress(null).setPort(locatorPort).setWorkingDirectory(
-          workingDirectory.getPath()).build();
+      LocatorLauncher locatorLauncher = new LocatorLauncher.Builder().setCommand(LocatorLauncher.Command.STATUS)
+                                                                     .setBindAddress(null)
+                                                                     .setPort(locatorPort)
+                                                                     .setWorkingDirectory(workingDirectory.getPath())
+                                                                     .build();
 
       assertNotNull(locatorLauncher);
 
@@ -552,17 +554,16 @@ public class LauncherLifecycleCommandsDUnitTest extends CliCommandTestBase {
 
       assertNotNull(result);
       assertEquals(Result.Status.ERROR, result.getStatus());
-      assertEquals(CliStrings.format(CliStrings.STATUS_LOCATOR__NO_LOCATOR_FOUND_FOR_MEMBER_ERROR_MESSAGE,
-          "invalidLocatorMemberName"), StringUtils.trim(toString(result)));
+      assertEquals(CliStrings.format(CliStrings.STATUS_LOCATOR__NO_LOCATOR_FOUND_FOR_MEMBER_ERROR_MESSAGE, "invalidLocatorMemberName"), StringUtils.trim(toString(result)));
 
       result = executeCommand(String.format("%1$s --name=%2$s", CliStrings.STATUS_LOCATOR, pathname));
 
       assertNotNull(result);
       assertEquals(Result.Status.OK, result.getStatus());
-      assertTrue(serviceStateStatusStringNormalized(toString(result)).contains(
-          serviceStateStatusStringNormalized(expectedLocatorState)));
+      assertTrue(serviceStateStatusStringNormalized(toString(result)).contains(serviceStateStatusStringNormalized(expectedLocatorState)));
     } finally {
       stopLocator(workingDirectory);
+      FileUtils.copyDirectory(workingDirectory.getCanonicalFile(), new File("/tmp"));
     }
   }
 
@@ -574,7 +575,7 @@ public class LauncherLifecycleCommandsDUnitTest extends CliCommandTestBase {
     final int locatorPort = ports[1];
 
     String pathname = (getClass().getSimpleName() + "_" + getTestMethodName());
-    File workingDirectory = new File(pathname);
+    File workingDirectory = temporaryFolder.newFolder(pathname);
 
     assertTrue(workingDirectory.isDirectory() || workingDirectory.mkdir());
 
@@ -583,7 +584,7 @@ public class LauncherLifecycleCommandsDUnitTest extends CliCommandTestBase {
 
       command.addOption(CliStrings.START_LOCATOR__MEMBER_NAME, pathname);
       command.addOption(CliStrings.START_LOCATOR__CONNECT, Boolean.FALSE.toString());
-      command.addOption(CliStrings.START_LOCATOR__DIR, pathname);
+      command.addOption(CliStrings.START_LOCATOR__DIR, workingDirectory.getCanonicalPath());
       command.addOption(CliStrings.START_LOCATOR__PORT, String.valueOf(locatorPort));
       command.addOption(CliStrings.START_LOCATOR__ENABLE__SHARED__CONFIGURATION, Boolean.FALSE.toString());
       command.addOption(CliStrings.START_LOCATOR__FORCE, Boolean.TRUE.toString());
@@ -595,9 +596,11 @@ public class LauncherLifecycleCommandsDUnitTest extends CliCommandTestBase {
       assertNotNull(result);
       assertEquals(Result.Status.OK, result.getStatus());
 
-      LocatorLauncher locatorLauncher = new LocatorLauncher.Builder().setCommand(
-          LocatorLauncher.Command.STATUS).setBindAddress(null).setPort(locatorPort).setWorkingDirectory(
-          workingDirectory.getPath()).build();
+      LocatorLauncher locatorLauncher = new LocatorLauncher.Builder().setCommand(LocatorLauncher.Command.STATUS)
+                                                                     .setBindAddress(null)
+                                                                     .setPort(locatorPort)
+                                                                     .setWorkingDirectory(workingDirectory.getPath())
+                                                                     .build();
 
       assertNotNull(locatorLauncher);
 
@@ -611,15 +614,14 @@ public class LauncherLifecycleCommandsDUnitTest extends CliCommandTestBase {
       assertNotNull(result);
       assertEquals(Result.Status.OK, result.getStatus());
 
-      result = executeCommand(
-          String.format("%1$s --name=%2$s", CliStrings.STATUS_LOCATOR, getMemberId(jmxManagerPort, pathname)));
+      result = executeCommand(String.format("%1$s --name=%2$s", CliStrings.STATUS_LOCATOR, getMemberId(jmxManagerPort, pathname)));
 
       assertNotNull(result);
       assertEquals(Result.Status.OK, result.getStatus());
-      assertTrue(serviceStateStatusStringNormalized(toString(result)).contains(
-          serviceStateStatusStringNormalized(expectedLocatorState)));
+      assertTrue(serviceStateStatusStringNormalized(toString(result)).contains(serviceStateStatusStringNormalized(expectedLocatorState)));
     } finally {
       stopLocator(workingDirectory);
+      FileUtils.copyDirectory(workingDirectory.getCanonicalFile(), new File("/tmp"));
     }
   }
 
@@ -629,95 +631,100 @@ public class LauncherLifecycleCommandsDUnitTest extends CliCommandTestBase {
 
     assertNotNull(result);
     assertEquals(Result.Status.ERROR, result.getStatus());
-    assertEquals(CliStrings.format(CliStrings.STOP_SERVICE__GFSH_NOT_CONNECTED_ERROR_MESSAGE, "Locator"),
-        StringUtils.trim(toString(result)));
+    assertEquals(CliStrings.format(CliStrings.STOP_SERVICE__GFSH_NOT_CONNECTED_ERROR_MESSAGE, "Locator"), StringUtils.trim(toString(result)));
   }
 
   @Test
-  public void test011StopLocatorUsingMemberName() {
+  public void test011StopLocatorUsingMemberName() throws IOException {
     final int[] ports = AvailablePortHelper.getRandomAvailableTCPPorts(2);
 
     final int jmxManagerPort = ports[0];
     final int locatorPort = ports[1];
 
     String pathname = (getClass().getSimpleName() + "_" + getTestMethodName());
-    File workingDirectory = new File(pathname);
+    File workingDirectory = temporaryFolder.newFolder(pathname);
 
-    assertTrue(workingDirectory.isDirectory() || workingDirectory.mkdir());
+    try {
+      assertTrue(workingDirectory.isDirectory() || workingDirectory.mkdir());
 
-    CommandStringBuilder command = new CommandStringBuilder(CliStrings.START_LOCATOR);
+      CommandStringBuilder command = new CommandStringBuilder(CliStrings.START_LOCATOR);
 
-    command.addOption(CliStrings.START_LOCATOR__MEMBER_NAME, pathname);
-    command.addOption(CliStrings.START_LOCATOR__CONNECT, Boolean.FALSE.toString());
-    command.addOption(CliStrings.START_LOCATOR__DIR, pathname);
-    command.addOption(CliStrings.START_LOCATOR__PORT, String.valueOf(locatorPort));
-    command.addOption(CliStrings.START_LOCATOR__ENABLE__SHARED__CONFIGURATION, Boolean.FALSE.toString());
-    command.addOption(CliStrings.START_LOCATOR__FORCE, Boolean.TRUE.toString());
-    command.addOption(CliStrings.START_LOCATOR__J, "-D" + DistributionConfig.GEMFIRE_PREFIX + "http-service-port=0");
-    command.addOption(CliStrings.START_LOCATOR__J, "-D" + DistributionConfig.GEMFIRE_PREFIX + "jmx-manager-port=" + jmxManagerPort);
+      command.addOption(CliStrings.START_LOCATOR__MEMBER_NAME, pathname);
+      command.addOption(CliStrings.START_LOCATOR__CONNECT, Boolean.FALSE.toString());
+      command.addOption(CliStrings.START_LOCATOR__DIR, workingDirectory.getCanonicalPath());
+      command.addOption(CliStrings.START_LOCATOR__PORT, String.valueOf(locatorPort));
+      command.addOption(CliStrings.START_LOCATOR__ENABLE__SHARED__CONFIGURATION, Boolean.FALSE.toString());
+      command.addOption(CliStrings.START_LOCATOR__FORCE, Boolean.TRUE.toString());
+      command.addOption(CliStrings.START_LOCATOR__J, "-D" + DistributionConfig.GEMFIRE_PREFIX + "http-service-port=0");
+      command.addOption(CliStrings.START_LOCATOR__J, "-D" + DistributionConfig.GEMFIRE_PREFIX + "jmx-manager-port=" + jmxManagerPort);
 
-    CommandResult result = executeCommand(command.toString());
+      CommandResult result = executeCommand(command.toString());
 
-    assertNotNull(result);
-    assertEquals(Result.Status.OK, result.getStatus());
+      assertNotNull(result);
+      assertEquals(Result.Status.OK, result.getStatus());
 
-    final LocatorLauncher locatorLauncher = new LocatorLauncher.Builder().setCommand(
-        LocatorLauncher.Command.STOP).setBindAddress(null).setPort(locatorPort).setWorkingDirectory(
-        workingDirectory.getPath()).build();
+      final LocatorLauncher locatorLauncher = new Builder().setCommand(Command.STOP)
+                                                           .setBindAddress(null)
+                                                           .setPort(locatorPort)
+                                                           .setWorkingDirectory(workingDirectory.getPath())
+                                                           .build();
 
-    assertNotNull(locatorLauncher);
+      assertNotNull(locatorLauncher);
 
-    LocatorState locatorStatus = locatorLauncher.waitOnStatusResponse(60, 10, TimeUnit.SECONDS);
+      LocatorState locatorStatus = locatorLauncher.waitOnStatusResponse(60, 10, TimeUnit.SECONDS);
 
-    assertNotNull(locatorStatus);
-    assertEquals(Status.ONLINE, locatorStatus.getStatus());
+      assertNotNull(locatorStatus);
+      assertEquals(Status.ONLINE, locatorStatus.getStatus());
 
-    result = executeCommand(String.format("%1$s --locator=localhost[%2$d]", CliStrings.CONNECT, locatorPort));
+      result = executeCommand(String.format("%1$s --locator=localhost[%2$d]", CliStrings.CONNECT, locatorPort));
 
-    assertNotNull(result);
-    assertEquals(Result.Status.OK, result.getStatus());
+      assertNotNull(result);
+      assertEquals(Result.Status.OK, result.getStatus());
 
-    result = executeCommand(String.format("%1$s --name=invalidLocatorMemberName", CliStrings.STOP_LOCATOR));
+      result = executeCommand(String.format("%1$s --name=invalidLocatorMemberName", CliStrings.STOP_LOCATOR));
 
-    assertNotNull(result);
-    assertEquals(Result.Status.ERROR, result.getStatus());
-    assertEquals(CliStrings.format(CliStrings.STOP_LOCATOR__NO_LOCATOR_FOUND_FOR_MEMBER_ERROR_MESSAGE,
-        "invalidLocatorMemberName"), StringUtils.trim(toString(result)));
+      assertNotNull(result);
+      assertEquals(Result.Status.ERROR, result.getStatus());
+      assertEquals(CliStrings.format(CliStrings.STOP_LOCATOR__NO_LOCATOR_FOUND_FOR_MEMBER_ERROR_MESSAGE, "invalidLocatorMemberName"), StringUtils.trim(toString(result)));
 
-    locatorStatus = locatorLauncher.status();
+      locatorStatus = locatorLauncher.status();
 
-    assertNotNull(locatorStatus);
-    assertEquals(Status.ONLINE, locatorStatus.getStatus());
+      assertNotNull(locatorStatus);
+      assertEquals(Status.ONLINE, locatorStatus.getStatus());
 
-    result = executeCommand(String.format("%1$s --name=%2$s", CliStrings.STOP_LOCATOR, pathname));
+      result = executeCommand(String.format("%1$s --name=%2$s", CliStrings.STOP_LOCATOR, pathname));
 
-    assertNotNull(result);
-    assertEquals(Result.Status.OK, result.getStatus());
+      assertNotNull(result);
+      assertEquals(Result.Status.OK, result.getStatus());
 
-    // TODO figure out what output to assert and validate on now that 'stop locator' uses Gfsh's logger
-    // and standard err/out...
-    //assertIndexDetailsEquals(CliStrings.format(CliStrings.STOP_LOCATOR__SHUTDOWN_MEMBER_MESSAGE, pathname),
-    //  StringUtils.trim(toString(result)));
+      // TODO figure out what output to assert and validate on now that 'stop locator' uses Gfsh's logger
+      // and standard err/out...
+      //assertIndexDetailsEquals(CliStrings.format(CliStrings.STOP_LOCATOR__SHUTDOWN_MEMBER_MESSAGE, pathname),
+      //  StringUtils.trim(toString(result)));
 
-    WaitCriterion waitCriteria = new WaitCriterion() {
-      @Override
-      public boolean done() {
-        final LocatorState locatorStatus = locatorLauncher.status();
-        return (locatorStatus != null && Status.NOT_RESPONDING.equals(locatorStatus.getStatus()));
-      }
+      WaitCriterion waitCriteria = new WaitCriterion() {
+        @Override
+        public boolean done() {
+          final LocatorState locatorStatus = locatorLauncher.status();
+          return (locatorStatus != null && Status.NOT_RESPONDING.equals(locatorStatus.getStatus()));
+        }
 
-      @Override
-      public String description() {
-        return "wait for the Locator to stop; the Locator will no longer respond after it stops";
-      }
-    };
+        @Override
+        public String description() {
+          return "wait for the Locator to stop; the Locator will no longer respond after it stops";
+        }
+      };
 
-    waitForCriterion(waitCriteria, 15 * 1000, 5000, true);
+      waitForCriterion(waitCriteria, 15 * 1000, 5000, true);
 
-    locatorStatus = locatorLauncher.status();
+      locatorStatus = locatorLauncher.status();
+
+      assertNotNull(locatorStatus);
+      assertEquals(Status.NOT_RESPONDING, locatorStatus.getStatus());
+    } finally {
+      FileUtils.copyDirectory(workingDirectory.getCanonicalFile(), new File("/tmp"));
+    }
 
-    assertNotNull(locatorStatus);
-    assertEquals(Status.NOT_RESPONDING, locatorStatus.getStatus());
   }
 
   // @see Trac Bug # 46760
@@ -729,73 +736,79 @@ public class LauncherLifecycleCommandsDUnitTest extends CliCommandTestBase {
     final int locatorPort = ports[1];
 
     String pathname = (getClass().getSimpleName() + "_" + getTestMethodName());
-    File workingDirectory = new File(pathname);
+    File workingDirectory = temporaryFolder.newFolder(pathname);
 
-    assertTrue(workingDirectory.isDirectory() || workingDirectory.mkdir());
+    try {
+      assertTrue(workingDirectory.isDirectory() || workingDirectory.mkdir());
 
-    CommandStringBuilder command = new CommandStringBuilder(CliStrings.START_LOCATOR);
+      CommandStringBuilder command = new CommandStringBuilder(CliStrings.START_LOCATOR);
 
-    command.addOption(CliStrings.START_LOCATOR__MEMBER_NAME, pathname);
-    command.addOption(CliStrings.START_LOCATOR__CONNECT, Boolean.FALSE.toString());
-    command.addOption(CliStrings.START_LOCATOR__DIR, pathname);
-    command.addOption(CliStrings.START_LOCATOR__PORT, String.valueOf(locatorPort));
-    command.addOption(CliStrings.START_LOCATOR__ENABLE__SHARED__CONFIGURATION, Boolean.FALSE.toString());
-    command.addOption(CliStrings.START_LOCATOR__FORCE, Boolean.TRUE.toString());
-    command.addOption(CliStrings.START_LOCATOR__J, "-D" + DistributionConfig.GEMFIRE_PREFIX + "http-service-port=0");
-    command.addOption(CliStrings.START_LOCATOR__J, "-D" + DistributionConfig.GEMFIRE_PREFIX + "jmx-manager-port=" + jmxManagerPort);
+      command.addOption(CliStrings.START_LOCATOR__MEMBER_NAME, pathname);
+      command.addOption(CliStrings.START_LOCATOR__CONNECT, Boolean.FALSE.toString());
+      command.addOption(CliStrings.START_LOCATOR__DIR, workingDirectory.getCanonicalPath());
+      command.addOption(CliStrings.START_LOCATOR__PORT, String.valueOf(locatorPort));
+      command.addOption(CliStrings.START_LOCATOR__ENABLE__SHARED__CONFIGURATION, Boolean.FALSE.toString());
+      command.addOption(CliStrings.START_LOCATOR__FORCE, Boolean.TRUE.toString());
+      command.addOption(CliStrings.START_LOCATOR__J, "-D" + DistributionConfig.GEMFIRE_PREFIX + "http-service-port=0");
+      command.addOption(CliStrings.START_LOCATOR__J, "-D" + DistributionConfig.GEMFIRE_PREFIX + "jmx-manager-port=" + jmxManagerPort);
 
-    CommandResult result = executeCommand(command.toString());
+      CommandResult result = executeCommand(command.toString());
 
-    assertNotNull(result);
-    assertEquals(Result.Status.OK, result.getStatus());
+      assertNotNull(result);
+      assertEquals(Result.Status.OK, result.getStatus());
 
-    final LocatorLauncher locatorLauncher = new LocatorLauncher.Builder().setCommand(
-        LocatorLauncher.Command.STOP).setBindAddress(null).setPort(locatorPort).setWorkingDirectory(
-        workingDirectory.getPath()).build();
+      final LocatorLauncher locatorLauncher = new Builder().setCommand(Command.STOP)
+                                                                           .setBindAddress(null)
+                                                                           .setPort(locatorPort)
+                                                                           .setWorkingDirectory(workingDirectory.getPath())
+                                                                           .build();
 
-    assertNotNull(locatorLauncher);
+      assertNotNull(locatorLauncher);
 
-    LocatorState locatorState = locatorLauncher.waitOnStatusResponse(60, 10, TimeUnit.SECONDS);
+      LocatorState locatorState = locatorLauncher.waitOnStatusResponse(60, 10, TimeUnit.SECONDS);
 
-    assertNotNull(locatorState);
-    assertEquals(Status.ONLINE, locatorState.getStatus());
+      assertNotNull(locatorState);
+      assertEquals(Status.ONLINE, locatorState.getStatus());
 
-    result = executeCommand(String.format("%1$s --locator=localhost[%2$d]", CliStrings.CONNECT, locatorPort));
+      result = executeCommand(String.format("%1$s --locator=localhost[%2$d]", CliStrings.CONNECT, locatorPort));
 
-    assertNotNull(result);
-    assertEquals(Result.Status.OK, result.getStatus());
+      assertNotNull(result);
+      assertEquals(Result.Status.OK, result.getStatus());
 
-    String memberId = getMemberId(jmxManagerPort, pathname);
+      String memberId = getMemberId(jmxManagerPort, pathname);
 
-    result = executeCommand(String.format("%1$s --name=%2$s", CliStrings.STOP_LOCATOR, memberId));
+      result = executeCommand(String.format("%1$s --name=%2$s", CliStrings.STOP_LOCATOR, memberId));
 
-    assertNotNull(result);
-    assertEquals(Result.Status.OK, result.getStatus());
+      assertNotNull(result);
+      assertEquals(Result.Status.OK, result.getStatus());
 
-    // TODO figure out what output to assert and validate on now that 'stop locator' uses Gfsh's logger
-    // and standard err/out...
-    //assertIndexDetailsEquals(CliStrings.format(CliStrings.STOP_LOCATOR__SHUTDOWN_MEMBER_MESSAGE, memberId),
-    //  StringUtils.trim(toString(result)));
+      // TODO figure out what output to assert and validate on now that 'stop locator' uses Gfsh's logger
+      // and standard err/out...
+      //assertIndexDetailsEquals(CliStrings.format(CliStrings.STOP_LOCATOR__SHUTDOWN_MEMBER_MESSAGE, memberId),
+      //  StringUtils.trim(toString(result)));
 
-    WaitCriterion waitCriteria = new WaitCriterion() {
-      @Override
-      public boolean done() {
-        LocatorState locatorState = locatorLauncher.status();
-        return (locatorState != null && Status.NOT_RESPONDING.equals(locatorState.getStatus()));
-      }
+      WaitCriterion waitCriteria = new WaitCriterion() {
+        @Override
+        public boolean done() {
+          LocatorState locatorState = locatorLauncher.status();
+          return (locatorState != null && Status.NOT_RESPONDING.equals(locatorState.getStatus()));
+        }
 
-      @Override
-      public String description() {
-        return "wait for the Locator to stop; the Locator will no longer respond after it stops";
-      }
-    };
+        @Override
+        public String description() {
+          return "wait for the Locator to stop; the Locator will no longer respond after it stops";
+        }
+      };
 
-    waitForCriterion(waitCriteria, 15 * 1000, 5000, true);
+      waitForCriterion(waitCriteria, 15 * 1000, 5000, true);
 
-    locatorState = locatorLauncher.status();
+      locatorState = locatorLauncher.status();
 
-    assertNotNull(locatorState);
-    assertEquals(Status.NOT_RESPONDING, locatorState.getStatus());
+      assertNotNull(locatorState);
+      assertEquals(Status.NOT_RESPONDING, locatorState.getStatus());
+    } finally {
+      FileUtils.copyDirectory(workingDirectory.getCanonicalFile(),new File("/tmp"));
+    }
   }
 
   @Test
@@ -805,7 +818,7 @@ public class LauncherLifecycleCommandsDUnitTest extends CliCommandTestBase {
     final int locatorPort = ports[1];
 
     String pathname = getClass().getSimpleName().concat("_").concat(getTestMethodName());
-    File workingDirectory = new File(pathname);
+    File workingDirectory = temporaryFolder.newFolder(pathname);
 
     assertTrue(workingDirectory.isDirectory() || workingDirectory.mkdir());
 
@@ -816,12 +829,10 @@ public class LauncherLifecycleCommandsDUnitTest extends CliCommandTestBase {
     command.addOption(CliStrings.START_SERVER__USE_CLUSTER_CONFIGURATION, Boolean.FALSE.toString());
     command.addOption(CliStrings.START_SERVER__MAXHEAP, "10M");
     command.addOption(CliStrings.START_SERVER__LOG_LEVEL, "config");
-    command.addOption(CliStrings.START_SERVER__DIR, pathname);
-    command.addOption(CliStrings.START_SERVER__CACHE_XML_FILE,
-        IOUtils.tryGetCanonicalPathElseGetAbsolutePath(writeAndGetCacheXmlFile(workingDirectory)));
+    command.addOption(CliStrings.START_SERVER__DIR, workingDirectory.getCanonicalPath());
+    command.addOption(CliStrings.START_SERVER__CACHE_XML_FILE, IOUtils.tryGetCanonicalPathElseGetAbsolutePath(writeAndGetCacheXmlFile(workingDirectory)));
     command.addOption(CliStrings.START_SERVER__INCLUDE_SYSTEM_CLASSPATH);
-    command.addOption(CliStrings.START_SERVER__J,
-        "-D" + DistributionConfig.GEMFIRE_PREFIX + "" + START_LOCATOR + "=localhost[" + locatorPort + "]");
+    command.addOption(CliStrings.START_SERVER__J, "-D" + DistributionConfig.GEMFIRE_PREFIX + "" + START_LOCATOR + "=localhost[" + locatorPort + "]");
 
 
     CommandResult result = executeCommand(command.toString());
@@ -830,9 +841,9 @@ public class LauncherLifecycleCommandsDUnitTest extends CliCommandTestBase {
     assertNotNull(result);
     assertEquals(Result.Status.OK, result.getStatus());
 
-    ServerLauncher serverLauncher = new ServerLauncher.Builder().setCommand(
-        ServerLauncher.Command.STATUS).setWorkingDirectory(
-        IOUtils.tryGetCanonicalPathElseGetAbsolutePath(workingDirectory)).build();
+    ServerLauncher serverLauncher = new ServerLauncher.Builder().setCommand(ServerLauncher.Command.STATUS)
+                                                                .setWorkingDirectory(IOUtils.tryGetCanonicalPathElseGetAbsolutePath(workingDirectory))
+                                                                .build();
 
     assertNotNull(serverLauncher);
 
@@ -905,8 +916,7 @@ public class LauncherLifecycleCommandsDUnitTest extends CliCommandTestBase {
     BufferedWriter fileWriter = null;
 
     try {
-      fileWriter = new BufferedWriter(
-          new OutputStreamWriter(new FileOutputStream(cacheXml, false), Charset.forName("UTF-8").newEncoder()));
+      fileWriter = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(cacheXml, false), Charset.forName("UTF-8").newEncoder()));
       fileWriter.write(buffer.toString());
       fileWriter.flush();
     } finally {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/7272c644/geode-core/src/main/java/com/gemstone/gemfire/distributed/LocatorLauncher.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/distributed/LocatorLauncher.java b/geode-core/src/main/java/com/gemstone/gemfire/distributed/LocatorLauncher.java
index 0b1efd3..2f16c59 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/distributed/LocatorLauncher.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/distributed/LocatorLauncher.java
@@ -21,6 +21,7 @@ import static com.gemstone.gemfire.distributed.ConfigurationProperties.*;
 
 import com.gemstone.gemfire.cache.client.internal.locator.*;
 import com.gemstone.gemfire.distributed.internal.DistributionConfig;
+import com.gemstone.gemfire.distributed.internal.DistributionConfigImpl;
 import com.gemstone.gemfire.distributed.internal.InternalLocator;
 import com.gemstone.gemfire.distributed.internal.tcpserver.*;
 import com.gemstone.gemfire.internal.DistributionLocator;
@@ -249,7 +250,7 @@ public final class LocatorLauncher extends AbstractLauncher<String> {
     final int timeout = Integer.MAX_VALUE; // 2 minutes
 
     try {
-      TcpClient client = new TcpClient();
+      TcpClient client = new TcpClient(new DistributionConfigImpl(new Properties()));
       return (LocatorStatusResponse) client.requestToServer(bindAddress, port,
         new LocatorStatusRequest(), timeout, true);
     }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/7272c644/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/tcpserver/TcpClient.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/tcpserver/TcpClient.java b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/tcpserver/TcpClient.java
index 78c6d95..9aaee9f 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/tcpserver/TcpClient.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/tcpserver/TcpClient.java
@@ -33,6 +33,7 @@ import org.apache.logging.log4j.Logger;
 
 import com.gemstone.gemfire.DataSerializer;
 import com.gemstone.gemfire.cache.UnsupportedVersionException;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
 import com.gemstone.gemfire.internal.Version;
 import com.gemstone.gemfire.internal.VersionedDataInputStream;
 import com.gemstone.gemfire.internal.VersionedDataOutputStream;
@@ -56,6 +57,10 @@ public class TcpClient {
 
   private final SocketCreator socketCreator;
 
+  public TcpClient(DistributionConfig distributionConfig) {
+    this(SocketCreatorFactory.setDistributionConfig(distributionConfig).getSocketCreatorForComponent(SecurableComponent.LOCATOR));
+  }
+
   /**
    * Constructs a new TcpClient using the default (Locator) SocketCreator.
    * SocketCreatorFactory should be initialized before invoking this method.

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/7272c644/geode-core/src/main/java/com/gemstone/gemfire/internal/net/SocketCreatorFactory.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/net/SocketCreatorFactory.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/net/SocketCreatorFactory.java
index 6e39381..337ca9c 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/net/SocketCreatorFactory.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/net/SocketCreatorFactory.java
@@ -79,7 +79,7 @@ public class SocketCreatorFactory {
         return createSSLSocketCreator(sslComponent, sslConfig);
       }
     }
-    return createSSLSocketCreator(SecurableComponent.NONE, sslConfig);
+    return createSSLSocketCreator(sslComponent, sslConfig);
   }
 
 
@@ -98,10 +98,10 @@ public class SocketCreatorFactory {
       socketCreator = new SocketCreator(sslConfig);
       registerSocketCreatorForComponent(sslEnableComponent, socketCreator);
     } else {
-      socketCreator = getRegisteredSocketCreatorForComponent(SecurableComponent.NONE);
+      socketCreator = getRegisteredSocketCreatorForComponent(sslEnableComponent);
       if (socketCreator == null) {
         socketCreator = new SocketCreator(sslConfig);
-        registerSocketCreatorForComponent(SecurableComponent.NONE, socketCreator);
+        registerSocketCreatorForComponent(sslEnableComponent, socketCreator);
       }
     }
     return socketCreator;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/7272c644/geode-core/src/test/java/com/gemstone/gemfire/management/JMXMBeanDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/JMXMBeanDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/JMXMBeanDUnitTest.java
index bc90ee0..f08c172 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/JMXMBeanDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/JMXMBeanDUnitTest.java
@@ -176,9 +176,6 @@ public class JMXMBeanDUnitTest extends DistributedTestCase {
       System.setProperty("javax.net.ssl.trustStore", useMulti ? getMultiKeyTruststore() : getSimpleSingleKeyKeystore());
       System.setProperty("javax.net.ssl.trustStoreType", "JKS");
       System.setProperty("javax.net.ssl.trustStorePassword", "password");
-//      System.setProperty("com.sun.management.jmxremote.ssl.need.client.auth", "true");
-//      System.setProperty("com.sun.management.jmxremote.ssl", "true");
-//      System.setProperty("com.sun.management.jmxremote.registry.ssl", "true");
       environment.put("com.sun.jndi.rmi.factory.socket", new SslRMIClientSocketFactory());
     }
 
@@ -227,12 +224,6 @@ public class JMXMBeanDUnitTest extends DistributedTestCase {
 
   }
 
-  private Properties configureServerProperties(final Properties properties, final String locators) {
-    configureCommonProperties(properties);
-    properties.setProperty(LOCATORS, locators);
-    return properties;
-  }
-
   private Properties configureJMXSSLProperties(final Properties properties, final boolean isLegacy, final boolean useMultiKey) {
     if (isLegacy) {
       properties.setProperty(JMX_MANAGER_SSL_CIPHERS, "any");
@@ -299,20 +290,4 @@ public class JMXMBeanDUnitTest extends DistributedTestCase {
     properties.setProperty(USE_CLUSTER_CONFIGURATION, "false");
     return properties;
   }
-
-  private static class GemFireRMIClientSocketFactory implements RMIClientSocketFactory, Serializable {
-
-    private static final long serialVersionUID = -7604285019188827617L;
-
-    private/* final hack to prevent serialization */ transient SocketCreator sc;
-
-    public GemFireRMIClientSocketFactory(SocketCreator sc) {
-      this.sc = sc;
-    }
-
-    @Override
-    public Socket createSocket(String host, int port) throws IOException {
-      return this.sc.connectForClient(host, port, 0/* no timeout */);
-    }
-  }
 }


[15/50] [abbrv] incubator-geode git commit: GEODE-420: Fixing Flaky test ignored exception

Posted by ud...@apache.org.
GEODE-420: Fixing Flaky test ignored exception


Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/12e73a9a
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/12e73a9a
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/12e73a9a

Branch: refs/heads/develop
Commit: 12e73a9acab967062402ef574cd43651776d352c
Parents: 981f2f0
Author: Udo Kohlmeyer <uk...@pivotal.io>
Authored: Fri Aug 19 07:24:58 2016 +1000
Committer: Udo Kohlmeyer <uk...@pivotal.io>
Committed: Fri Aug 19 07:24:58 2016 +1000

----------------------------------------------------------------------
 .../java/com/gemstone/gemfire/distributed/LocatorDUnitTest.java   | 3 +++
 1 file changed, 3 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/12e73a9a/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorDUnitTest.java
index 7d95e4a..851cff4 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorDUnitTest.java
@@ -557,6 +557,8 @@ public class LocatorDUnitTest extends JUnit4DistributedTestCase {
     IgnoredException expectedException2 = IgnoredException.addIgnoredException("unable to find valid certification path to requested target");
     IgnoredException expectedException3 = IgnoredException.addIgnoredException("Received fatal alert: certificate_unknown");
     disconnectAllFromDS();
+    IgnoredException expectedException4 = IgnoredException.addIgnoredException("Unrecognized SSL message, plaintext connection");
+    disconnectAllFromDS();
     Host host = Host.getHost(0);
     VM loc1 = host.getVM(1);
     VM loc2 = host.getVM(2);
@@ -605,6 +607,7 @@ public class LocatorDUnitTest extends JUnit4DistributedTestCase {
         expectedException.remove();
         expectedException2.remove();
         expectedException3.remove();
+        expectedException4.remove();
       }
     }
   }


[36/50] [abbrv] incubator-geode git commit: Merge branch 'develop' into feature/GEODE-420

Posted by ud...@apache.org.
Merge branch 'develop' into feature/GEODE-420


Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/a97ea4ee
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/a97ea4ee
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/a97ea4ee

Branch: refs/heads/develop
Commit: a97ea4ee5f9fd6d3ff9b0e955315d647cc697b4e
Parents: c8c2bdd 331cf28
Author: Udo Kohlmeyer <uk...@pivotal.io>
Authored: Thu Sep 1 04:37:30 2016 +1000
Committer: Udo Kohlmeyer <uk...@pivotal.io>
Committed: Thu Sep 1 04:37:30 2016 +1000

----------------------------------------------------------------------
 .../membership/gms/interfaces/Messenger.java    |    6 +-
 .../gemfire/internal/cache/ExpiryTask.java      |    4 +
 .../internal/cache/GemFireCacheImpl.java        |   16 +-
 .../gemfire/internal/cache/LocalRegion.java     |    7 +-
 .../com/gemstone/gemfire/TXExpiryJUnitTest.java |    4 +
 .../cache30/ClientServerCCEDUnitTest.java       | 1350 +++++++++---------
 .../gemfire/cache30/RegionTestCase.java         |   57 +-
 7 files changed, 787 insertions(+), 657 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/a97ea4ee/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/GemFireCacheImpl.java
----------------------------------------------------------------------


[41/50] [abbrv] incubator-geode git commit: Merge branch 'feature/GEODE-420' into feature/GEODE-1792

Posted by ud...@apache.org.
Merge branch 'feature/GEODE-420' into feature/GEODE-1792


Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/d79a944b
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/d79a944b
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/d79a944b

Branch: refs/heads/develop
Commit: d79a944b6ada74eeb8214a0c60a728e57152b7f8
Parents: 156d2d1 6853f56
Author: Udo Kohlmeyer <uk...@pivotal.io>
Authored: Wed Sep 7 03:30:14 2016 +1000
Committer: Udo Kohlmeyer <uk...@pivotal.io>
Committed: Wed Sep 7 03:30:14 2016 +1000

----------------------------------------------------------------------
 .../internal/DistributionConfigImpl.java        |  15 +-
 .../gemfire/internal/AbstractConfig.java        |   5 +
 .../internal/security/SecurableComponent.java   |   6 +-
 .../internal/JmxManagerLocatorRequest.java      |   6 +-
 .../internal/cli/commands/ShellCommands.java    |  13 +-
 .../ConnectToLocatorSSLDUnitTest.java           | 151 +++++++++++++++++++
 6 files changed, 178 insertions(+), 18 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/d79a944b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionConfigImpl.java
----------------------------------------------------------------------


[26/50] [abbrv] incubator-geode git commit: GEODE-420: Fixing locators property configuration

Posted by ud...@apache.org.
GEODE-420: Fixing locators property configuration


Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/a455526b
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/a455526b
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/a455526b

Branch: refs/heads/develop
Commit: a455526b858dc949d056feedf6ca18d4db000e3c
Parents: 1cc8d4e
Author: Udo Kohlmeyer <uk...@pivotal.io>
Authored: Fri Aug 26 05:09:41 2016 +1000
Committer: Udo Kohlmeyer <uk...@pivotal.io>
Committed: Fri Aug 26 05:09:41 2016 +1000

----------------------------------------------------------------------
 .../gemfire/management/JMXMBeanDUnitTest.java   |  8 ++--
 .../rules/LocatorServerConfigurationRule.java   | 42 ++++++++------------
 2 files changed, 22 insertions(+), 28 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/a455526b/geode-core/src/test/java/com/gemstone/gemfire/management/JMXMBeanDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/JMXMBeanDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/JMXMBeanDUnitTest.java
index 022bfee..bc90ee0 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/JMXMBeanDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/JMXMBeanDUnitTest.java
@@ -37,7 +37,6 @@ import javax.management.remote.JMXServiceURL;
 import javax.rmi.ssl.SslRMIClientSocketFactory;
 
 import org.junit.Before;
-import org.junit.Ignore;
 import org.junit.Rule;
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
@@ -133,10 +132,10 @@ public class JMXMBeanDUnitTest extends DistributedTestCase {
   //  To be fixed in GEODE-1716
   public void testJMXOverLegacySSL() throws Exception {
     Properties properties = configureLocatorProperties(new Properties(), jmxPort, serverHostName, true, true, false);
-//    locator.invoke("Configure and start Locator", () -> {
+    locator.invoke("Configure and start Locator", () -> {
       System.setProperty("javax.ssl.debug", "true");
       configureAndStartLocator(locatorPort, jmxPort, serverHostName, properties);
-//    });
+    });
 
     jmxClient.invoke("Configure and start JMX Client", () -> {
       System.setProperty("javax.ssl.debug", "true");
@@ -177,6 +176,9 @@ public class JMXMBeanDUnitTest extends DistributedTestCase {
       System.setProperty("javax.net.ssl.trustStore", useMulti ? getMultiKeyTruststore() : getSimpleSingleKeyKeystore());
       System.setProperty("javax.net.ssl.trustStoreType", "JKS");
       System.setProperty("javax.net.ssl.trustStorePassword", "password");
+//      System.setProperty("com.sun.management.jmxremote.ssl.need.client.auth", "true");
+//      System.setProperty("com.sun.management.jmxremote.ssl", "true");
+//      System.setProperty("com.sun.management.jmxremote.registry.ssl", "true");
       environment.put("com.sun.jndi.rmi.factory.socket", new SslRMIClientSocketFactory());
     }
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/a455526b/geode-core/src/test/java/com/gemstone/gemfire/test/dunit/rules/LocatorServerConfigurationRule.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/test/dunit/rules/LocatorServerConfigurationRule.java b/geode-core/src/test/java/com/gemstone/gemfire/test/dunit/rules/LocatorServerConfigurationRule.java
index 3855412..d6a14a4 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/test/dunit/rules/LocatorServerConfigurationRule.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/test/dunit/rules/LocatorServerConfigurationRule.java
@@ -17,15 +17,11 @@
 
 package com.gemstone.gemfire.test.dunit.rules;
 
-import static com.gemstone.gemfire.distributed.ConfigurationProperties.ENABLE_CLUSTER_CONFIGURATION;
-import static com.gemstone.gemfire.distributed.ConfigurationProperties.LOCATORS;
-import static com.gemstone.gemfire.distributed.ConfigurationProperties.MCAST_PORT;
-import static com.gemstone.gemfire.internal.AvailablePortHelper.getRandomAvailableTCPPorts;
-import static com.gemstone.gemfire.test.dunit.Host.getHost;
-import static com.gemstone.gemfire.test.dunit.internal.JUnit4DistributedTestCase.disconnectAllFromDS;
-import static com.gemstone.gemfire.test.dunit.internal.JUnit4DistributedTestCase.disconnectFromDS;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
+import static com.gemstone.gemfire.distributed.ConfigurationProperties.*;
+import static com.gemstone.gemfire.internal.AvailablePortHelper.*;
+import static com.gemstone.gemfire.test.dunit.Host.*;
+import static com.gemstone.gemfire.test.dunit.internal.JUnit4DistributedTestCase.*;
+import static org.junit.Assert.*;
 
 import java.io.IOException;
 import java.io.Serializable;
@@ -34,6 +30,7 @@ import java.net.UnknownHostException;
 import java.util.Properties;
 import java.util.concurrent.TimeUnit;
 
+import com.jayway.awaitility.Awaitility;
 import org.junit.rules.ExternalResource;
 
 import com.gemstone.gemfire.distributed.Locator;
@@ -41,16 +38,14 @@ import com.gemstone.gemfire.distributed.internal.InternalLocator;
 import com.gemstone.gemfire.test.dunit.Host;
 import com.gemstone.gemfire.test.dunit.VM;
 import com.gemstone.gemfire.test.dunit.cache.internal.JUnit4CacheTestCase;
-import com.jayway.awaitility.Awaitility;
 
 
-public class LocatorServerConfigurationRule extends ExternalResource implements
-    Serializable {
+public class LocatorServerConfigurationRule extends ExternalResource implements Serializable {
 
   private int locatorPort = 0;
-  
+
   private boolean locatorInitialized = false;
-  
+
   private JUnit4CacheTestCase testCase;
 
   public LocatorServerConfigurationRule(JUnit4CacheTestCase testCase) {
@@ -75,9 +70,10 @@ public class LocatorServerConfigurationRule extends ExternalResource implements
   /**
    * Returns getHost(0).getVM(0) as a locator instance with the given
    * configuration properties.
-   * 
    * @param locatorProperties
+   *
    * @return VM locator vm
+   *
    * @throws IOException
    */
   public VM getLocatorVM(Properties locatorProperties) throws IOException {
@@ -88,10 +84,9 @@ public class LocatorServerConfigurationRule extends ExternalResource implements
 
   /**
    * Returns a node VM with given configuration properties.
-   * 
-   * @param index
-   *          valid 1 to 3 (returns getHist(0).getVM(index)
+   * @param index valid 1 to 3 (returns getHist(0).getVM(index)
    * @param nodeProperties
+   *
    * @return VM node vm
    */
   public VM getNodeVM(int index, Properties nodeProperties) {
@@ -111,14 +106,12 @@ public class LocatorServerConfigurationRule extends ExternalResource implements
     }
 
     locatorPort = locator.invoke(() -> {
-      InternalLocator locator = (InternalLocator)Locator.startLocatorAndDS(0,
-          null, locatorProperties);
+      InternalLocator locator = (InternalLocator) Locator.startLocatorAndDS(0, null, locatorProperties);
       locatorPort = locator.getPort();
       locator.resetInternalLocatorFileNamesWithCorrectPortNumber(locatorPort);
 
       if (locatorProperties.containsKey(ENABLE_CLUSTER_CONFIGURATION)) {
-        Awaitility.await().atMost(65, TimeUnit.SECONDS)
-            .until(() -> assertTrue(locator.isSharedConfigurationRunning()));
+        Awaitility.await().atMost(65, TimeUnit.SECONDS).until(() -> assertTrue(locator.isSharedConfigurationRunning()));
       }
       return locatorPort;
     });
@@ -129,7 +122,7 @@ public class LocatorServerConfigurationRule extends ExternalResource implements
       props.setProperty(MCAST_PORT, "0");
     }
 
-    props.setProperty(LOCATORS, getHostName() + ":" + locatorPort);
+    props.setProperty(LOCATORS, getHostName() + "[" + locatorPort + "]");
 
     nodeVM.invoke(() -> {
       testCase.getSystem(props);
@@ -140,8 +133,7 @@ public class LocatorServerConfigurationRule extends ExternalResource implements
   private String getHostName() {
     try {
       return InetAddress.getLocalHost().getHostName();
-    }
-    catch (UnknownHostException ignore) {
+    } catch (UnknownHostException ignore) {
       return "localhost";
     }
   }


[24/50] [abbrv] incubator-geode git commit: GEODE-420: Bug fixes from precheckin

Posted by ud...@apache.org.
GEODE-420: Bug fixes from precheckin


Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/5fd94d59
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/5fd94d59
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/5fd94d59

Branch: refs/heads/develop
Commit: 5fd94d59d61d404914c1977dc8dcb8f794161555
Parents: 7addcd9
Author: Udo Kohlmeyer <uk...@pivotal.io>
Authored: Thu Aug 25 10:32:23 2016 +1000
Committer: Udo Kohlmeyer <uk...@pivotal.io>
Committed: Thu Aug 25 10:32:23 2016 +1000

----------------------------------------------------------------------
 .../gemstone/gemfire/internal/net/SocketCreatorFactory.java  | 3 ++-
 .../cache/client/internal/LocatorLoadBalancingDUnitTest.java | 4 ++++
 .../com/gemstone/gemfire/management/JMXMBeanDUnitTest.java   | 8 +++-----
 3 files changed, 9 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/5fd94d59/geode-core/src/main/java/com/gemstone/gemfire/internal/net/SocketCreatorFactory.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/net/SocketCreatorFactory.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/net/SocketCreatorFactory.java
index 96e8d77..6e39381 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/net/SocketCreatorFactory.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/net/SocketCreatorFactory.java
@@ -74,7 +74,8 @@ public class SocketCreatorFactory {
     if (sslConfig.isEnabled()) {
       if (ArrayUtils.contains(getDistributionConfig().getSSLEnabledComponents(), SecurableComponent.ALL)) {
         return createSSLSocketCreator(SecurableComponent.ALL, sslConfig);
-      } else if (ArrayUtils.contains(getDistributionConfig().getSSLEnabledComponents(), sslComponent)) {
+//      } else if (ArrayUtils.contains(getDistributionConfig().getSSLEnabledComponents(), sslComponent)) {
+      } else {
         return createSSLSocketCreator(sslComponent, sslConfig);
       }
     }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/5fd94d59/geode-core/src/test/java/com/gemstone/gemfire/cache/client/internal/LocatorLoadBalancingDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache/client/internal/LocatorLoadBalancingDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache/client/internal/LocatorLoadBalancingDUnitTest.java
index 4173886..670fd9d 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache/client/internal/LocatorLoadBalancingDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache/client/internal/LocatorLoadBalancingDUnitTest.java
@@ -21,6 +21,8 @@ import org.junit.Test;
 
 import static org.junit.Assert.*;
 
+import com.gemstone.gemfire.distributed.internal.DistributionConfigImpl;
+import com.gemstone.gemfire.internal.net.SocketCreatorFactory;
 import com.gemstone.gemfire.test.dunit.cache.internal.JUnit4CacheTestCase;
 import com.gemstone.gemfire.test.dunit.internal.JUnit4DistributedTestCase;
 import com.gemstone.gemfire.test.junit.categories.DistributedTest;
@@ -59,6 +61,7 @@ import java.util.Collections;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
+import java.util.Properties;
 import java.util.concurrent.TimeUnit;
 
 /**
@@ -141,6 +144,7 @@ public class LocatorLoadBalancingDUnitTest extends LocatorTestBase {
     Map expected = new HashMap();
     expected.put(expectedLocation, expectedLoad);
 
+    SocketCreatorFactory.setDistributionConfig(new DistributionConfigImpl(new Properties()));
     ClientConnectionResponse response;
     response = (ClientConnectionResponse) new TcpClient().requestToServer(InetAddress
             .getByName(NetworkUtils.getServerHostName(host)), locatorPort,

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/5fd94d59/geode-core/src/test/java/com/gemstone/gemfire/management/JMXMBeanDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/JMXMBeanDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/JMXMBeanDUnitTest.java
index f92136e..022bfee 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/JMXMBeanDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/JMXMBeanDUnitTest.java
@@ -37,6 +37,7 @@ import javax.management.remote.JMXServiceURL;
 import javax.rmi.ssl.SslRMIClientSocketFactory;
 
 import org.junit.Before;
+import org.junit.Ignore;
 import org.junit.Rule;
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
@@ -132,10 +133,10 @@ public class JMXMBeanDUnitTest extends DistributedTestCase {
   //  To be fixed in GEODE-1716
   public void testJMXOverLegacySSL() throws Exception {
     Properties properties = configureLocatorProperties(new Properties(), jmxPort, serverHostName, true, true, false);
-    locator.invoke("Configure and start Locator", () -> {
+//    locator.invoke("Configure and start Locator", () -> {
       System.setProperty("javax.ssl.debug", "true");
       configureAndStartLocator(locatorPort, jmxPort, serverHostName, properties);
-    });
+//    });
 
     jmxClient.invoke("Configure and start JMX Client", () -> {
       System.setProperty("javax.ssl.debug", "true");
@@ -176,9 +177,6 @@ public class JMXMBeanDUnitTest extends DistributedTestCase {
       System.setProperty("javax.net.ssl.trustStore", useMulti ? getMultiKeyTruststore() : getSimpleSingleKeyKeystore());
       System.setProperty("javax.net.ssl.trustStoreType", "JKS");
       System.setProperty("javax.net.ssl.trustStorePassword", "password");
-      System.setProperty("com.sun.management.jmxremote.ssl.need.client.auth", "true");
-      System.setProperty("com.sun.management.jmxremote.ssl", "true");
-      System.setProperty("com.sun.management.jmxremote.registry.ssl", "true");
       environment.put("com.sun.jndi.rmi.factory.socket", new SslRMIClientSocketFactory());
     }
 


[34/50] [abbrv] incubator-geode git commit: GEODE-420: Fixing test DistributionConfigJUnitTest.java

Posted by ud...@apache.org.
GEODE-420: Fixing test DistributionConfigJUnitTest.java


Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/de08779c
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/de08779c
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/de08779c

Branch: refs/heads/develop
Commit: de08779ce772f7d8c9094796a719e9fb6deb25f3
Parents: 177bcae
Author: Udo Kohlmeyer <uk...@pivotal.io>
Authored: Wed Aug 31 04:45:53 2016 +1000
Committer: Udo Kohlmeyer <uk...@pivotal.io>
Committed: Wed Aug 31 04:45:53 2016 +1000

----------------------------------------------------------------------
 .../gemfire/distributed/internal/DistributionConfigJUnitTest.java  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/de08779c/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/DistributionConfigJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/DistributionConfigJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/DistributionConfigJUnitTest.java
index f262e98..9240358 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/DistributionConfigJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/DistributionConfigJUnitTest.java
@@ -116,7 +116,7 @@ public class DistributionConfigJUnitTest {
     //TODO - This makes no sense. One has no idea what the correct expected number of attributes are.
     assertEquals(29, boolList.size());
     assertEquals(33, intList.size());
-    assertEquals(85, stringList.size());
+    assertEquals(86, stringList.size());
     assertEquals(5, fileList.size());
     assertEquals(4, otherList.size());
   }


[13/50] [abbrv] incubator-geode git commit: Merge branch 'develop' into feature/GEODE-420

Posted by ud...@apache.org.
Merge branch 'develop' into feature/GEODE-420

# Conflicts:
#	geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/AbstractDistributionConfig.java
#	geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionConfig.java
#	geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionConfigImpl.java
#	geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/InternalLocator.java
#	geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/StartupMessage.java
#	geode-core/src/main/java/com/gemstone/gemfire/internal/SystemAdmin.java
#	geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/AcceptorImpl.java
#	geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/CacheServerStats.java
#	geode-core/src/main/java/com/gemstone/gemfire/internal/i18n/LocalizedStrings.java
#	geode-core/src/main/java/com/gemstone/gemfire/internal/statistics/HostStatHelper.java
#	geode-core/src/main/java/com/gemstone/gemfire/internal/statistics/HostStatSampler.java
#	geode-core/src/main/java/com/gemstone/gemfire/internal/statistics/StatArchiveWriter.java
#	geode-core/src/main/java/com/gemstone/gemfire/management/internal/ManagementAgent.java
#	geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/DistributionConfigJUnitTest.java
#	geode-core/src/test/java/com/gemstone/gemfire/internal/statistics/GemFireStatSamplerIntegrationTest.java
#	geode-core/src/test/java/com/gemstone/gemfire/internal/statistics/SimpleStatSamplerIntegrationTest.java


Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/dfbc88b2
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/dfbc88b2
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/dfbc88b2

Branch: refs/heads/develop
Commit: dfbc88b248cc2a01da19a85ac3ef1a9f0adce790
Parents: 86df802 e25ba5c
Author: Udo Kohlmeyer <uk...@pivotal.io>
Authored: Fri Aug 19 06:54:23 2016 +1000
Committer: Udo Kohlmeyer <uk...@pivotal.io>
Committed: Fri Aug 19 06:54:23 2016 +1000

----------------------------------------------------------------------
 .../internal/DeltaSessionStatistics.java        |    2 +-
 .../gemfire/modules/util/ModuleStatistics.java  |    2 +-
 .../com/gemstone/gemfire/StatisticsFactory.java |    2 +-
 .../gemstone/gemfire/StatisticsTypeFactory.java |    2 +-
 .../com/gemstone/gemfire/admin/AlertLevel.java  |    5 +-
 .../admin/internal/MemberHealthEvaluator.java   |    2 +
 .../admin/jmx/internal/ManagedResourceType.java |    6 +-
 .../jmx/internal/RefreshNotificationType.java   |   10 +-
 .../internal/AsyncEventQueueStats.java          |    2 +-
 .../cache/client/internal/AbstractOp.java       |    5 +-
 .../cache/client/internal/AddPDXEnumOp.java     |    3 +-
 .../cache/client/internal/AddPDXTypeOp.java     |    3 +-
 .../client/internal/AuthenticateUserOp.java     |    2 -
 .../internal/AutoConnectionSourceImpl.java      |    1 -
 .../client/internal/ClientPartitionAdvisor.java |    2 +-
 .../client/internal/ConnectionFactoryImpl.java  |    2 +-
 .../cache/client/internal/ConnectionStats.java  |    2 +-
 .../client/internal/EndpointManagerImpl.java    |    2 +-
 .../client/internal/ExecuteFunctionNoAckOp.java |    2 +-
 .../client/internal/ExecuteFunctionOp.java      |   10 +-
 .../internal/ExecuteRegionFunctionNoAckOp.java  |    2 +-
 .../internal/ExecuteRegionFunctionOp.java       |   88 +-
 .../ExecuteRegionFunctionSingleHopOp.java       |   31 +-
 .../internal/ExplicitConnectionSourceImpl.java  |    1 -
 .../cache/client/internal/InternalPool.java     |    1 +
 .../gemfire/cache/client/internal/PoolImpl.java |   25 +-
 .../cache/client/internal/QueueManagerImpl.java |   14 +-
 .../internal/SingleHopClientExecutor.java       |   44 +-
 .../internal/pooling/ConnectionManagerImpl.java |   32 +-
 .../cache/query/CqAttributesFactory.java        |  232 +-
 .../cache/query/internal/CqQueryVsdStats.java   |    2 +-
 .../query/internal/cq/CqAttributesImpl.java     |  237 ++
 .../query/internal/index/CompactRangeIndex.java |    3 +
 .../cache/query/internal/index/IndexStats.java  |    2 +-
 .../gemfire/cache/server/ServerMetrics.java     |    2 -
 .../distributed/ConfigurationProperties.java    |   17 +
 .../gemfire/distributed/DistributedSystem.java  |   15 +-
 .../internal/AbstractDistributionConfig.java    |   26 +
 .../internal/DistributionAdvisor.java           |    4 +-
 .../internal/DistributionConfig.java            |   29 +
 .../internal/DistributionConfigImpl.java        |   76 +-
 .../internal/DistributionManager.java           |   50 +-
 .../internal/DistributionMessage.java           |    1 -
 .../distributed/internal/DistributionStats.java |    2 +-
 .../FunctionExecutionPooledExecutor.java        |    7 -
 .../internal/InternalDistributedSystem.java     |   11 +-
 .../distributed/internal/InternalLocator.java   |    4 -
 .../internal/LocatorLoadSnapshot.java           |    4 -
 .../distributed/internal/LocatorStats.java      |    2 +-
 .../internal/MembershipListener.java            |    2 +-
 .../distributed/internal/ReplyMessage.java      |    5 -
 .../distributed/internal/ReplyProcessor21.java  |    9 +-
 .../distributed/internal/StartupMessage.java    |    6 +-
 .../ThrottlingMemLinkedQueueWithDMStats.java    |    1 -
 .../distributed/internal/locks/DLockStats.java  |    2 +-
 .../internal/membership/InternalRole.java       |    8 +-
 .../internal/membership/MembershipManager.java  |    2 +-
 .../internal/membership/gms/SuspectMember.java  |    3 +-
 .../membership/gms/interfaces/Service.java      |    1 -
 .../membership/gms/messages/ViewAckMessage.java |    1 -
 .../gms/messenger/GMSQuorumChecker.java         |    6 -
 .../gms/mgr/GMSMembershipManager.java           |    5 +-
 .../internal/AbstractStatisticsFactory.java     |  327 --
 .../gemfire/internal/ArchiveSplitter.java       |  522 ---
 .../internal/DummyStatisticsFactory.java        |  134 -
 .../gemfire/internal/DummyStatisticsImpl.java   |  242 --
 .../gemfire/internal/GemFireStatSampler.java    |  502 ---
 .../gemfire/internal/HostStatHelper.java        |  291 --
 .../gemfire/internal/HostStatSampler.java       |  551 ---
 .../internal/InternalDataSerializer.java        |   55 +-
 .../gemfire/internal/LinuxProcFsStatistics.java |  783 ----
 .../gemfire/internal/LinuxProcessStats.java     |   79 -
 .../gemfire/internal/LinuxSystemStats.java      |  311 --
 .../gemfire/internal/LocalStatListener.java     |   40 -
 .../internal/LocalStatisticsFactory.java        |   99 -
 .../gemfire/internal/LocalStatisticsImpl.java   |  268 --
 .../gemfire/internal/OSXProcessStats.java       |   83 -
 .../gemfire/internal/OSXSystemStats.java        |  228 --
 .../gemfire/internal/OsStatisticsFactory.java   |   41 -
 .../gemstone/gemfire/internal/ProcessStats.java |   60 -
 .../gemfire/internal/SimpleStatSampler.java     |  112 -
 .../gemfire/internal/SolarisProcessStats.java   |  217 --
 .../gemfire/internal/SolarisSystemStats.java    |  428 ---
 .../gemfire/internal/StatArchiveFormat.java     |  197 --
 .../gemfire/internal/StatArchiveReader.java     | 3338 -----------------
 .../gemfire/internal/StatArchiveWriter.java     |  734 ----
 .../gemfire/internal/StatSamplerStats.java      |  153 -
 .../internal/StatisticDescriptorImpl.java       |  383 --
 .../gemfire/internal/StatisticsImpl.java        |  589 ---
 .../gemfire/internal/StatisticsManager.java     |   78 -
 .../internal/StatisticsTypeFactoryImpl.java     |  140 -
 .../gemfire/internal/StatisticsTypeImpl.java    |  258 --
 .../gemfire/internal/StatisticsTypeXml.java     |  280 --
 .../gemstone/gemfire/internal/SystemAdmin.java  |    5 +-
 .../com/gemstone/gemfire/internal/VMStats.java  |   87 -
 .../gemfire/internal/VMStatsContract.java       |   36 -
 .../internal/VMStatsContractFactory.java        |   60 -
 .../gemfire/internal/WindowsProcessStats.java   |  160 -
 .../gemfire/internal/WindowsSystemStats.java    |  267 --
 .../admin/remote/AddStatListenerResponse.java   |    2 +-
 .../remote/AdminConsoleDisconnectMessage.java   |    2 +-
 .../remote/CancelStatListenerResponse.java      |    2 +-
 .../admin/remote/DistributionLocatorId.java     |    6 +-
 .../internal/admin/remote/RemoteStat.java       |    2 +-
 .../gemfire/internal/admin/remote/package.html  |    2 +-
 .../admin/statalerts/StatisticInfoImpl.java     |    4 +-
 .../internal/cache/AbstractLRURegionMap.java    |   11 +-
 .../internal/cache/AbstractRegionMap.java       |  951 ++---
 .../gemfire/internal/cache/BucketRegion.java    |   38 +-
 .../gemfire/internal/cache/CachePerfStats.java  |    1 +
 .../internal/cache/CacheServerLauncher.java     |   11 +-
 .../internal/cache/DiskDirectoryStats.java      |    2 +-
 .../gemfire/internal/cache/DiskEntry.java       |  583 ++-
 .../gemfire/internal/cache/DiskInitFile.java    |    2 +-
 .../gemfire/internal/cache/DiskRegionStats.java |    2 +-
 .../gemfire/internal/cache/DiskStoreStats.java  |    2 +-
 .../DistTXStateProxyImplOnCoordinator.java      |    4 +-
 .../cache/DistributedClearOperation.java        |    2 +-
 .../internal/cache/DistributedRegion.java       |   46 +-
 .../gemfire/internal/cache/EntryEventImpl.java  |  170 +-
 .../internal/cache/GemFireCacheImpl.java        |    2 +-
 .../gemfire/internal/cache/LocalRegion.java     |  518 +--
 .../internal/cache/PartitionedRegion.java       |   13 +-
 .../internal/cache/PartitionedRegionStats.java  |    2 +-
 .../gemfire/internal/cache/PoolStats.java       |    2 +-
 .../gemfire/internal/cache/ProxyRegionMap.java  |    6 +
 .../gemfire/internal/cache/RegionMap.java       |    4 +
 .../internal/cache/StateFlushOperation.java     |    5 +
 .../cache/control/HeapMemoryMonitor.java        |    8 +-
 .../cache/control/ResourceManagerStats.java     |    2 +-
 .../cache/execute/AbstractExecution.java        |   10 +
 .../cache/execute/FunctionServiceStats.java     |    4 +-
 .../internal/cache/execute/FunctionStats.java   |    5 +-
 .../FunctionStreamingResultCollector.java       |   18 +-
 .../cache/execute/LocalResultCollectorImpl.java |    8 +-
 .../PartitionedRegionFunctionResultSender.java  |  112 +-
 .../ServerToClientFunctionResultSender.java     |   21 +-
 .../ServerToClientFunctionResultSender65.java   |    3 +
 .../internal/cache/ha/HARegionQueueStats.java   |    2 +-
 .../internal/cache/locks/TXLockToken.java       |    6 +-
 .../cache/lru/HeapLRUCapacityController.java    |    2 +-
 .../cache/lru/LRUCapacityController.java        |    2 +-
 .../cache/lru/MemLRUCapacityController.java     |    2 +-
 .../PRFunctionStreamingResultCollector.java     |   19 +-
 .../internal/cache/tier/CachedRegionHelper.java |   32 +-
 .../cache/tier/sockets/AcceptorImpl.java        |   19 +-
 .../cache/tier/sockets/BaseCommand.java         |    2 -
 .../cache/tier/sockets/CacheClientNotifier.java |    2 +-
 .../tier/sockets/CacheClientNotifierStats.java  |    3 +-
 .../tier/sockets/CacheClientProxyStats.java     |    2 +-
 .../cache/tier/sockets/CacheClientUpdater.java  |    1 +
 .../cache/tier/sockets/CacheServerStats.java    |    7 +-
 .../cache/tier/sockets/ChunkedMessage.java      |   11 +-
 .../tier/sockets/ClientBlacklistProcessor.java  |    1 -
 .../cache/tier/sockets/ClientHealthMonitor.java |    1 -
 .../tier/sockets/ClientProxyMembershipID.java   |    6 -
 .../cache/tier/sockets/CommandInitializer.java  |    4 -
 .../internal/cache/tier/sockets/HandShake.java  |    5 +-
 .../internal/cache/tier/sockets/Message.java    |   36 +-
 .../cache/tier/sockets/ObjectPartList651.java   |    2 -
 .../internal/cache/tier/sockets/Part.java       |    1 -
 .../cache/tier/sockets/ServerConnection.java    |    4 +-
 .../cache/tier/sockets/command/Destroy.java     |    3 -
 .../cache/tier/sockets/command/Destroy65.java   |    3 -
 .../tier/sockets/command/ExecuteFunction70.java |    3 +
 .../cache/tier/sockets/command/Get70.java       |   19 +-
 .../cache/tier/sockets/command/Ping.java        |   18 +-
 .../cache/tier/sockets/command/Put.java         |   17 -
 .../cache/tier/sockets/command/Put61.java       |   15 -
 .../cache/tier/sockets/command/Put65.java       |   15 -
 .../cache/tier/sockets/command/PutAll.java      |   21 -
 .../cache/tier/sockets/command/PutAll70.java    |   22 -
 .../cache/tier/sockets/command/PutAll80.java    |   22 -
 .../tier/sockets/command/RegisterInterest.java  |    3 -
 .../sockets/command/RegisterInterest61.java     |    3 -
 .../sockets/command/RegisterInterestList.java   |    3 -
 .../sockets/command/RegisterInterestList61.java |    3 -
 .../sockets/command/RegisterInterestList66.java |    3 -
 .../cache/tier/sockets/command/RemoveAll.java   |   22 -
 .../cache/tier/sockets/command/Request.java     |   19 +-
 .../tier/sockets/command/RequestEventValue.java |   17 -
 .../cache/tier/sockets/command/Size.java        |   21 -
 .../sockets/command/UnregisterInterest.java     |    3 -
 .../sockets/command/UnregisterInterestList.java |    3 -
 .../cache/versions/RegionVersionVector.java     |   12 +-
 .../internal/cache/wan/GatewaySenderStats.java  |    2 +-
 .../cache/xmlcache/CacheXmlGenerator.java       |    2 +-
 .../gemfire/internal/concurrent/Atomics.java    |    6 +-
 .../gemfire/internal/i18n/LocalizedStrings.java |    2 +-
 .../internal/offheap/OffHeapStorage.java        |    2 +-
 .../internal/security/GeodeSecurityUtil.java    |   55 +-
 .../security/IntegratedSecurityService.java     |   15 +
 .../internal/security/SecurableComponent.java   |   53 +
 .../internal/security/SecurityService.java      |    3 +
 .../statistics/AbstractStatisticsFactory.java   |  327 ++
 .../internal/statistics/ArchiveSplitter.java    |  522 +++
 .../internal/statistics/CallbackSampler.java    |    3 -
 .../statistics/DummyStatisticsFactory.java      |  135 +
 .../statistics/DummyStatisticsImpl.java         |  242 ++
 .../internal/statistics/GemFireStatSampler.java |  507 +++
 .../internal/statistics/HostStatHelper.java     |  305 ++
 .../internal/statistics/HostStatSampler.java    |  554 +++
 .../statistics/IgnoreResourceException.java     |    2 +-
 .../internal/statistics/LocalStatListener.java  |   40 +
 .../statistics/LocalStatisticsFactory.java      |  103 +
 .../statistics/LocalStatisticsImpl.java         |  272 ++
 .../internal/statistics/ResourceInstance.java   |    2 +-
 .../internal/statistics/ResourceType.java       |    2 +-
 .../internal/statistics/SimpleStatSampler.java  |  112 +
 .../statistics/StatArchiveDescriptor.java       |    4 +-
 .../internal/statistics/StatArchiveFormat.java  |  197 ++
 .../internal/statistics/StatArchiveHandler.java |    9 +-
 .../statistics/StatArchiveHandlerConfig.java    |    2 +-
 .../internal/statistics/StatArchiveReader.java  | 3342 ++++++++++++++++++
 .../internal/statistics/StatArchiveWriter.java  |  737 ++++
 .../internal/statistics/StatSamplerStats.java   |  153 +
 .../statistics/StatisticDescriptorImpl.java     |  383 ++
 .../internal/statistics/StatisticsImpl.java     |  588 +++
 .../internal/statistics/StatisticsManager.java  |   78 +
 .../statistics/StatisticsTypeFactoryImpl.java   |  140 +
 .../internal/statistics/StatisticsTypeImpl.java |  258 ++
 .../internal/statistics/StatisticsTypeXml.java  |  282 ++
 .../gemfire/internal/statistics/VMStats.java    |   87 +
 .../internal/statistics/VMStatsContract.java    |   36 +
 .../statistics/VMStatsContractFactory.java      |   60 +
 .../internal/statistics/ValueMonitor.java       |    1 -
 .../gemfire/internal/statistics/package.html    |    4 +-
 .../platform/LinuxProcFsStatistics.java         |  783 ++++
 .../statistics/platform/LinuxProcessStats.java  |   84 +
 .../statistics/platform/LinuxSystemStats.java   |  313 ++
 .../statistics/platform/OSXProcessStats.java    |   87 +
 .../statistics/platform/OSXSystemStats.java     |  230 ++
 .../platform/OsStatisticsFactory.java           |   41 +
 .../statistics/platform/ProcessStats.java       |   60 +
 .../platform/SolarisProcessStats.java           |  222 ++
 .../statistics/platform/SolarisSystemStats.java |  430 +++
 .../platform/WindowsProcessStats.java           |  165 +
 .../statistics/platform/WindowsSystemStats.java |  269 ++
 .../stats50/Atomic50StatisticsImpl.java         |    4 +
 .../gemfire/internal/stats50/VMStats50.java     |    4 +-
 .../gemfire/internal/tcp/Connection.java        |    3 -
 .../gemfire/internal/tcp/ConnectionTable.java   |    6 -
 .../gemfire/internal/tcp/MsgDestreamer.java     |    6 +-
 .../gemfire/internal/tcp/TCPConduit.java        |    2 +-
 .../management/internal/ManagementAgent.java    |    8 +-
 .../gemfire/management/internal/RestAgent.java  |    2 +-
 .../internal/beans/MemberMBeanBridge.java       |    8 +
 .../cli/AbstractCliAroundInterceptor.java       |    6 +-
 .../domain/FixedPartitionAttributesInfo.java    |    5 +-
 .../cli/domain/PartitionAttributesInfo.java     |   19 +-
 .../cli/domain/RegionAttributesInfo.java        |    4 +-
 .../internal/cli/help/utils/HelpUtils.java      |    2 +-
 .../internal/cli/result/CommandResult.java      |    6 +-
 .../pdx/internal/ClientTypeRegistration.java    |    8 +-
 .../gemstone/gemfire/pdx/internal/EnumId.java   |    1 -
 .../gemstone/gemfire/pdx/internal/EnumInfo.java |    1 -
 .../pdx/internal/LonerTypeRegistration.java     |    2 -
 .../pdx/internal/PdxInstanceFactoryImpl.java    |    4 +-
 .../gemfire/pdx/internal/PdxInstanceImpl.java   |   22 +-
 .../gemfire/pdx/internal/PdxReaderImpl.java     |   11 +-
 .../pdx/internal/PeerTypeRegistration.java      |    1 -
 .../gemfire/pdx/internal/TypeRegistry.java      |   28 +-
 .../gemfire/pdx/internal/json/PdxToJSON.java    |    4 +-
 .../geode/security/SecurableComponents.java     |   57 +
 .../templates/SampleSecurityManager.java        |   50 +-
 .../com/gemstone/gemfire/GemFireTestCase.java   |   91 -
 .../java/com/gemstone/gemfire/Invariant.java    |   31 -
 .../com/gemstone/gemfire/InvariantResult.java   |   27 -
 .../gemfire/LocalStatisticsJUnitTest.java       |   50 -
 .../gemstone/gemfire/StatisticsTestCase.java    |  388 --
 .../gemfire/StatisticsTypeJUnitTest.java        |   76 -
 .../gemfire/admin/AlertLevelJUnitTest.java      |   64 +
 .../MemberHealthEvaluatorJUnitTest.java         |    4 +-
 .../AutoConnectionSourceImplJUnitTest.java      |   11 +-
 .../client/internal/QueueManagerJUnitTest.java  |    6 +
 .../management/MemoryThresholdsDUnitTest.java   |    6 +-
 .../gemfire/cache/query/data/Portfolio.java     |   10 +-
 .../gemfire/cache/query/data/PortfolioData.java |    7 +-
 .../gemfire/cache/query/data/PortfolioNoDS.java |    7 +-
 .../gemfire/cache/query/data/PortfolioPdx.java  |    7 +-
 .../functional/IUM6Bug32345ReJUnitTest.java     |    4 +-
 ...ndexWithSngleFrmAndMultCondQryJUnitTest.java |    6 +-
 .../functional/IumMultConditionJUnitTest.java   |    5 +-
 .../internal/cq/CqAttributesImplJUnitTest.java  |   45 +
 .../gemfire/cache30/DiskRegionDUnitTest.java    |   31 +-
 .../codeAnalysis/decode/CompiledClass.java      |    2 +-
 .../AbstractDistributionConfigTest.java         |   78 +
 .../internal/DistributionConfigJUnitTest.java   |   80 +-
 .../membership/InternalRoleJUnitTest.java       |   46 +
 .../internal/DataSerializableJUnitTest.java     |    1 +
 .../internal/GemFireStatSamplerJUnitTest.java   |  613 ----
 .../internal/LocalStatisticsImplJUnitTest.java  |  139 -
 .../internal/SimpleStatSamplerJUnitTest.java    |  358 --
 .../StatArchiveWriterReaderJUnitTest.java       | 1728 ---------
 .../gemfire/internal/StatSamplerJUnitTest.java  |  367 --
 .../gemfire/internal/StatSamplerTestCase.java   |  184 -
 .../remote/DistributionLocatorIdJUnitTest.java  |   54 +
 .../internal/cache/ARMLockTestHookAdapter.java  |   38 +
 .../cache/CacheServerLauncherJUnitTest.java     |   54 +
 .../cache/ClearRvvLockingDUnitTest.java         |  667 ++++
 .../cache/DiskRegRecoveryJUnitTest.java         |   33 +-
 .../internal/cache/EntryEventImplTest.java      |  301 +-
 .../internal/cache/TestNonSizerObject.java      |    4 +-
 .../cache/execute/FunctionServiceBase.java      |  176 +-
 .../FunctionServiceClientAccessorPRBase.java    |  145 +
 ...unctionServiceClientAccessorPRDUnitTest.java |   46 +
 ...lientAccessorPRMultipleMembersDUnitTest.java |   59 +
 ...essorPRMultipleMembersMultihopDUnitTest.java |   44 +
 .../execute/FunctionServiceClientBase.java      |   61 +
 ...nServiceClientMultipleOnServerDUnitTest.java |   42 +
 .../FunctionServiceClientOnServerBase.java      |   40 +
 .../FunctionServiceClientOnServerDUnitTest.java |   32 +
 .../FunctionServicePeerAccessorPRBase.java      |   66 +
 .../FunctionServicePeerAccessorPRDUnitTest.java |   37 +-
 ...ePeerAccessorPRMultipleMembersDUnitTest.java |   43 +
 .../internal/cache/functions/TestFunction.java  |    7 +-
 .../internal/cache/lru/LRUClockJUnitTest.java   |    2 +-
 .../fixed/FixedPartitioningTestBase.java        |   13 +-
 .../FixedPartitioningTestBaseJUnitTest.java     |   63 +
 .../AsyncEventQueueStatsDUnitTest.java          |    2 +-
 .../offheap/OffHeapStorageJUnitTest.java        |    2 +-
 .../security/GeodeSecurityUtilTest.java         |  157 +-
 .../security/SecurityConfigIntegrationTest.java |   56 +
 .../statistics/CallbackSamplerJUnitTest.java    |   98 -
 .../statistics/CallbackSamplerTest.java         |   98 +
 ...tributedSystemStatisticsIntegrationTest.java |  271 ++
 ...utedSystemStatisticsTypeIntegrationTest.java |   90 +
 .../GemFireStatSamplerIntegrationTest.java      |  616 ++++
 .../internal/statistics/ResourceInstTest.java   |   84 +
 .../statistics/SampleCollectorJUnitTest.java    |  322 --
 .../statistics/SampleCollectorTest.java         |  322 ++
 .../SimpleStatSamplerIntegrationTest.java       |  351 ++
 ...iveWithConsecutiveResourceInstGenerator.java |  223 ++
 ...ithConsecutiveResourceInstGeneratorTest.java |   55 +
 ...hConsecutiveResourceInstIntegrationTest.java |  108 +
 .../StatArchiveWriterReaderIntegrationTest.java | 1634 +++++++++
 .../statistics/StatMonitorHandlerJUnitTest.java |  236 --
 .../statistics/StatMonitorHandlerTest.java      |  235 ++
 .../statistics/StatSamplerIntegrationTest.java  |  363 ++
 .../statistics/StatSamplerTestCase.java         |  185 +
 .../gemfire/internal/statistics/StatUtils.java  |  102 +
 .../statistics/StatisticsDUnitTest.java         |  947 -----
 .../statistics/StatisticsDistributedTest.java   |  851 +++++
 .../internal/statistics/StatisticsImplTest.java |  136 +
 .../statistics/StatisticsMonitorJUnitTest.java  |  198 --
 .../statistics/StatisticsMonitorTest.java       |  198 ++
 .../statistics/TestStatArchiveWriter.java       |    6 +-
 .../statistics/TestStatisticsManager.java       |   13 +-
 .../statistics/TestStatisticsSampler.java       |   13 +-
 .../statistics/ValueMonitorIntegrationTest.java |  367 ++
 .../statistics/ValueMonitorJUnitTest.java       |  370 --
 .../internal/stats50/AtomicStatsJUnitTest.java  |    2 +-
 .../gemfire/management/ManagementTestBase.java  |    6 +-
 .../bean/stats/MemberLevelStatsJUnitTest.java   |    2 +-
 .../AbstractCliAroundInterceptorJUnitTest.java  |   59 +
 ...edSecurityCacheLifecycleDistributedTest.java |   51 +-
 .../gemfire/security/SecurityTestUtils.java     |    3 +
 .../security/templates/XmlAuthorization.java    |    4 +-
 .../templates/SampleSecurityManagerTest.java    |   28 +-
 .../gemfire/codeAnalysis/excludedClasses.txt    |    2 +
 ...st_testWriteAfterSamplingBegins_expected.gfs |  Bin 1970 -> 0 bytes
 ...est_testWriteWhenSamplingBegins_expected.gfs |  Bin 1933 -> 0 bytes
 ...thConsecutiveResourceInstIntegrationTest.gfs |  Bin 0 -> 1924 bytes
 ...st_testWriteAfterSamplingBegins_expected.gfs |  Bin 0 -> 1976 bytes
 ...est_testWriteWhenSamplingBegins_expected.gfs |  Bin 0 -> 1939 bytes
 geode-core/src/test/resources/security.json     |   30 +
 .../query/internal/cq/CqServiceVsdStats.java    |    4 +-
 .../lucene/internal/IndexListenerAdapter.java   |   41 +
 .../cache/lucene/internal/LuceneIndexStats.java |   14 +-
 .../lucene/internal/LuceneServiceImpl.java      |    9 +-
 .../internal/filesystem/FileSystemStats.java    |    2 +-
 .../internal/management/LuceneIndexMetrics.java |   67 +-
 .../management/LuceneIndexStatsMonitor.java     |   93 +
 .../management/LuceneServiceBridge.java         |   34 +-
 .../internal/management/LuceneServiceMBean.java |    5 +
 .../management/ManagementIndexListener.java     |   38 +
 .../lucene/internal/management/StatsKey.java    |   35 +
 .../management/LuceneManagementDUnitTest.java   |  267 ++
 .../util/AutoBalancerIntegrationJUnitTest.java  |    2 +-
 geode-site/website/README.md                    |   69 +-
 geode-site/website/content/community/index.html |    1 +
 .../client/internal/GatewaySenderBatchOp.java   |   10 +-
 .../internal/locator/wan/LocatorDiscovery.java  |   16 +-
 .../internal/locator/wan/LocatorHelper.java     |    4 +-
 .../locator/wan/WanLocatorDiscovererImpl.java   |    6 +-
 .../wan/GatewaySenderEventRemoteDispatcher.java |   13 +-
 .../cache/wan/GatewaySenderFactoryImpl.java     |    2 +-
 .../wan/parallel/ParallelGatewaySenderImpl.java |    2 +-
 ...RemoteSerialGatewaySenderEventProcessor.java |    6 +-
 .../cache/CacheXml70GatewayDUnitTest.java       |   32 +-
 .../cache/CacheXml80GatewayDUnitTest.java       |    8 +-
 .../internal/cache/UpdateVersionDUnitTest.java  |   20 +-
 .../cache/wan/CacheClientNotifierDUnitTest.java |    4 +-
 .../gemfire/internal/cache/wan/WANTestBase.java |   72 +-
 ...oncurrentParallelGatewaySenderDUnitTest.java |    8 +-
 ...allelGatewaySenderOperation_2_DUnitTest.java |   10 +-
 .../ConcurrentWANPropagation_1_DUnitTest.java   |  568 +++
 .../ConcurrentWANPropagation_2_DUnitTest.java   |  448 +++
 .../ConcurrentWANPropogation_1_DUnitTest.java   |  568 ---
 .../ConcurrentWANPropogation_2_DUnitTest.java   |  448 ---
 .../CommonParallelGatewaySenderDUnitTest.java   |    8 +-
 ...wWANConcurrencyCheckForDestroyDUnitTest.java |    4 +-
 .../cache/wan/misc/PDXNewWanDUnitTest.java      |    2 +-
 ...dRegion_ParallelWANPersistenceDUnitTest.java |   16 +-
 ...dRegion_ParallelWANPropagationDUnitTest.java | 1063 ++++++
 ...dRegion_ParallelWANPropogationDUnitTest.java | 1065 ------
 .../SenderWithTransportFilterDUnitTest.java     |   20 +-
 ...downAllPersistentGatewaySenderDUnitTest.java |   14 +-
 .../wan/misc/WANConfigurationJUnitTest.java     |  109 +-
 .../wan/misc/WANLocatorServerDUnitTest.java     |    2 +-
 .../wan/misc/WanAutoDiscoveryDUnitTest.java     |    6 +-
 .../cache/wan/misc/WanValidationsDUnitTest.java |   96 +-
 ...ropagationConcurrentOpsOffHeapDUnitTest.java |   44 +
 .../ParallelWANPropagationOffHeapDUnitTest.java |   43 +
 ...ropogationConcurrentOpsOffHeapDUnitTest.java |   44 -
 .../ParallelWANPropogationOffHeapDUnitTest.java |   43 -
 .../SerialWANPropagationOffHeapDUnitTest.java   |   38 +
 ...ation_PartitionedRegionOffHeapDUnitTest.java |   39 +
 .../SerialWANPropogationOffHeapDUnitTest.java   |   43 -
 ...ation_PartitionedRegionOffHeapDUnitTest.java |   43 -
 ...llelGatewaySenderQueueOverflowDUnitTest.java |   24 +-
 .../ParallelWANConflationDUnitTest.java         |    4 +-
 ...ersistenceEnabledGatewaySenderDUnitTest.java |   12 +-
 ...llelWANPropagationClientServerDUnitTest.java |   22 +-
 ...lelWANPropagationConcurrentOpsDUnitTest.java |    4 +-
 .../ParallelWANPropagationDUnitTest.java        |    2 +-
 .../wan/parallel/ParallelWANStatsDUnitTest.java |    6 +-
 ...tewaySenderDistributedDeadlockDUnitTest.java |   12 +-
 ...rialGatewaySenderEventListenerDUnitTest.java |   70 +-
 .../SerialGatewaySenderOperationsDUnitTest.java |   10 +-
 .../SerialGatewaySenderQueueDUnitTest.java      |   26 +-
 ...ersistenceEnabledGatewaySenderDUnitTest.java |   14 +-
 .../serial/SerialWANPropagationDUnitTest.java   | 1336 +++++++
 .../SerialWANPropagationLoopBackDUnitTest.java  |    8 +-
 ...NPropagation_PartitionedRegionDUnitTest.java |  412 +++
 .../SerialWANPropagationsFeatureDUnitTest.java  |  338 ++
 .../serial/SerialWANPropogationDUnitTest.java   | 1336 -------
 ...NPropogation_PartitionedRegionDUnitTest.java |  412 ---
 .../SerialWANPropogationsFeatureDUnitTest.java  |  338 --
 .../wan/serial/SerialWANStatsDUnitTest.java     |   10 +-
 .../wan/wancommand/WANCommandTestBase.java      |   30 +-
 .../wan/wancommand/WanCommandListDUnitTest.java |   12 +-
 .../wancommand/WanCommandStatusDUnitTest.java   |    6 +-
 .../management/WANManagementDUnitTest.java      |    4 +-
 .../ClusterConfigurationDUnitTest.java          |    6 +-
 .../pulse/TestRemoteClusterDUnitTest.java       |    4 +-
 446 files changed, 28846 insertions(+), 25512 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/dfbc88b2/geode-core/src/main/java/com/gemstone/gemfire/cache/client/internal/AutoConnectionSourceImpl.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/dfbc88b2/geode-core/src/main/java/com/gemstone/gemfire/cache/client/internal/ConnectionFactoryImpl.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/dfbc88b2/geode-core/src/main/java/com/gemstone/gemfire/distributed/ConfigurationProperties.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/dfbc88b2/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/AbstractDistributionConfig.java
----------------------------------------------------------------------
diff --cc geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/AbstractDistributionConfig.java
index 571d4ba,cc544f6..ad43415
--- a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/AbstractDistributionConfig.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/AbstractDistributionConfig.java
@@@ -40,8 -39,8 +40,9 @@@ import com.gemstone.gemfire.internal.Co
  import com.gemstone.gemfire.internal.admin.remote.DistributionLocatorId;
  import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
  import com.gemstone.gemfire.internal.logging.LogWriterImpl;
+ import com.gemstone.gemfire.internal.security.SecurableComponent;
 +import com.gemstone.gemfire.internal.net.SSLEnabledComponent;
 +import com.gemstone.gemfire.internal.net.SocketCreator;
  import com.gemstone.gemfire.memcached.GemFireMemcachedServer;
  
  /**
@@@ -461,42 -505,25 +462,65 @@@ public abstract class AbstractDistribut
     * First check if sslComponents are in the list of valid components. If so, check that no other *-ssl-* properties other than cluster-ssl-* are set.
     * This would mean one is mixing the "old" with the "new"
     */
 +  @ConfigAttributeChecker(name = SSL_ENABLED_COMPONENTS)
 +  protected SSLEnabledComponent[] checkLegacySSLWhenSSLEnabledComponentsSet(SSLEnabledComponent[] value) {
 +    for (SSLEnabledComponent component : value) {
 +      switch (component) {
 +        case ALL:
 +        case CLUSTER:
 +        case SERVER:
 +        case GATEWAY:
 +        case JMX:
 +        case HTTP_SERVICE:
 +        case LOCATOR:
 +          continue;
 +        default:
 +          throw new IllegalArgumentException(LocalizedStrings.AbstractDistributionConfig_SSL_ENABLED_COMPONENTS_0_INVALID_TRY_1.toLocalizedString(new Object[] {
 +            value, StringUtils.join(new String[] {
 +            SSLEnabledComponent.ALL.getConstant(),
 +            SSLEnabledComponent.CLUSTER.getConstant(),
 +            SSLEnabledComponent.SERVER.getConstant(),
 +            SSLEnabledComponent.GATEWAY.getConstant(),
 +            SSLEnabledComponent.JMX.getConstant(),
 +            SSLEnabledComponent.HTTP_SERVICE.getConstant(),
 +            SSLEnabledComponent.LOCATOR.getConstant()
 +          }, ",")
 +          }));
 +      }
 +    }
 +    if (value.length > 0) {
 +      if (getClusterSSLEnabled() || getJmxManagerSSLEnabled() || getHttpServiceSSLEnabled() || getServerSSLEnabled() || getGatewaySSLEnabled()) {
 +        throw new IllegalArgumentException(LocalizedStrings.AbstractDistributionConfig_SSL_ENABLED_COMPONENTS_SET_INVALID_DEPRECATED_SSL_SET.toLocalizedString());
 +      }
 +    }
 +    return value;
 +  }
 +
 +
 +
++  /**
++   * First check if sslComponents are in the list of valid components. If so, check that no other *-ssl-* properties other than cluster-ssl-* are set.
++   * This would mean one is mixing the "old" with the "new"
++   */
+   @ConfigAttributeChecker(name=SECURITY_ENABLED_COMPONENTS)
+   protected String checkSecurityEnabledComponents(String value) {
+     // value with no commas
+     // empty value
+     // null
+     if (StringUtils.isEmpty(value) || SecurableComponent.NONE.name().equalsIgnoreCase(value)) {
+       return value;
+     }
+     if (!value.contains(",")) {
+       SecurableComponent.getEnum(value);
+       return value;
+     }
+     StringTokenizer stringTokenizer = new StringTokenizer(value, ",");
+     while (stringTokenizer.hasMoreTokens()){
+       SecurableComponent.getEnum(stringTokenizer.nextToken());
+     }
+     return value;
+   }
+ 
    // AbstractConfig overriding methods
  
    @Override
@@@ -946,19 -1163,8 +970,21 @@@
      m.put(SECURITY_MANAGER, "User defined fully qualified class name implementing SecurityManager interface for integrated security. Defaults to \"{0}\". Legal values can be any \"class name\" implementing SecurityManager that is present in the classpath.");
      m.put(SECURITY_POST_PROCESSOR, "User defined fully qualified class name implementing PostProcessor interface for integrated security. Defaults to \"{0}\". Legal values can be any \"class name\" implementing PostProcessor that is present in the classpath.");
  
+     m.put(SECURITY_ENABLED_COMPONENTS, "A comma delimited list of components that should be secured");
+ 
 +    m.put(SSL_ENABLED_COMPONENTS, "A comma delimited list of components that require SSL communications");
 +
 +    m.put(SSL_CIPHERS, "List of available SSL cipher suites that are to be enabled. Defaults to \"" + DEFAULT_SSL_CIPHERS + "\" meaning your provider''s defaults.");
 +    m.put(SSL_PROTOCOLS, "List of available SSL protocols that are to be enabled. Defaults to \"" + DEFAULT_SSL_PROTOCOLS + "\" meaning defaults of your provider.");
 +    m.put(SSL_REQUIRE_AUTHENTICATION, "If set to false, ciphers and protocols that permit anonymous clients are allowed. Defaults to \"" + DEFAULT_SSL_REQUIRE_AUTHENTICATION + "\".");
 +    m.put(SSL_KEYSTORE, "Location of the Java keystore file containing the certificate and private key.");
 +    m.put(SSL_KEYSTORE_TYPE, "For Java keystore file format, this property has the value jks (or JKS).");
 +    m.put(SSL_KEYSTORE_PASSWORD, "Password to access the private key from the keystore.");
 +    m.put(SSL_TRUSTSTORE, "Location of the Java keystore file containing the collection of trusted certificates.");
 +    m.put(SSL_TRUSTSTORE_PASSWORD, "Password to unlock the truststore.");
 +    m.put(SSL_DEFAULT_ALIAS, "The default certificate alias to be used in a multi-key keystore");
 +    m.put(SSL_HTTP_SERVICE_REQUIRE_AUTHENTICATION, "This property determines is the HTTP service with use mutual ssl authentication.");
 +
      dcAttDescriptions = Collections.unmodifiableMap(m);
  
    }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/dfbc88b2/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionConfig.java
----------------------------------------------------------------------
diff --cc geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionConfig.java
index 3f60778,2ff6540..3663be2
--- a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionConfig.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionConfig.java
@@@ -4186,385 -3985,35 +4186,414 @@@ public interface DistributionConfig ext
    @ConfigAttributeGetter(name = SECURITY_SHIRO_INIT)
    String getShiroInit();
  
 +
 +  /**
 +   * Returns the value of the {@link ConfigurationProperties#SSL_CLUSTER_ALIAS}
 +   * property.
 +   * @since Geode 1.0
 +   */
 +  @ConfigAttributeGetter(name = SSL_CLUSTER_ALIAS)
 +  String getClusterSSLAlias();
 +
 +  /**
 +   * Sets the value of the {@link ConfigurationProperties#SSL_CLUSTER_ALIAS}
 +   * property.
 +   * @since Geode 1.0
 +   */
 +  @ConfigAttributeSetter(name = SSL_CLUSTER_ALIAS)
 +  void setClusterSSLAlias(String alias);
 +
 +  /**
 +   * The Default Cluster SSL alias
 +   * @since Geode 1.0
 +   */
 +  String DEFAULT_SSL_ALIAS = "";
 +
 +  /**
 +   * The name of the {@link ConfigurationProperties#SSL_CLUSTER_ALIAS} property
 +   * @since Geode 1.0
 +   */
 +  @ConfigAttribute(type = String.class)
 +  String CLUSTER_SSL_ALIAS_NAME = SSL_CLUSTER_ALIAS;
 +
 +  /**
 +   * Returns the value of the {@link ConfigurationProperties#SSL_LOCATOR_ALIAS}
 +   * property.
 +   * @since Geode 1.0
 +   */
 +  @ConfigAttributeGetter(name = SSL_LOCATOR_ALIAS)
 +  String getLocatorSSLAlias();
 +
 +  /**
 +   * Sets the value of the {@link ConfigurationProperties#SSL_LOCATOR_ALIAS}
 +   * property.
 +   * @since Geode 1.0
 +   */
 +  @ConfigAttributeSetter(name = SSL_LOCATOR_ALIAS)
 +  void setLocatorSSLAlias(String alias);
 +
 +  /**
 +   * The name of the {@link ConfigurationProperties#SSL_LOCATOR_ALIAS} property
 +   * @since Geode 1.0
 +   */
 +  @ConfigAttribute(type = String.class)
 +  String LOCATOR_SSL_ALIAS_NAME = SSL_LOCATOR_ALIAS;
 +
 +  /**
 +   * Returns the value of the {@link ConfigurationProperties#SSL_GATEWAY_ALIAS}
 +   * property.
 +   * @since Geode 1.0
 +   */
 +  @ConfigAttributeGetter(name = SSL_GATEWAY_ALIAS)
 +  String getGatewaySSLAlias();
 +
 +  /**
 +   * Sets the value of the {@link ConfigurationProperties#SSL_GATEWAY_ALIAS}
 +   * property.
 +   * @since Geode 1.0
 +   */
 +  @ConfigAttributeSetter(name = SSL_GATEWAY_ALIAS)
 +  void setGatewaySSLAlias(String alias);
 +
 +  /**
 +   * The name of the {@link ConfigurationProperties#SSL_GATEWAY_ALIAS} property
 +   * @since Geode 1.0
 +   */
 +  @ConfigAttribute(type = String.class)
 +  String GATEWAY_SSL_ALIAS_NAME = SSL_GATEWAY_ALIAS;
 +
 +  /**
 +   * Returns the value of the {@link ConfigurationProperties#SSL_CLUSTER_ALIAS}
 +   * property.
 +   * @since Geode 1.0
 +   */
 +  @ConfigAttributeGetter(name = SSL_HTTP_SERVICE_ALIAS)
 +  String getHTTPServiceSSLAlias();
 +
 +  /**
 +   * Sets the value of the {@link ConfigurationProperties#SSL_HTTP_SERVICE_ALIAS}
 +   * property.
 +   * @since Geode 1.0
 +   */
 +  @ConfigAttributeSetter(name = SSL_HTTP_SERVICE_ALIAS)
 +  void setHTTPServiceSSLAlias(String alias);
 +
 +  /**
 +   * The name of the {@link ConfigurationProperties#SSL_HTTP_SERVICE_ALIAS} property
 +   * @since Geode 1.0
 +   */
 +  @ConfigAttribute(type = String.class)
 +  String HTTP_SERVICE_SSL_ALIAS_NAME = SSL_HTTP_SERVICE_ALIAS;
 +
 +  /**
 +   * Returns the value of the {@link ConfigurationProperties#SSL_JMX_MANAGER_ALIAS}
 +   * property.
 +   * @since Geode 1.0
 +   */
 +  @ConfigAttributeGetter(name = SSL_JMX_MANAGER_ALIAS)
 +  String getJMXManagerSSLAlias();
 +
 +  /**
 +   * Sets the value of the {@link ConfigurationProperties#SSL_JMX_MANAGER_ALIAS}
 +   * property.
 +   * @since Geode 1.0
 +   */
 +  @ConfigAttributeSetter(name = SSL_JMX_MANAGER_ALIAS)
 +  void setJMXManagerSSLAlias(String alias);
 +
 +  /**
 +   * The name of the {@link ConfigurationProperties#SSL_JMX_MANAGER_ALIAS} property
 +   * @since Geode 1.0
 +   */
 +  @ConfigAttribute(type = String.class)
 +  String JMX_MANAGER_SSL_ALIAS_NAME = SSL_JMX_MANAGER_ALIAS;
 +
 +  /**
 +   * Returns the value of the {@link ConfigurationProperties#SSL_SERVER_ALIAS}
 +   * property.
 +   * @since Geode 1.0
 +   */
 +  @ConfigAttributeGetter(name = SSL_SERVER_ALIAS)
 +  String getServerSSLAlias();
 +
 +  /**
 +   * Sets the value of the {@link ConfigurationProperties#SSL_SERVER_ALIAS}
 +   * property.
 +   * @since Geode 1.0
 +   */
 +  @ConfigAttributeSetter(name = SSL_SERVER_ALIAS)
 +  void setServerSSLAlias(String alias);
 +
 +  /**
 +   * The name of the {@link ConfigurationProperties#SSL_SERVER_ALIAS} property
 +   * @since Geode 1.0
 +   */
 +  @ConfigAttribute(type = String.class)
 +  String SERVER_SSL_ALIAS_NAME = SSL_SERVER_ALIAS;
 +
 +  /**
 +   * Returns the value of the {@link ConfigurationProperties#SSL_ENABLED_COMPONENTS}
 +   * property.
 +   * @since Geode 1.0
 +   */
 +  @ConfigAttributeGetter(name = SSL_ENABLED_COMPONENTS)
 +  SSLEnabledComponent[] getSSLEnabledComponents();
 +
 +  /**
 +   * Sets the value of the {@link ConfigurationProperties#SSL_ENABLED_COMPONENTS}
 +   * property.
 +   * @since Geode 1.0
 +   */
 +  @ConfigAttributeSetter(name = SSL_ENABLED_COMPONENTS)
 +  void setSSLEnabledComponents(SSLEnabledComponent[] sslEnabledComponents);
 +
 +  /**
 +   * The name of the {@link ConfigurationProperties#SSL_ENABLED_COMPONENTS} property
 +   * @since Geode 1.0
 +   */
 +  @ConfigAttribute(type = SSLEnabledComponent[].class)
 +  String SSL_ENABLED_COMPONENTS_NAME = SSL_ENABLED_COMPONENTS;
 +
 +  /**
 +   * The default ssl enabled components
 +   * @since Geode 1.0
 +   */
 +  SSLEnabledComponent[] DEFAULT_SSL_ENABLED_COMPONENTS = new SSLEnabledComponent[] {};
 +
 +  /**
 +   * Returns the value of the {@link ConfigurationProperties#SSL_PROTOCOLS}
 +   * property.
 +   */
 +  @ConfigAttributeGetter(name = SSL_PROTOCOLS)
 +  String getSSLProtocols();
 +
 +  /**
 +   * Sets the value of the {@link ConfigurationProperties#SSL_PROTOCOLS}
 +   * property.
 +   */
 +  @ConfigAttributeSetter(name = SSL_PROTOCOLS)
 +  void setSSLProtocols(String protocols);
 +
 +  /**
 +   * The name of the {@link ConfigurationProperties#SSL_PROTOCOLS} property
 +   */
 +  @ConfigAttribute(type = String.class)
 +  String SSL_PROTOCOLS_NAME = SSL_PROTOCOLS;
 +
 +  /**
 +   * Returns the value of the {@link ConfigurationProperties#SSL_CIPHERS}
 +   * property.
 +   */
 +  @ConfigAttributeGetter(name = SSL_CIPHERS)
 +  String getSSLCiphers();
 +
 +  /**
 +   * Sets the value of the {@link ConfigurationProperties#SSL_CIPHERS}
 +   * property.
 +   */
 +  @ConfigAttributeSetter(name = SSL_CIPHERS)
 +  void setSSLCiphers(String ciphers);
 +
 +  /**
 +   * The name of the {@link ConfigurationProperties#SSL_CIPHERS} property
 +   */
 +  @ConfigAttribute(type = String.class)
 +  String SSL_CIPHERS_NAME = SSL_CIPHERS;
 +
 +  /**
 +   * Returns the value of the {@link ConfigurationProperties#SSL_REQUIRE_AUTHENTICATION}
 +   * property.
 +   */
 +  @ConfigAttributeGetter(name = SSL_REQUIRE_AUTHENTICATION)
 +  boolean getSSLRequireAuthentication();
 +
 +  /**
 +   * Sets the value of the {@link ConfigurationProperties#SSL_REQUIRE_AUTHENTICATION}
 +   * property.
 +   */
 +  @ConfigAttributeSetter(name = SSL_REQUIRE_AUTHENTICATION)
 +  void setSSLRequireAuthentication(boolean enabled);
 +
 +  /**
 +   * The name of the {@link ConfigurationProperties#SSL_REQUIRE_AUTHENTICATION} property
 +   */
 +  @ConfigAttribute(type = Boolean.class)
 +  String SSL_REQUIRE_AUTHENTICATION_NAME = SSL_REQUIRE_AUTHENTICATION;
 +
 +  /**
 +   * Returns the value of the {@link ConfigurationProperties#SSL_KEYSTORE}
 +   * property.
 +   */
 +  @ConfigAttributeGetter(name = SSL_KEYSTORE)
 +  String getSSLKeyStore();
 +
 +  /**
 +   * Sets the value of the {@link ConfigurationProperties#SSL_KEYSTORE}
 +   * property.
 +   */
 +  @ConfigAttributeSetter(name = SSL_KEYSTORE)
 +  void setSSLKeyStore(String keyStore);
 +
 +  /**
 +   * The name of the {@link ConfigurationProperties#SSL_KEYSTORE} property
 +   */
 +  @ConfigAttribute(type = String.class)
 +  String SSL_KEYSTORE_NAME = SSL_KEYSTORE;
 +
 +  /**
 +   * Returns the value of the {@link ConfigurationProperties#SSL_KEYSTORE_TYPE}
 +   * property.
 +   */
 +  @ConfigAttributeGetter(name = SSL_KEYSTORE_TYPE)
 +  String getSSLKeyStoreType();
 +
 +  /**
 +   * Sets the value of the {@link ConfigurationProperties#SSL_KEYSTORE_TYPE}
 +   * property.
 +   */
 +  @ConfigAttributeSetter(name = SSL_KEYSTORE_TYPE)
 +  void setSSLKeyStoreType(String keyStoreType);
 +
 +  /**
 +   * The name of the {@link ConfigurationProperties#SSL_KEYSTORE_TYPE} property
 +   */
 +  @ConfigAttribute(type = String.class)
 +  String SSL_KEYSTORE_TYPE_NAME = SSL_KEYSTORE_TYPE;
 +
 +  /**
 +   * Returns the value of the {@link ConfigurationProperties#SSL_KEYSTORE_PASSWORD}
 +   * property.
 +   */
 +  @ConfigAttributeGetter(name = SSL_KEYSTORE_PASSWORD)
 +  String getSSLKeyStorePassword();
 +
 +  /**
 +   * Sets the value of the {@link ConfigurationProperties#SSL_KEYSTORE_PASSWORD}
 +   * property.
 +   */
 +  @ConfigAttributeSetter(name = SSL_KEYSTORE_PASSWORD)
 +  void setSSLKeyStorePassword(String keyStorePassword);
 +
 +  /**
 +   * The name of the {@link ConfigurationProperties#SSL_KEYSTORE_PASSWORD} property
 +   */
 +  @ConfigAttribute(type = String.class)
 +  String SSL_KEYSTORE_PASSWORD_NAME = SSL_KEYSTORE_PASSWORD;
 +
 +  /**
 +   * Returns the value of the {@link ConfigurationProperties#SSL_TRUSTSTORE}
 +   * property.
 +   */
 +  @ConfigAttributeGetter(name = SSL_TRUSTSTORE)
 +  String getSSLTrustStore();
 +
 +  /**
 +   * Sets the value of the {@link ConfigurationProperties#SSL_TRUSTSTORE}
 +   * property.
 +   */
 +  @ConfigAttributeSetter(name = SSL_TRUSTSTORE)
 +  void setSSLTrustStore(String trustStore);
 +
 +  /**
 +   * The name of the {@link ConfigurationProperties#SSL_TRUSTSTORE} property
 +   */
 +  @ConfigAttribute(type = String.class)
 +  String SSL_TRUSTSTORE_NAME = SSL_TRUSTSTORE;
 +
 +  /**
 +   * Returns the value of the {@link ConfigurationProperties#SSL_DEFAULT_ALIAS}
 +   * property.
 +   */
 +  @ConfigAttributeGetter(name = SSL_DEFAULT_ALIAS)
 +  String getSSLDefaultAlias();
 +
 +  /**
 +   * Sets the value of the {@link ConfigurationProperties#SSL_DEFAULT_ALIAS}
 +   * property.
 +   */
 +  @ConfigAttributeSetter(name = SSL_DEFAULT_ALIAS)
 +  void setSSLDefaultAlias(String sslDefaultAlias);
 +
 +  /**
 +   * The name of the {@link ConfigurationProperties#SSL_DEFAULT_ALIAS} property
 +   */
 +  @ConfigAttribute(type = String.class)
 +  String SSL_DEFAULT_ALIAS_NAME = SSL_DEFAULT_ALIAS;
 +
 +  /**
 +   * Returns the value of the {@link ConfigurationProperties#SSL_TRUSTSTORE_PASSWORD}
 +   * property.
 +   */
 +  @ConfigAttributeGetter(name = SSL_TRUSTSTORE_PASSWORD)
 +  String getSSLTrustStorePassword();
 +
 +  /**
 +   * Sets the value of the {@link ConfigurationProperties#SSL_TRUSTSTORE_PASSWORD}
 +   * property.
 +   */
 +  @ConfigAttributeSetter(name = SSL_TRUSTSTORE_PASSWORD)
 +  void setSSLTrustStorePassword(String trustStorePassword);
 +
 +  /**
 +   * The name of the {@link ConfigurationProperties#SSL_TRUSTSTORE_PASSWORD} property
 +   */
 +  @ConfigAttribute(type = String.class)
 +  String SSL_TRUSTSTORE_PASSWORD_NAME = SSL_TRUSTSTORE_PASSWORD;
 +
 +  /**
 +   * Returns the value of the {@link ConfigurationProperties#SSL_HTTP_SERVICE_REQUIRE_AUTHENTICATION}
 +   * property.
 +   */
 +  @ConfigAttributeGetter(name = SSL_HTTP_SERVICE_REQUIRE_AUTHENTICATION)
 +  boolean getSSLHTTPRequireAuthentication();
 +
 +  /**
 +   * Sets the value of the {@link ConfigurationProperties#SSL_HTTP_SERVICE_REQUIRE_AUTHENTICATION}
 +   * property.
 +   */
 +  @ConfigAttributeSetter(name = SSL_HTTP_SERVICE_REQUIRE_AUTHENTICATION)
 +  void setSSLHTTPRequireAuthentication(boolean requiresAuthentication);
 +
 +  /**
 +   * The name of the {@link ConfigurationProperties#SSL_HTTP_SERVICE_REQUIRE_AUTHENTICATION} property
 +   */
 +  @ConfigAttribute(type = Boolean.class)
 +  String SSL_HTTP_SERVICE_REQUIRE_AUTHENTICATION_NAME = SSL_HTTP_SERVICE_REQUIRE_AUTHENTICATION;
 +
 +  /**
 +   * The default value for http service ssl mutual authentication
 +   */
 +  boolean DEFAULT_SSL_HTTP_SERVICE_REQUIRE_AUTHENTICATION = false;
 +
+   /**
+    * Returns the value of the {@link ConfigurationProperties#SECURITY_ENABLED_COMPONENTS}
+    * property.
+    * @since Geode 1.0
+    */
+   @ConfigAttributeGetter(name = SECURITY_ENABLED_COMPONENTS)
+   String getSecurityEnabledComponents();
+ 
+   /**
+    * Sets the value of the {@link ConfigurationProperties#SECURITY_ENABLED_COMPONENTS}
+    * property.
+    * @since Geode 1.0
+    */
+   @ConfigAttributeSetter(name = SECURITY_ENABLED_COMPONENTS)
+   void setSecurityEnabledComponents(String securityEnabledComponents);
+ 
+   /**
+    * The name of the {@link ConfigurationProperties#SECURITY_ENABLED_COMPONENTS} property
+    * @since Geode 1.0
+    */
+   @ConfigAttribute(type = String.class)
+   String SECURITY_ENABLED_COMPONENTS_NAME = SECURITY_ENABLED_COMPONENTS;
+ 
+   /**
+    * The default ssl enabled components
+    * @since Geode 1.0
+    */
+   String DEFAULT_SECURITY_ENABLED_COMPONENTS = "all";
+ 
    //*************** Initializers to gather all the annotations in this class ************************
  
    Map<String, ConfigAttribute> attributes = new HashMap<>();

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/dfbc88b2/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionConfigImpl.java
----------------------------------------------------------------------
diff --cc geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionConfigImpl.java
index a5a9aa6,fd4743b..140401a
--- a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionConfigImpl.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionConfigImpl.java
@@@ -40,13 -39,11 +40,14 @@@ import org.apache.geode.redis.GeodeRedi
  
  import com.gemstone.gemfire.GemFireConfigException;
  import com.gemstone.gemfire.GemFireIOException;
 +import com.gemstone.gemfire.InternalGemFireException;
 +import com.gemstone.gemfire.distributed.ConfigurationProperties;
  import com.gemstone.gemfire.distributed.DistributedSystem;
+ import org.apache.geode.security.SecurableComponents;
  import com.gemstone.gemfire.internal.ConfigSource;
 -import com.gemstone.gemfire.internal.SocketCreator;
  import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
 +import com.gemstone.gemfire.internal.net.SSLEnabledComponent;
 +import com.gemstone.gemfire.internal.net.SocketCreator;
  import com.gemstone.gemfire.internal.process.ProcessLauncherContext;
  import com.gemstone.gemfire.memcached.GemFireMemcachedServer;
  
@@@ -450,130 -344,69 +451,131 @@@ public class DistributionConfigImpl ext
    private String jmxManagerHostnameForClients = DEFAULT_JMX_MANAGER_HOSTNAME_FOR_CLIENTS;
    private String jmxManagerPasswordFile = DEFAULT_JMX_MANAGER_PASSWORD_FILE;
    private String jmxManagerAccessFile = DEFAULT_JMX_MANAGER_ACCESS_FILE;
 -  private int jmxManagerHttpPort = DEFAULT_HTTP_SERVICE_PORT; 
 +  private int jmxManagerHttpPort = DEFAULT_HTTP_SERVICE_PORT;
    private int jmxManagerUpdateRate = DEFAULT_JMX_MANAGER_UPDATE_RATE;
 - 
 -  private boolean jmxManagerSSL = DEFAULT_JMX_MANAGER_SSL;
 +
 +  @Deprecated
    private boolean jmxManagerSSLEnabled = DEFAULT_JMX_MANAGER_SSL_ENABLED;
 +  @Deprecated
    private boolean jmxManagerSslRequireAuthentication = DEFAULT_JMX_MANAGER_SSL_REQUIRE_AUTHENTICATION;
 +  @Deprecated
    private String jmxManagerSslProtocols = DEFAULT_JMX_MANAGER_SSL_PROTOCOLS;
 +  @Deprecated
    private String jmxManagerSslCiphers = DEFAULT_JMX_MANAGER_SSL_CIPHERS;
 +  @Deprecated
    private Properties jmxManagerSslProperties = new Properties();
 -  
 -  protected String jmxManagerSSLKeyStore = DEFAULT_JMX_MANAGER_SSL_KEYSTORE;
 -  protected String jmxManagerSSLKeyStoreType = DEFAULT_JMX_MANAGER_SSL_KEYSTORE_TYPE;
 -  protected String jmxManagerSSLKeyStorePassword = DEFAULT_JMX_MANAGER_SSL_KEYSTORE_PASSWORD;
 -  protected String jmxManagerSSLTrustStore = DEFAULT_JMX_MANAGER_SSL_TRUSTSTORE;
 -  protected String jmxManagerSSLTrustStorePassword = DEFAULT_JMX_MANAGER_SSL_TRUSTSTORE_PASSWORD;
 -  
 +  @Deprecated
 +  private String jmxManagerSSLKeyStore = DEFAULT_JMX_MANAGER_SSL_KEYSTORE;
 +  @Deprecated
 +  private String jmxManagerSSLKeyStoreType = DEFAULT_JMX_MANAGER_SSL_KEYSTORE_TYPE;
 +  @Deprecated
 +  private String jmxManagerSSLKeyStorePassword = DEFAULT_JMX_MANAGER_SSL_KEYSTORE_PASSWORD;
 +  @Deprecated
 +  private String jmxManagerSSLTrustStore = DEFAULT_JMX_MANAGER_SSL_TRUSTSTORE;
 +  @Deprecated
 +  private String jmxManagerSSLTrustStorePassword = DEFAULT_JMX_MANAGER_SSL_TRUSTSTORE_PASSWORD;
 +
 +  private String jmxManagerSSLAlias = DEFAULT_SSL_ALIAS;
 +
 +  @Deprecated
    private boolean serverSSLEnabled = DEFAULT_SERVER_SSL_ENABLED;
 +  @Deprecated
    private boolean serverSslRequireAuthentication = DEFAULT_SERVER_SSL_REQUIRE_AUTHENTICATION;
 +  @Deprecated
    private String serverSslProtocols = DEFAULT_SERVER_SSL_PROTOCOLS;
 +  @Deprecated
    private String serverSslCiphers = DEFAULT_SERVER_SSL_CIPHERS;
 +  @Deprecated
    private Properties serverSslProperties = new Properties();
 -  
 -  protected String serverSSLKeyStore = DEFAULT_SERVER_SSL_KEYSTORE;
 -  protected String serverSSLKeyStoreType = DEFAULT_SERVER_SSL_KEYSTORE_TYPE;
 -  protected String serverSSLKeyStorePassword = DEFAULT_SERVER_SSL_KEYSTORE_PASSWORD;
 -  protected String serverSSLTrustStore = DEFAULT_SERVER_SSL_TRUSTSTORE;
 -  protected String serverSSLTrustStorePassword = DEFAULT_SERVER_SSL_TRUSTSTORE_PASSWORD;
 -
 +  @Deprecated
 +  private String serverSSLKeyStore = DEFAULT_SERVER_SSL_KEYSTORE;
 +  @Deprecated
 +  private String serverSSLKeyStoreType = DEFAULT_SERVER_SSL_KEYSTORE_TYPE;
 +  @Deprecated
 +  private String serverSSLKeyStorePassword = DEFAULT_SERVER_SSL_KEYSTORE_PASSWORD;
 +  @Deprecated
 +  private String serverSSLTrustStore = DEFAULT_SERVER_SSL_TRUSTSTORE;
 +  @Deprecated
 +  private String serverSSLTrustStorePassword = DEFAULT_SERVER_SSL_TRUSTSTORE_PASSWORD;
 +
 +  private String serverSSLAlias = DEFAULT_SSL_ALIAS;
 +
 +  @Deprecated
    private boolean gatewaySSLEnabled = DEFAULT_GATEWAY_SSL_ENABLED;
 +  @Deprecated
    private boolean gatewaySslRequireAuthentication = DEFAULT_GATEWAY_SSL_REQUIRE_AUTHENTICATION;
 +  @Deprecated
    private String gatewaySslProtocols = DEFAULT_GATEWAY_SSL_PROTOCOLS;
 +  @Deprecated
    private String gatewaySslCiphers = DEFAULT_GATEWAY_SSL_CIPHERS;
 +  @Deprecated
    private Properties gatewaySslProperties = new Properties();
 -  
 -  protected String gatewaySSLKeyStore = DEFAULT_GATEWAY_SSL_KEYSTORE;
 -  protected String gatewaySSLKeyStoreType = DEFAULT_GATEWAY_SSL_KEYSTORE_TYPE;
 -  protected String gatewaySSLKeyStorePassword = DEFAULT_GATEWAY_SSL_KEYSTORE_PASSWORD;
 -  protected String gatewaySSLTrustStore = DEFAULT_GATEWAY_SSL_TRUSTSTORE;
 -  protected String gatewaySSLTrustStorePassword = DEFAULT_GATEWAY_SSL_TRUSTSTORE_PASSWORD;
 -  
 -  
 +  @Deprecated
 +  private String gatewaySSLKeyStore = DEFAULT_GATEWAY_SSL_KEYSTORE;
 +  @Deprecated
 +  private String gatewaySSLKeyStoreType = DEFAULT_GATEWAY_SSL_KEYSTORE_TYPE;
 +  @Deprecated
 +  private String gatewaySSLKeyStorePassword = DEFAULT_GATEWAY_SSL_KEYSTORE_PASSWORD;
 +  @Deprecated
 +  private String gatewaySSLTrustStore = DEFAULT_GATEWAY_SSL_TRUSTSTORE;
 +  @Deprecated
 +  private String gatewaySSLTrustStorePassword = DEFAULT_GATEWAY_SSL_TRUSTSTORE_PASSWORD;
 +
 +
 +  private String gatewaySSLAlias = DEFAULT_SSL_ALIAS;
 +
 +  @Deprecated
    private boolean httpServiceSSLEnabled = DEFAULT_HTTP_SERVICE_SSL_ENABLED;
 +  @Deprecated
    private boolean httpServiceSSLRequireAuthentication = DEFAULT_HTTP_SERVICE_SSL_REQUIRE_AUTHENTICATION;
 +  @Deprecated
    private String httpServiceSSLProtocols = DEFAULT_HTTP_SERVICE_SSL_PROTOCOLS;
 +  @Deprecated
    private String httpServiceSSLCiphers = DEFAULT_HTTP_SERVICE_SSL_CIPHERS;
 +  @Deprecated
    private Properties httpServiceSSLProperties = new Properties();
 -  
 -  protected String httpServiceSSLKeyStore = DEFAULT_HTTP_SERVICE_SSL_KEYSTORE;
 -  protected String httpServiceSSLKeyStoreType = DEFAULT_HTTP_SERVICE_SSL_KEYSTORE_TYPE;
 -  protected String httpServiceSSLKeyStorePassword = DEFAULT_HTTP_SERVICE_SSL_KEYSTORE_PASSWORD;
 -  protected String httpServiceSSLTrustStore = DEFAULT_HTTP_SERVICE_SSL_TRUSTSTORE;
 -  protected String httpServiceSSLTrustStorePassword = DEFAULT_HTTP_SERVICE_SSL_TRUSTSTORE_PASSWORD;
 -  
 +  @Deprecated
 +  private String httpServiceSSLKeyStore = DEFAULT_HTTP_SERVICE_SSL_KEYSTORE;
 +  @Deprecated
 +  private String httpServiceSSLKeyStoreType = DEFAULT_HTTP_SERVICE_SSL_KEYSTORE_TYPE;
 +  @Deprecated
 +  private String httpServiceSSLKeyStorePassword = DEFAULT_HTTP_SERVICE_SSL_KEYSTORE_PASSWORD;
 +  @Deprecated
 +  private String httpServiceSSLTrustStore = DEFAULT_HTTP_SERVICE_SSL_TRUSTSTORE;
 +  @Deprecated
 +  private String httpServiceSSLTrustStorePassword = DEFAULT_HTTP_SERVICE_SSL_TRUSTSTORE_PASSWORD;
 +
 +  private String httpServiceSSLAlias = DEFAULT_SSL_ALIAS;
 +
 +  private SSLEnabledComponent[] sslEnabledComponents = DEFAULT_SSL_ENABLED_COMPONENTS;
 +
 +  private String sslProtocols = DEFAULT_SSL_PROTOCOLS;
 +  private String sslCiphers = DEFAULT_SSL_CIPHERS;
 +  private boolean sslRequireAuthentication = DEFAULT_SSL_REQUIRE_AUTHENTICATION;
 +  private String sslKeyStore = DEFAULT_SSL_KEYSTORE;
 +  private String sslKeyStoreType = DEFAULT_CLUSTER_SSL_KEYSTORE_TYPE;
 +  private String sslKeyStorePassword = DEFAULT_SSL_KEYSTORE_PASSWORD;
 +  private String sslTrustStore = DEFAULT_SSL_TRUSTSTORE;
 +  private String sslTrustStorePassword = DEFAULT_SSL_TRUSTSTORE_PASSWORD;
 +  private boolean sslHttpServiceRequireAuthentication = DEFAULT_SSL_HTTP_SERVICE_REQUIRE_AUTHENTICATION;
 +
 +  private String locatorSSLAlias = DEFAULT_SSL_ALIAS;
 +
 +  private String sslDefaultAlias = DEFAULT_SSL_ALIAS;
 +
    private Map<String, ConfigSource> sourceMap = Collections.synchronizedMap(new HashMap<String, ConfigSource>());
 -  
 +
    protected String userCommandPackages = DEFAULT_USER_COMMAND_PACKAGES;
  
-   /**
-    * "off-heap-memory-size" with value of "" or "<size>[g|m]"
-    */
+   private String securityEnabledComponents = DEFAULT_SECURITY_ENABLED_COMPONENTS;
+ 
+   /** "off-heap-memory-size" with value of "" or "<size>[g|m]" */
++
    protected String offHeapMemorySize = DEFAULT_OFF_HEAP_MEMORY_SIZE;
 -  
 -  /** Whether pages should be locked into memory or allowed to swap to disk */
 +
 +  /**
 +   * Whether pages should be locked into memory or allowed to swap to disk
 +   */
    private boolean lockMemory = DEFAULT_LOCK_MEMORY;
  
    private String shiroInit = "";
@@@ -754,28 -592,8 +756,30 @@@
      this.shiroInit = other.getShiroInit();
      this.securityManager = other.getSecurityManager();
      this.postProcessor = other.getPostProcessor();
+ 
+     this.securityEnabledComponents = ((DistributionConfigImpl) other).securityEnabledComponents;
 +    this.clusterSSLAlias = other.getClusterSSLAlias();
 +    this.gatewaySSLAlias = other.getGatewaySSLAlias();
 +    this.httpServiceSSLAlias = other.getHTTPServiceSSLAlias();
 +    this.jmxManagerSSLAlias = other.getJMXManagerSSLAlias();
 +    this.serverSSLAlias = other.getServerSSLAlias();
 +    this.locatorSSLAlias = other.getLocatorSSLAlias();
 +
 +    this.sslEnabledComponents = ((DistributionConfigImpl) other).sslEnabledComponents;
 +
 +    this.sslCiphers = other.getSSLCiphers();
 +    this.sslProtocols = other.getSSLProtocols();
 +    this.sslRequireAuthentication = other.getSSLRequireAuthentication();
 +    this.sslKeyStore = other.getSSLKeyStore();
 +    this.sslKeyStorePassword = other.getSSLKeyStorePassword();
 +    this.sslKeyStoreType = other.getSSLKeyStoreType();
 +    this.sslTrustStore = other.getSSLTrustStore();
 +    this.sslTrustStorePassword = other.getSSLTrustStorePassword();
 +    this.sslProperties = other.getSSLProperties();
 +    this.sslDefaultAlias = other.getSSLDefaultAlias();
 +    this.sslHttpServiceRequireAuthentication = other.getSSLHTTPRequireAuthentication();
 +
 +
    }
  
    /**
@@@ -2485,177 -2324,16 +2492,187 @@@
    }
  
    @Override
+   public String getSecurityEnabledComponents() {
+     return securityEnabledComponents;
+   }
+ 
+   @Override
+   public void setSecurityEnabledComponents(final String securityEnabledComponents) {
+     this.securityEnabledComponents = (String) checkAttribute(SECURITY_ENABLED_COMPONENTS, securityEnabledComponents);
+   }
+ 
++  @Override
 +  public String getClusterSSLAlias() {
 +    return clusterSSLAlias;
 +  }
 +
 +  @Override
 +  public void setClusterSSLAlias(final String alias) {
 +    clusterSSLAlias = alias;
 +  }
 +
 +  @Override
 +  public String getLocatorSSLAlias() {
 +    return locatorSSLAlias;
 +  }
 +
 +  @Override
 +  public void setLocatorSSLAlias(final String locatorSSLAlias) {
 +    this.locatorSSLAlias = locatorSSLAlias;
 +  }
 +
 +  @Override
 +  public String getGatewaySSLAlias() {
 +    return gatewaySSLAlias;
 +  }
 +
 +  @Override
 +  public void setGatewaySSLAlias(final String alias) {
 +    gatewaySSLAlias = alias;
 +  }
 +
 +  @Override
 +  public String getHTTPServiceSSLAlias() {
 +    return httpServiceSSLAlias;
 +  }
 +
 +  @Override
 +  public void setHTTPServiceSSLAlias(final String alias) {
 +    httpServiceSSLAlias = alias;
 +  }
 +
 +  @Override
 +  public String getJMXManagerSSLAlias() {
 +    return jmxManagerSSLAlias;
 +  }
 +
 +  @Override
 +  public void setJMXManagerSSLAlias(final String alias) {
 +    jmxManagerSSLAlias = alias;
 +  }
 +
 +  @Override
 +  public String getServerSSLAlias() {
 +    return serverSSLAlias;
 +  }
 +
 +  @Override
 +  public void setServerSSLAlias(final String alias) {
 +    serverSSLAlias = alias;
 +  }
 +
 +  @Override
 +  public SSLEnabledComponent[] getSSLEnabledComponents() {
 +    return sslEnabledComponents;
 +  }
 +
 +  @Override
 +  public void setSSLEnabledComponents(final SSLEnabledComponent[] sslEnabledComponents) {
 +    this.sslEnabledComponents = sslEnabledComponents;
 +  }
 +
 +  @Override
 +  public String getSSLProtocols() {
 +    return sslProtocols;
 +  }
 +
 +  @Override
 +  public void setSSLProtocols(final String sslProtocols) {
 +    this.sslProtocols = sslProtocols;
 +  }
 +
 +  @Override
 +  public String getSSLCiphers() {
 +    return sslCiphers;
 +  }
 +
 +  @Override
 +  public void setSSLCiphers(final String sslCiphers) {
 +    this.sslCiphers = sslCiphers;
 +  }
 +
 +  @Override
 +  public boolean getSSLRequireAuthentication() {
 +    return sslRequireAuthentication;
 +  }
 +
 +  @Override
 +  public void setSSLRequireAuthentication(final boolean sslRequireAuthentication) {
 +    this.sslRequireAuthentication = sslRequireAuthentication;
 +  }
 +
 +  @Override
 +  public String getSSLKeyStore() {
 +    return sslKeyStore;
 +  }
 +
 +  @Override
 +  public void setSSLKeyStore(final String sslKeyStore) {
 +    this.sslKeyStore = sslKeyStore;
 +  }
 +
 +  @Override
 +  public String getSSLKeyStoreType() {
 +    return sslKeyStoreType;
 +  }
 +
 +  @Override
 +  public void setSSLKeyStoreType(final String sslKeyStoreType) {
 +    this.sslKeyStoreType = sslKeyStoreType;
 +  }
 +
 +  @Override
 +  public String getSSLKeyStorePassword() {
 +    return sslKeyStorePassword;
 +  }
 +
 +  @Override
 +  public void setSSLKeyStorePassword(final String sslKeyStorePassword) {
 +    this.sslKeyStorePassword = sslKeyStorePassword;
 +  }
 +
 +  @Override
 +  public String getSSLTrustStore() {
 +    return sslTrustStore;
 +  }
 +
 +  @Override
 +  public void setSSLTrustStore(final String sslTrustStore) {
 +    this.sslTrustStore = sslTrustStore;
 +  }
 +
 +  @Override
 +  public String getSSLDefaultAlias() {
 +    return sslDefaultAlias;
 +  }
 +
 +  @Override
 +  public void setSSLDefaultAlias(final String sslDefaultAlias) {
 +    this.sslDefaultAlias = sslDefaultAlias;
 +  }
 +
 +  @Override
 +  public String getSSLTrustStorePassword() {
 +    return sslTrustStorePassword;
 +  }
 +
 +  @Override
 +  public void setSSLTrustStorePassword(final String sslTrustStorePassword) {
 +    this.sslTrustStorePassword = sslTrustStorePassword;
 +  }
 +
 +  @Override
 +  public boolean getSSLHTTPRequireAuthentication() {
 +    return sslHttpServiceRequireAuthentication;
 +  }
 +
 +  @Override
 +  public void setSSLHTTPRequireAuthentication(final boolean requiresAuthenatication) {
 +    this.sslHttpServiceRequireAuthentication = requiresAuthenatication;
 +  }
 +
    ///////////////////////  Utility Methods  ///////////////////////
 +
    /**
     * Two instances of <code>DistributedConfigImpl</code> are equal if all of
     * their configuration properties are the same. Be careful if you need to
@@@ -3019,362 -2602,268 +3036,410 @@@
      if (locatorWaitTime != other.locatorWaitTime) {
        return false;
      }
 -    if (logDiskSpaceLimit != other.logDiskSpaceLimit)
 +    if (logDiskSpaceLimit != other.logDiskSpaceLimit) {
        return false;
 +    }
      if (logFile == null) {
 -      if (other.logFile != null)
 +      if (other.logFile != null) {
          return false;
 -    } else if (!logFile.equals(other.logFile))
 +      }
 +    } else if (!logFile.equals(other.logFile)) {
        return false;
 -    if (logFileSizeLimit != other.logFileSizeLimit)
 +    }
 +    if (logFileSizeLimit != other.logFileSizeLimit) {
        return false;
 -    if (logLevel != other.logLevel)
 +    }
 +    if (logLevel != other.logLevel) {
        return false;
 -    if (maxNumReconnectTries != other.maxNumReconnectTries)
 +    }
 +    if (maxNumReconnectTries != other.maxNumReconnectTries) {
        return false;
 -    if (maxWaitTimeForReconnect != other.maxWaitTimeForReconnect)
 +    }
 +    if (maxWaitTimeForReconnect != other.maxWaitTimeForReconnect) {
        return false;
 +    }
      if (mcastAddress == null) {
 -      if (other.mcastAddress != null)
 +      if (other.mcastAddress != null) {
          return false;
 -    } else if (!mcastAddress.equals(other.mcastAddress))
 +      }
 +    } else if (!mcastAddress.equals(other.mcastAddress)) {
        return false;
 +    }
      if (mcastFlowControl == null) {
 -      if (other.mcastFlowControl != null)
 +      if (other.mcastFlowControl != null) {
          return false;
 -    } else if (!mcastFlowControl.equals(other.mcastFlowControl))
 +      }
 +    } else if (!mcastFlowControl.equals(other.mcastFlowControl)) {
        return false;
 -    if (mcastPort != other.mcastPort)
 +    }
 +    if (mcastPort != other.mcastPort) {
        return false;
 -    if (mcastRecvBufferSize != other.mcastRecvBufferSize)
 +    }
 +    if (mcastRecvBufferSize != other.mcastRecvBufferSize) {
        return false;
 -    if (mcastSendBufferSize != other.mcastSendBufferSize)
 +    }
 +    if (mcastSendBufferSize != other.mcastSendBufferSize) {
        return false;
 -    if (mcastTtl != other.mcastTtl)
 +    }
 +    if (mcastTtl != other.mcastTtl) {
        return false;
 -    if (memberTimeout != other.memberTimeout)
 +    }
 +    if (memberTimeout != other.memberTimeout) {
        return false;
 -    if (!Arrays.equals(membershipPortRange, other.membershipPortRange))
 +    }
 +    if (!Arrays.equals(membershipPortRange, other.membershipPortRange)) {
        return false;
 -    if (memcachedPort != other.memcachedPort)
 +    }
 +    if (memcachedPort != other.memcachedPort) {
        return false;
 +    }
      if (memcachedProtocol == null) {
 -      if (other.memcachedProtocol != null)
 +      if (other.memcachedProtocol != null) {
          return false;
 -    } else if (!memcachedProtocol.equals(other.memcachedProtocol))
 +      }
 +    } else if (!memcachedProtocol.equals(other.memcachedProtocol)) {
        return false;
 -    if (modifiable != other.modifiable)
 +    }
 +    if (modifiable != other.modifiable) {
        return false;
 +    }
      if (name == null) {
 -      if (other.name != null)
 +      if (other.name != null) {
          return false;
 -    } else if (!name.equals(other.name))
 +      }
 +    } else if (!name.equals(other.name)) {
        return false;
 +    }
      if (props == null) {
 -      if (other.props != null)
 +      if (other.props != null) {
          return false;
 -    } else if (!props.equals(other.props))
 +      }
 +    } else if (!props.equals(other.props)) {
        return false;
 +    }
      if (redundancyZone == null) {
 -      if (other.redundancyZone != null)
 +      if (other.redundancyZone != null) {
          return false;
 -    } else if (!redundancyZone.equals(other.redundancyZone))
 +      }
 +    } else if (!redundancyZone.equals(other.redundancyZone)) {
        return false;
 +    }
      if (remoteLocators == null) {
 -      if (other.remoteLocators != null)
 +      if (other.remoteLocators != null) {
          return false;
 -    } else if (!remoteLocators.equals(other.remoteLocators))
 +      }
 +    } else if (!remoteLocators.equals(other.remoteLocators)) {
        return false;
 -    if (removeUnresponsiveClient != other.removeUnresponsiveClient)
 +    }
 +    if (removeUnresponsiveClient != other.removeUnresponsiveClient) {
        return false;
 +    }
      if (roles == null) {
 -      if (other.roles != null)
 +      if (other.roles != null) {
          return false;
 -    } else if (!roles.equals(other.roles))
 +      }
 +    } else if (!roles.equals(other.roles)) {
        return false;
 +    }
      if (security == null) {
 -      if (other.security != null)
 +      if (other.security != null) {
          return false;
 -    } else if (!security.equals(other.security))
 +      }
 +    } else if (!security.equals(other.security)) {
        return false;
 +    }
      if (securityClientAccessor == null) {
 -      if (other.securityClientAccessor != null)
 +      if (other.securityClientAccessor != null) {
          return false;
 -    } else if (!securityClientAccessor.equals(other.securityClientAccessor))
 +      }
 +    } else if (!securityClientAccessor.equals(other.securityClientAccessor)) {
        return false;
 +    }
      if (securityClientAccessorPP == null) {
 -      if (other.securityClientAccessorPP != null)
 +      if (other.securityClientAccessorPP != null) {
          return false;
 -    } else if (!securityClientAccessorPP.equals(other.securityClientAccessorPP))
 +      }
 +    } else if (!securityClientAccessorPP.equals(other.securityClientAccessorPP)) {
        return false;
 +    }
      if (securityClientAuthInit == null) {
 -      if (other.securityClientAuthInit != null)
 +      if (other.securityClientAuthInit != null) {
          return false;
 -    } else if (!securityClientAuthInit.equals(other.securityClientAuthInit))
 +      }
 +    } else if (!securityClientAuthInit.equals(other.securityClientAuthInit)) {
        return false;
 +    }
      if (securityClientAuthenticator == null) {
 -      if (other.securityClientAuthenticator != null)
 +      if (other.securityClientAuthenticator != null) {
          return false;
 -    } else if (!securityClientAuthenticator
 -        .equals(other.securityClientAuthenticator))
 -      return false;
 -    if (securityManager == null) {
 -      if (other.securityManager != null)
 +      }
 +    } else if (!securityClientAuthenticator.equals(other.securityClientAuthenticator)) {
 +      if (securityManager == null) {
 +        if (other.securityManager != null) {
 +          return false;
 +        }
 +      } else if (!securityManager.equals(other.securityManager)) {
          return false;
 -    } else if (!securityManager
 -      .equals(other.securityManager))
 -      return false;
 -    if (postProcessor == null) {
 -      if (other.postProcessor != null)
 +      }
 +      if (postProcessor == null) {
 +        if (other.postProcessor != null) {
 +          return false;
 +        }
 +      } else if (!postProcessor.equals(other.postProcessor)) {
          return false;
 -    } else if (!postProcessor
 -      .equals(other.postProcessor))
 -      return false;
 -    if (shiroInit == null) {
 -      if (other.shiroInit != null)
 +      }
 +      if (shiroInit == null) {
 +        if (other.shiroInit != null) {
 +          return false;
 +        }
 +      } else if (!shiroInit.equals(other.shiroInit)) {
          return false;
 -    } else if (!shiroInit
 -      .equals(other.shiroInit))
 -      return false;
 +      }
 +    }
      if (securityClientDHAlgo == null) {
 -      if (other.securityClientDHAlgo != null)
 +      if (other.securityClientDHAlgo != null) {
          return false;
 -    } else if (!securityClientDHAlgo.equals(other.securityClientDHAlgo))
 +      }
 +    } else if (!securityClientDHAlgo.equals(other.securityClientDHAlgo)) {
        return false;
 +    }
      if (securityLogFile == null) {
 -      if (other.securityLogFile != null)
 +      if (other.securityLogFile != null) {
          return false;
 -    } else if (!securityLogFile.equals(other.securityLogFile))
 +      }
 +    } else if (!securityLogFile.equals(other.securityLogFile)) {
        return false;
 -    if (securityLogLevel != other.securityLogLevel)
 +    }
 +    if (securityLogLevel != other.securityLogLevel) {
        return false;
 +    }
      if (securityPeerAuthInit == null) {
 -      if (other.securityPeerAuthInit != null)
 +      if (other.securityPeerAuthInit != null) {
          return false;
 -    } else if (!securityPeerAuthInit.equals(other.securityPeerAuthInit))
 +      }
 +    } else if (!securityPeerAuthInit.equals(other.securityPeerAuthInit)) {
        return false;
 +    }
      if (securityPeerAuthenticator == null) {
 -      if (other.securityPeerAuthenticator != null)
 +      if (other.securityPeerAuthenticator != null) {
          return false;
 -    } else if (!securityPeerAuthenticator
 -        .equals(other.securityPeerAuthenticator))
 +      }
 +    } else if (!securityPeerAuthenticator.equals(other.securityPeerAuthenticator)) {
        return false;
 -    if (securityPeerMembershipTimeout != other.securityPeerMembershipTimeout)
 +    }
 +    if (securityPeerMembershipTimeout != other.securityPeerMembershipTimeout) {
        return false;
 +    }
      if (serverBindAddress == null) {
 -      if (other.serverBindAddress != null)
 +      if (other.serverBindAddress != null) {
          return false;
 -    } else if (!serverBindAddress.equals(other.serverBindAddress))
 +      }
 +    } else if (!serverBindAddress.equals(other.serverBindAddress)) {
        return false;
 -    if (serverSSLEnabled != other.serverSSLEnabled)
 +    }
 +    if (serverSSLEnabled != other.serverSSLEnabled) {
        return false;
 +    }
      if (serverSSLKeyStore == null) {
 -      if (other.serverSSLKeyStore != null)
 +      if (other.serverSSLKeyStore != null) {
          return false;
 -    } else if (!serverSSLKeyStore.equals(other.serverSSLKeyStore))
 +      }
 +    } else if (!serverSSLKeyStore.equals(other.serverSSLKeyStore)) {
        return false;
 +    }
      if (serverSSLKeyStorePassword == null) {
 -      if (other.serverSSLKeyStorePassword != null)
 +      if (other.serverSSLKeyStorePassword != null) {
          return false;
 -    } else if (!serverSSLKeyStorePassword
 -        .equals(other.serverSSLKeyStorePassword))
 +      }
 +    } else if (!serverSSLKeyStorePassword.equals(other.serverSSLKeyStorePassword)) {
        return false;
 +    }
      if (serverSSLKeyStoreType == null) {
 -      if (other.serverSSLKeyStoreType != null)
 +      if (other.serverSSLKeyStoreType != null) {
          return false;
 -    } else if (!serverSSLKeyStoreType.equals(other.serverSSLKeyStoreType))
 +      }
 +    } else if (!serverSSLKeyStoreType.equals(other.serverSSLKeyStoreType)) {
        return false;
 +    }
      if (serverSSLTrustStore == null) {
 -      if (other.serverSSLTrustStore != null)
 +      if (other.serverSSLTrustStore != null) {
          return false;
 -    } else if (!serverSSLTrustStore.equals(other.serverSSLTrustStore))
 +      }
 +    } else if (!serverSSLTrustStore.equals(other.serverSSLTrustStore)) {
        return false;
 +    }
      if (serverSSLTrustStorePassword == null) {
 -      if (other.serverSSLTrustStorePassword != null)
 +      if (other.serverSSLTrustStorePassword != null) {
          return false;
 -    } else if (!serverSSLTrustStorePassword
 -        .equals(other.serverSSLTrustStorePassword))
 +      }
 +    } else if (!serverSSLTrustStorePassword.equals(other.serverSSLTrustStorePassword)) {
        return false;
 +    }
      if (serverSslCiphers == null) {
 -      if (other.serverSslCiphers != null)
 +      if (other.serverSslCiphers != null) {
          return false;
 -    } else if (!serverSslCiphers.equals(other.serverSslCiphers))
 +      }
 +    } else if (!serverSslCiphers.equals(other.serverSslCiphers)) {
        return false;
 +    }
      if (serverSslProperties == null) {
 -      if (other.serverSslProperties != null)
 +      if (other.serverSslProperties != null) {
          return false;
 -    } else if (!serverSslProperties.equals(other.serverSslProperties))
 +      }
 +    } else if (!serverSslProperties.equals(other.serverSslProperties)) {
        return false;
 +    }
      if (serverSslProtocols == null) {
 -      if (other.serverSslProtocols != null)
 +      if (other.serverSslProtocols != null) {
          return false;
 -    } else if (!serverSslProtocols.equals(other.serverSslProtocols))
 +      }
 +    } else if (!serverSslProtocols.equals(other.serverSslProtocols)) {
        return false;
 -    if (serverSslRequireAuthentication != other.serverSslRequireAuthentication)
 +    }
 +    if (serverSslRequireAuthentication != other.serverSslRequireAuthentication) {
        return false;
 -    if (socketBufferSize != other.socketBufferSize)
 +    }
 +    if (socketBufferSize != other.socketBufferSize) {
        return false;
 -    if (socketLeaseTime != other.socketLeaseTime)
 +    }
 +    if (socketLeaseTime != other.socketLeaseTime) {
        return false;
 +    }
      if (sourceMap == null) {
 -      if (other.sourceMap != null)
 +      if (other.sourceMap != null) {
          return false;
 -    } else if (!sourceMap.equals(other.sourceMap))
 +      }
 +    } else if (!sourceMap.equals(other.sourceMap)) {
        return false;
 -    if (sslCiphers == null) {
 -      if (other.sslCiphers != null)
 +    }
 +    if (sslProperties == null) {
 +      if (other.sslProperties != null) {
          return false;
 -    } else if (!sslCiphers.equals(other.sslCiphers))
 +      }
 +    } else if (!sslProperties.equals(other.sslProperties)) {
        return false;
 -    if (sslEnabled != other.sslEnabled)
 +    }
 +    if (startDevRestApi != other.startDevRestApi) {
        return false;
 -    if (sslProperties == null) {
 -      if (other.sslProperties != null)
 +    }
 +    if (startLocator == null) {
 +      if (other.startLocator != null) {
          return false;
 -    } else if (!sslProperties.equals(other.sslProperties))
 +      }
 +    } else if (!startLocator.equals(other.startLocator)) {
        return false;
+     if (sslProtocols == null) {
+       if (other.sslProtocols != null)
+         return false;
+     } else if (!sslProtocols.equals(other.sslProtocols))
+       return false;
+     if (sslRequireAuthentication != other.sslRequireAuthentication)
+       return false;
+     if (startDevRestApi != other.startDevRestApi)
+       return false;
+     if (startLocator == null) {
+       if (other.startLocator != null)
+         return false;
+     } else if (!startLocator.equals(other.startLocator))
+       return false;
+     if (startLocatorPort != other.startLocatorPort)
+       return false;
+     if (statisticArchiveFile == null) {
+       if (other.statisticArchiveFile != null)
+         return false;
+     } else if (!statisticArchiveFile.equals(other.statisticArchiveFile))
+       return false;
+     if (statisticSampleRate != other.statisticSampleRate)
+       return false;
+     if (statisticSamplingEnabled != other.statisticSamplingEnabled)
+       return false;
+     if (tcpPort != other.tcpPort)
+       return false;
+     if (udpFragmentSize != other.udpFragmentSize)
+       return false;
+     if (udpRecvBufferSize != other.udpRecvBufferSize)
+       return false;
+     if (udpSendBufferSize != other.udpSendBufferSize)
+       return false;
+     if (useSharedConfiguration != other.useSharedConfiguration)
+       return false;
+     if (userCommandPackages == null) {
+       if (other.userCommandPackages != null)
+         return false;
+     } else if (!userCommandPackages.equals(other.userCommandPackages))
+       return false;
+     if (userDefinedProps == null) {
+       if (other.userDefinedProps != null)
+         return false;
+     } else if (!userDefinedProps.equals(other.userDefinedProps))
+       return false;
+     if (!StringUtils.equals(securityEnabledComponents, other.securityEnabledComponents)) {
+       return false;
+     }
 +    }
 +    if (startLocatorPort != other.startLocatorPort) {
 +      return false;
 +    }
 +    if (statisticArchiveFile == null) {
 +      if (other.statisticArchiveFile != null) {
 +        return false;
 +      }
 +    } else if (!statisticArchiveFile.equals(other.statisticArchiveFile)) {
 +      return false;
 +    }
 +    if (statisticSampleRate != other.statisticSampleRate) {
 +      return false;
 +    }
 +    if (statisticSamplingEnabled != other.statisticSamplingEnabled) {
 +      return false;
 +    }
 +    if (tcpPort != other.tcpPort) {
 +      return false;
 +    }
 +    if (udpFragmentSize != other.udpFragmentSize) {
 +      return false;
 +    }
 +    if (udpRecvBufferSize != other.udpRecvBufferSize) {
 +      return false;
 +    }
 +    if (udpSendBufferSize != other.udpSendBufferSize) {
 +      return false;
 +    }
 +    if (useSharedConfiguration != other.useSharedConfiguration) {
 +      return false;
 +    }
 +    if (userCommandPackages == null) {
 +      if (other.userCommandPackages != null) {
 +        return false;
 +      }
 +    } else if (!userCommandPackages.equals(other.userCommandPackages)) {
 +      return false;
 +    }
 +    if (userDefinedProps == null) {
 +      if (other.userDefinedProps != null) {
 +        return false;
 +      }
 +    } else if (!userDefinedProps.equals(other.userDefinedProps)) {
 +      return false;
 +    }
 +    if (clusterSSLAlias != other.clusterSSLAlias) {
 +      return false;
 +    }
 +    if (serverSSLAlias != other.serverSSLAlias) {
 +      return false;
 +    }
 +    if (httpServiceSSLAlias != other.httpServiceSSLAlias) {
 +      return false;
 +    }
 +    if (jmxManagerSSLAlias != other.jmxManagerSSLAlias) {
 +      return false;
 +    }
 +    if (gatewaySSLAlias != other.gatewaySSLAlias) {
 +      return false;
 +    }
 +    if (sslEnabledComponents != other.sslEnabledComponents) {
 +      return false;
 +    }
      return true;
    }
  
@@@ -3517,17 -3141,14 +3582,22 @@@
      result = prime * result + udpRecvBufferSize;
      result = prime * result + udpSendBufferSize;
      result = prime * result + (useSharedConfiguration ? 1231 : 1237);
+     result = prime * result
+         + ((userCommandPackages == null) ? 0 : userCommandPackages.hashCode());
+     result = prime * result
+         + ((userDefinedProps == null) ? 0 : userDefinedProps.hashCode());
+     result = prime * result + ((securityEnabledComponents == null) ? 0 : securityEnabledComponents.hashCode());
 +    result = prime * result + ((userCommandPackages == null) ? 0 : userCommandPackages.hashCode());
 +    result = prime * result + ((userDefinedProps == null) ? 0 : userDefinedProps.hashCode());
 +    result = prime * result + ((clusterSSLAlias == null) ? 0 : clusterSSLAlias.hashCode());
 +    result = prime * result + ((serverSSLAlias == null) ? 0 : serverSSLAlias.hashCode());
 +    result = prime * result + ((jmxManagerSSLAlias == null) ? 0 : jmxManagerSSLAlias.hashCode());
 +    result = prime * result + ((gatewaySSLAlias == null) ? 0 : gatewaySSLAlias.hashCode());
 +    result = prime * result + ((httpServiceSSLAlias == null) ? 0 : httpServiceSSLAlias.hashCode());
 +    result = prime * result + ((sslEnabledComponents == null) ? 0 : sslEnabledComponents.hashCode());
      return result;
    }
 -  
 +
    /**
     * Used by gemfire build.xml to generate a default gemfire.properties
     * for use by applications. See bug 30995 for the feature request.

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/dfbc88b2/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionManager.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/dfbc88b2/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/InternalDistributedSystem.java
----------------------------------------------------------------------
diff --cc geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/InternalDistributedSystem.java
index 1d0081e,49a4c97..79de8f1
--- a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/InternalDistributedSystem.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/InternalDistributedSystem.java
@@@ -101,10 -53,16 +101,18 @@@ import com.gemstone.gemfire.internal.lo
  import com.gemstone.gemfire.internal.logging.log4j.LocalizedMessage;
  import com.gemstone.gemfire.internal.logging.log4j.LogWriterAppender;
  import com.gemstone.gemfire.internal.logging.log4j.LogWriterAppenders;
 +import com.gemstone.gemfire.internal.net.SSLConfigurationFactory;
 +import com.gemstone.gemfire.internal.net.SocketCreatorFactory;
  import com.gemstone.gemfire.internal.offheap.MemoryAllocator;
  import com.gemstone.gemfire.internal.offheap.OffHeapStorage;
+ import com.gemstone.gemfire.internal.statistics.DummyStatisticsImpl;
+ import com.gemstone.gemfire.internal.statistics.GemFireStatSampler;
+ import com.gemstone.gemfire.internal.statistics.platform.LinuxProcFsStatistics;
+ import com.gemstone.gemfire.internal.statistics.LocalStatisticsImpl;
+ import com.gemstone.gemfire.internal.statistics.platform.OsStatisticsFactory;
+ import com.gemstone.gemfire.internal.statistics.StatisticsImpl;
+ import com.gemstone.gemfire.internal.statistics.StatisticsManager;
+ import com.gemstone.gemfire.internal.statistics.StatisticsTypeFactoryImpl;
  import com.gemstone.gemfire.internal.tcp.ConnectionTable;
  import com.gemstone.gemfire.internal.util.concurrent.StoppableCondition;
  import com.gemstone.gemfire.internal.util.concurrent.StoppableReentrantLock;
@@@ -1128,9 -1110,9 +1136,8 @@@ public class InternalDistributedSystem 
        // Run the shutdown, if any
        if (sdListener != null) {
          try {
-           // TODO: should we make sure this times out?
            sdListener.onShutdown(this);
 -        }
 -        catch (VirtualMachineError err) {
 +        } catch (VirtualMachineError err) {
            SystemFailure.initiateFailure(err);
            // If this ever returns, rethrow the error.  We're poisoned
            // now, so don't let this thread continue.

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/dfbc88b2/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/InternalLocator.java
----------------------------------------------------------------------
diff --cc geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/InternalLocator.java
index d96d0ce,46d9610..f1eb629
mode 100755,100644..100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/InternalLocator.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/InternalLocator.java
@@@ -159,34 -135,26 +159,32 @@@ public class InternalLocator extends Lo
     * being colocated in a normal member this field will be null.
     */
    private Cache myCache;
 -  
 -  /** locator state file */
 +
 +  /**
 +   * locator state file
 +   */
    private File stateFile;
 -  
 -  /** product use logging */
 +
 +  /**
 +   * product use logging
 +   */
    private ProductUseLog productUseLog;
 -  
 +
    private boolean peerLocator;
 -  
 +
    private ServerLocator serverLocator;
 -  
 +
    protected volatile LocatorStats stats;
  
-   //TODO - these to properties are a waste of memory once
-   //the system is started.
    private Properties env;
 -  
 -  /** the TcpHandler used for peer location */
 +
 +  /**
 +   * the TcpHandler used for peer location
 +   */
    private NetLocator locatorImpl;
 -  
 +
    private DistributionConfigImpl config;
 -  
 +
    private LocatorMembershipListener locatorListener;
  
    private WanLocatorDiscoverer locatorDiscoverer;
@@@ -684,9 -708,7 +682,7 @@@
     */
    public void startDistributedSystem() throws UnknownHostException {
      InternalDistributedSystem existing = InternalDistributedSystem.getConnectedInstance();
 -    
 +
-     //TODO : For now set this property to create a PDX registry that does nothing
-     // Investigate keeping the typeRegistry in the locators
      if (existing != null) {
        // LOG: changed from config to info
        logger.info(LocalizedMessage.create(LocalizedStrings.InternalLocator_USING_EXISTING_DISTRIBUTED_SYSTEM__0, existing));



[30/50] [abbrv] incubator-geode git commit: GEODE-420: Updating imports for GemFireVersion.java

Posted by ud...@apache.org.
GEODE-420: Updating imports for GemFireVersion.java


Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/5d0cd430
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/5d0cd430
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/5d0cd430

Branch: refs/heads/develop
Commit: 5d0cd43044fc28f48760a9dbfe75ff85b50670a7
Parents: 507b83f
Author: Udo Kohlmeyer <uk...@pivotal.io>
Authored: Tue Aug 30 12:48:16 2016 +1000
Committer: Udo Kohlmeyer <uk...@pivotal.io>
Committed: Tue Aug 30 12:48:16 2016 +1000

----------------------------------------------------------------------
 .../src/main/java/com/gemstone/gemfire/internal/GemFireVersion.java | 1 +
 1 file changed, 1 insertion(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/5d0cd430/geode-core/src/main/java/com/gemstone/gemfire/internal/GemFireVersion.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/GemFireVersion.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/GemFireVersion.java
index 9bd3d4f..d84bc5a 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/GemFireVersion.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/GemFireVersion.java
@@ -29,6 +29,7 @@ import java.util.StringTokenizer;
 import com.gemstone.gemfire.InternalGemFireError;
 import com.gemstone.gemfire.SystemFailure;
 import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
+import com.gemstone.gemfire.internal.net.SocketCreator;
 
 /**
  * This class provides build and version information about GemFire.


[45/50] [abbrv] incubator-geode git commit: GEODE-420: Renaming of SecurableComponents to SecurableCommunicationChannel Renaming of HTTP_SERVICE -> WEB

Posted by ud...@apache.org.
GEODE-420: Renaming of SecurableComponents to SecurableCommunicationChannel
Renaming of HTTP_SERVICE -> WEB


Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/8ff5e7a4
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/8ff5e7a4
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/8ff5e7a4

Branch: refs/heads/develop
Commit: 8ff5e7a4cb1069b40863f9408986c0a37de4659b
Parents: 3edfdf2
Author: Udo Kohlmeyer <uk...@pivotal.io>
Authored: Tue Sep 13 05:25:43 2016 +1000
Committer: Udo Kohlmeyer <uk...@pivotal.io>
Committed: Tue Sep 13 05:25:43 2016 +1000

----------------------------------------------------------------------
 .../client/internal/ConnectionFactoryImpl.java  |   5 +-
 .../internal/DistributionConfig.java            |   7 +-
 .../internal/DistributionConfigImpl.java        |  29 ++--
 .../membership/gms/fd/GMSHealthMonitor.java     |   5 +-
 .../internal/tcpserver/TcpClient.java           |   5 +-
 .../internal/tcpserver/TcpServer.java           |   3 +-
 .../gemfire/internal/admin/SSLConfig.java       |  13 +-
 .../cache/tier/sockets/AcceptorImpl.java        |   5 +-
 .../internal/net/SSLConfigurationFactory.java   |  29 ++--
 .../gemfire/internal/net/SocketCreator.java     |   2 +-
 .../internal/net/SocketCreatorFactory.java      |  24 ++-
 .../security/SecurableCommunicationChannel.java |  56 +++++++
 .../gemfire/internal/tcp/TCPConduit.java        |   3 +-
 .../gemfire/management/GemFireProperties.java   |  11 +-
 .../management/internal/JettyHelper.java        |   4 +-
 .../management/internal/ManagementAgent.java    |   6 +-
 .../gemfire/management/internal/RestAgent.java  |   4 +-
 .../internal/beans/BeanUtilFuncs.java           |   2 +-
 .../SecurableCommunicationChannels.java         |  62 ++++++++
 .../LocatorLauncherLocalIntegrationTest.java    |   6 +-
 .../ServerLauncherLocalIntegrationTest.java     |   6 +-
 .../internal/net/JSSESocketJUnitTest.java       |  14 +-
 .../net/SSLConfigurationFactoryTest.java        |  50 +++---
 .../net/SocketCreatorFactoryJUnitTest.java      | 158 +++++++++----------
 .../internal/JettyHelperJUnitTest.java          |   6 +-
 .../tools/pulse/testbed/driver/PulseUITest.java |   4 +-
 .../tools/pulse/tests/PulseAbstractTest.java    |   4 +-
 27 files changed, 325 insertions(+), 198 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8ff5e7a4/geode-core/src/main/java/com/gemstone/gemfire/cache/client/internal/ConnectionFactoryImpl.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/cache/client/internal/ConnectionFactoryImpl.java b/geode-core/src/main/java/com/gemstone/gemfire/cache/client/internal/ConnectionFactoryImpl.java
index 70ec538..a72b49e 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/cache/client/internal/ConnectionFactoryImpl.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/cache/client/internal/ConnectionFactoryImpl.java
@@ -33,6 +33,7 @@ import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
 import com.gemstone.gemfire.internal.logging.LogService;
 import com.gemstone.gemfire.internal.logging.log4j.LocalizedMessage;
 import com.gemstone.gemfire.internal.net.SocketCreatorFactory;
+import com.gemstone.gemfire.internal.security.SecurableCommunicationChannel;
 import com.gemstone.gemfire.internal.security.SecurableComponent;
 import com.gemstone.gemfire.security.GemFireSecurityException;
 import org.apache.logging.log4j.Logger;
@@ -96,13 +97,13 @@ public class ConnectionFactoryImpl implements ConnectionFactory {
     this.cancelCriterion = cancelCriterion;
     this.pool = pool;
     if (this.usedByGateway || (this.gatewaySender != null)) {
-      this.socketCreator = SocketCreatorFactory.getSocketCreatorForComponent(SecurableComponent.GATEWAY);
+      this.socketCreator = SocketCreatorFactory.getSocketCreatorForComponent(SecurableCommunicationChannel.GATEWAY);
       if (sender!= null && !sender.getGatewayTransportFilters().isEmpty()) {
         this.socketCreator.initializeTransportFilterClientSocketFactory(sender);
       }
     } else {
       //If configured use SSL properties for cache-server
-      this.socketCreator = SocketCreatorFactory.getSocketCreatorForComponent(SecurableComponent.SERVER);
+      this.socketCreator = SocketCreatorFactory.getSocketCreatorForComponent(SecurableCommunicationChannel.SERVER);
     }
   }
   

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8ff5e7a4/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionConfig.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionConfig.java b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionConfig.java
index 628231b..2a14bf7 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionConfig.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionConfig.java
@@ -36,6 +36,7 @@ import com.gemstone.gemfire.internal.Config;
 import com.gemstone.gemfire.internal.ConfigSource;
 import com.gemstone.gemfire.internal.logging.InternalLogWriter;
 import com.gemstone.gemfire.internal.logging.LogConfig;
+import com.gemstone.gemfire.internal.security.SecurableCommunicationChannel;
 import com.gemstone.gemfire.internal.security.SecurableComponent;
 import com.gemstone.gemfire.internal.tcp.Connection;
 import com.gemstone.gemfire.memcached.GemFireMemcachedServer;
@@ -4367,7 +4368,7 @@ public interface DistributionConfig extends Config, LogConfig {
    * @since Geode 1.0
    */
   @ConfigAttributeGetter(name = SSL_ENABLED_COMPONENTS)
-  SecurableComponent[] getSSLEnabledComponents();
+  SecurableCommunicationChannel[] getSecurableCommunicationChannels();
 
   /**
    * Sets the value of the {@link ConfigurationProperties#SSL_ENABLED_COMPONENTS}
@@ -4375,7 +4376,7 @@ public interface DistributionConfig extends Config, LogConfig {
    * @since Geode 1.0
    */
   @ConfigAttributeSetter(name = SSL_ENABLED_COMPONENTS)
-  void setSSLEnabledComponents(SecurableComponent[] sslEnabledComponents);
+  void setSecurableCommunicationChannels(SecurableCommunicationChannel[] sslEnabledComponents);
 
   /**
    * The name of the {@link ConfigurationProperties#SSL_ENABLED_COMPONENTS} property
@@ -4388,7 +4389,7 @@ public interface DistributionConfig extends Config, LogConfig {
    * The default ssl enabled components
    * @since Geode 1.0
    */
-  SecurableComponent[] DEFAULT_SSL_ENABLED_COMPONENTS = new SecurableComponent[] {};
+  SecurableCommunicationChannel[] DEFAULT_SSL_ENABLED_COMPONENTS = new SecurableCommunicationChannel[] {};
 
   /**
    * Returns the value of the {@link ConfigurationProperties#SSL_PROTOCOLS}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8ff5e7a4/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionConfigImpl.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionConfigImpl.java b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionConfigImpl.java
index 7b6b40d..35e8a9d 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionConfigImpl.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionConfigImpl.java
@@ -49,6 +49,7 @@ import com.gemstone.gemfire.internal.ConfigSource;
 import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
 import com.gemstone.gemfire.internal.net.SocketCreator;
 import com.gemstone.gemfire.internal.process.ProcessLauncherContext;
+import com.gemstone.gemfire.internal.security.SecurableCommunicationChannel;
 import com.gemstone.gemfire.internal.security.SecurableComponent;
 import com.gemstone.gemfire.memcached.GemFireMemcachedServer;
 
@@ -553,7 +554,7 @@ public class DistributionConfigImpl extends AbstractDistributionConfig implement
 
   private String httpServiceSSLAlias = DEFAULT_SSL_ALIAS;
 
-  private SecurableComponent[] sslEnabledComponents = DEFAULT_SSL_ENABLED_COMPONENTS;
+  private SecurableCommunicationChannel[] securableCommunicationChannels = DEFAULT_SSL_ENABLED_COMPONENTS;
 
   private String sslProtocols = DEFAULT_SSL_PROTOCOLS;
   private String sslCiphers = DEFAULT_SSL_CIPHERS;
@@ -774,7 +775,7 @@ public class DistributionConfigImpl extends AbstractDistributionConfig implement
     this.serverSSLAlias = other.getServerSSLAlias();
     this.locatorSSLAlias = other.getLocatorSSLAlias();
 
-    this.sslEnabledComponents = ((DistributionConfigImpl) other).sslEnabledComponents;
+    this.securableCommunicationChannels = ((DistributionConfigImpl) other).securableCommunicationChannels;
 
     this.sslCiphers = other.getSSLCiphers();
     this.sslProtocols = other.getSSLProtocols();
@@ -984,22 +985,22 @@ public class DistributionConfigImpl extends AbstractDistributionConfig implement
         }
       }
       case CLUSTER: {
-        return StringUtils.isEmpty(getClusterSSLAlias()) ? true : (getSSLEnabledComponents().length > 1 ? !StringUtils.isEmpty(getSSLDefaultAlias()) : true);
+        return StringUtils.isEmpty(getClusterSSLAlias()) ? true : (getSecurableCommunicationChannels().length > 1 ? !StringUtils.isEmpty(getSSLDefaultAlias()) : true);
       }
       case GATEWAY: {
-        return StringUtils.isEmpty(getGatewaySSLAlias()) ? true : (getSSLEnabledComponents().length > 1 ? !StringUtils.isEmpty(getSSLDefaultAlias()) : true);
+        return StringUtils.isEmpty(getGatewaySSLAlias()) ? true : (getSecurableCommunicationChannels().length > 1 ? !StringUtils.isEmpty(getSSLDefaultAlias()) : true);
       }
       case HTTP_SERVICE: {
-        return StringUtils.isEmpty(getHTTPServiceSSLAlias()) ? true : (getSSLEnabledComponents().length > 1 ? !StringUtils.isEmpty(getSSLDefaultAlias()) : true);
+        return StringUtils.isEmpty(getHTTPServiceSSLAlias()) ? true : (getSecurableCommunicationChannels().length > 1 ? !StringUtils.isEmpty(getSSLDefaultAlias()) : true);
       }
       case JMX: {
-        return StringUtils.isEmpty(getJMXSSLAlias()) ? true : (getSSLEnabledComponents().length > 1 ? !StringUtils.isEmpty(getSSLDefaultAlias()) : true);
+        return StringUtils.isEmpty(getJMXSSLAlias()) ? true : (getSecurableCommunicationChannels().length > 1 ? !StringUtils.isEmpty(getSSLDefaultAlias()) : true);
       }
       case LOCATOR: {
-        return StringUtils.isEmpty(getLocatorSSLAlias()) ? true : (getSSLEnabledComponents().length > 1 ? !StringUtils.isEmpty(getSSLDefaultAlias()) : true);
+        return StringUtils.isEmpty(getLocatorSSLAlias()) ? true : (getSecurableCommunicationChannels().length > 1 ? !StringUtils.isEmpty(getSSLDefaultAlias()) : true);
       }
       case SERVER: {
-        return StringUtils.isEmpty(getServerSSLAlias()) ? true : (getSSLEnabledComponents().length > 1 ? !StringUtils.isEmpty(getSSLDefaultAlias()) : true);
+        return StringUtils.isEmpty(getServerSSLAlias()) ? true : (getSecurableCommunicationChannels().length > 1 ? !StringUtils.isEmpty(getSSLDefaultAlias()) : true);
       }
       default:
         return false;
@@ -2583,13 +2584,13 @@ public class DistributionConfigImpl extends AbstractDistributionConfig implement
   }
 
   @Override
-  public SecurableComponent[] getSSLEnabledComponents() {
-    return sslEnabledComponents;
+  public SecurableCommunicationChannel[] getSecurableCommunicationChannels() {
+    return securableCommunicationChannels;
   }
 
   @Override
-  public void setSSLEnabledComponents(final SecurableComponent[] sslEnabledComponents) {
-    this.sslEnabledComponents = sslEnabledComponents;
+  public void setSecurableCommunicationChannels(final SecurableCommunicationChannel[] sslEnabledComponents) {
+    this.securableCommunicationChannels = sslEnabledComponents;
   }
 
   @Override
@@ -2867,7 +2868,7 @@ public class DistributionConfigImpl extends AbstractDistributionConfig implement
                               .append(httpServiceSSLTrustStore, that.httpServiceSSLTrustStore)
                               .append(httpServiceSSLTrustStorePassword, that.httpServiceSSLTrustStorePassword)
                               .append(httpServiceSSLAlias, that.httpServiceSSLAlias)
-                              .append(sslEnabledComponents, that.sslEnabledComponents)
+                              .append(securableCommunicationChannels, that.securableCommunicationChannels)
                               .append(sslProtocols, that.sslProtocols)
                               .append(sslCiphers, that.sslCiphers)
                               .append(sslKeyStore, that.sslKeyStore)
@@ -3041,7 +3042,7 @@ public class DistributionConfigImpl extends AbstractDistributionConfig implement
                                       .append(httpServiceSSLTrustStore)
                                       .append(httpServiceSSLTrustStorePassword)
                                       .append(httpServiceSSLAlias)
-                                      .append(sslEnabledComponents)
+                                      .append(securableCommunicationChannels)
                                       .append(sslProtocols)
                                       .append(sslCiphers)
                                       .append(sslRequireAuthentication)

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8ff5e7a4/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/fd/GMSHealthMonitor.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/fd/GMSHealthMonitor.java b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/fd/GMSHealthMonitor.java
index fd94153..b8cdbe9 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/fd/GMSHealthMonitor.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/fd/GMSHealthMonitor.java
@@ -65,6 +65,7 @@ import com.gemstone.gemfire.distributed.internal.membership.gms.messages.Suspect
 import com.gemstone.gemfire.internal.ConnectionWatcher;
 import com.gemstone.gemfire.internal.Version;
 import com.gemstone.gemfire.internal.net.SocketCreatorFactory;
+import com.gemstone.gemfire.internal.security.SecurableCommunicationChannel;
 import com.gemstone.gemfire.internal.security.SecurableComponent;
 
 /**
@@ -489,7 +490,7 @@ public class GMSHealthMonitor implements HealthMonitor, MessageHandler {
     InternalDistributedSystem internalDistributedSystem = InternalDistributedSystem.getConnectedInstance();
     try {
       logger.debug("Checking member {} with TCP socket connection {}:{}.", suspectMember, suspectMember.getInetAddress(), port);
-      clientSocket = SocketCreatorFactory.getSocketCreatorForComponent(SecurableComponent.CLUSTER).connect(suspectMember.getInetAddress(), port,
+      clientSocket = SocketCreatorFactory.getSocketCreatorForComponent(SecurableCommunicationChannel.CLUSTER).connect(suspectMember.getInetAddress(), port,
           (int)memberTimeout, new ConnectTimeoutTask(services.getTimer(), memberTimeout), false, -1, false);
       clientSocket.setTcpNoDelay(true);
       return doTCPCheckMember(suspectMember, clientSocket);
@@ -635,7 +636,7 @@ public class GMSHealthMonitor implements HealthMonitor, MessageHandler {
   ServerSocket createServerSocket(InetAddress socketAddress, int[] portRange) {
     ServerSocket serverSocket;
     try {
-      serverSocket = SocketCreatorFactory.getSocketCreatorForComponent(SecurableComponent.CLUSTER).createServerSocketUsingPortRange(socketAddress, 50/*backlog*/,
+      serverSocket = SocketCreatorFactory.getSocketCreatorForComponent(SecurableCommunicationChannel.CLUSTER).createServerSocketUsingPortRange(socketAddress, 50/*backlog*/,
         true/*isBindAddress*/, false/*useNIO*/, 65536/*tcpBufferSize*/, portRange, false);
       socketPort = serverSocket.getLocalPort();
     } catch (IOException | SystemConnectException e) {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8ff5e7a4/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/tcpserver/TcpClient.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/tcpserver/TcpClient.java b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/tcpserver/TcpClient.java
index 9aaee9f..2bb1b7f 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/tcpserver/TcpClient.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/tcpserver/TcpClient.java
@@ -40,6 +40,7 @@ import com.gemstone.gemfire.internal.VersionedDataOutputStream;
 import com.gemstone.gemfire.internal.logging.LogService;
 import com.gemstone.gemfire.internal.net.SocketCreator;
 import com.gemstone.gemfire.internal.net.SocketCreatorFactory;
+import com.gemstone.gemfire.internal.security.SecurableCommunicationChannel;
 import com.gemstone.gemfire.internal.security.SecurableComponent;
 
 /**
@@ -58,7 +59,7 @@ public class TcpClient {
   private final SocketCreator socketCreator;
 
   public TcpClient(DistributionConfig distributionConfig) {
-    this(SocketCreatorFactory.setDistributionConfig(distributionConfig).getSocketCreatorForComponent(SecurableComponent.LOCATOR));
+    this(SocketCreatorFactory.setDistributionConfig(distributionConfig).getSocketCreatorForComponent(SecurableCommunicationChannel.LOCATOR));
   }
 
   /**
@@ -66,7 +67,7 @@ public class TcpClient {
    * SocketCreatorFactory should be initialized before invoking this method.
    */
   public TcpClient() {
-    this(SocketCreatorFactory.getSocketCreatorForComponent(SecurableComponent.LOCATOR));
+    this(SocketCreatorFactory.getSocketCreatorForComponent(SecurableCommunicationChannel.LOCATOR));
   }
 
   /**

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8ff5e7a4/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/tcpserver/TcpServer.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/tcpserver/TcpServer.java b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/tcpserver/TcpServer.java
index 29d1d35..05c209c 100755
--- a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/tcpserver/TcpServer.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/tcpserver/TcpServer.java
@@ -60,6 +60,7 @@ import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
 import com.gemstone.gemfire.internal.logging.LogService;
 import com.gemstone.gemfire.internal.net.SocketCreator;
 import com.gemstone.gemfire.internal.net.SocketCreatorFactory;
+import com.gemstone.gemfire.internal.security.SecurableCommunicationChannel;
 import com.gemstone.gemfire.internal.security.SecurableComponent;
 
 /**
@@ -167,7 +168,7 @@ public class TcpServer {
     }
 
     if (this.socketCreator == null) {
-      this.socketCreator = SocketCreatorFactory.getSocketCreatorForComponent(SecurableComponent.LOCATOR);
+      this.socketCreator = SocketCreatorFactory.getSocketCreatorForComponent(SecurableCommunicationChannel.LOCATOR);
     } else {
       throw new RuntimeException("The socket Creator already exists");
     }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8ff5e7a4/geode-core/src/main/java/com/gemstone/gemfire/internal/admin/SSLConfig.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/admin/SSLConfig.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/admin/SSLConfig.java
index 063ee05..9e5481e 100755
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/admin/SSLConfig.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/admin/SSLConfig.java
@@ -22,6 +22,7 @@ import java.util.Iterator;
 import java.util.Properties;
 
 import com.gemstone.gemfire.distributed.internal.DistributionConfig;
+import com.gemstone.gemfire.internal.security.SecurableCommunicationChannel;
 import com.gemstone.gemfire.internal.security.SecurableComponent;
 import com.gemstone.gemfire.management.internal.SSLUtil;
 
@@ -41,7 +42,7 @@ public class SSLConfig {
   private String truststorePassword = DistributionConfig.DEFAULT_SSL_TRUSTSTORE_PASSWORD;
   private String truststoreType = DistributionConfig.DEFAULT_CLUSTER_SSL_KEYSTORE_TYPE;
   private String alias = null;
-  private SecurableComponent sslEnabledComponent = null;
+  private SecurableCommunicationChannel securableCommunicationChannel = null;
 
   /**
    * SSL implementation-specific key-value pairs. Each key should be prefixed
@@ -163,17 +164,17 @@ public class SSLConfig {
     }
   }
 
-  public SecurableComponent getSecuredComponent() {
-    return sslEnabledComponent;
+  public SecurableCommunicationChannel getSecuredCommunicationChannel() {
+    return securableCommunicationChannel;
   }
 
-  public void setSslEnabledComponent(final SecurableComponent sslEnabledComponent) {
-    this.sslEnabledComponent = sslEnabledComponent;
+  public void setSecurableCommunicationChannel(final SecurableCommunicationChannel securableCommunicationChannel) {
+    this.securableCommunicationChannel = securableCommunicationChannel;
   }
 
   @Override
   public String toString() {
-    return "SSLConfig{" + "enabled=" + enabled + ", protocols='" + protocols + '\'' + ", ciphers='" + ciphers + '\'' + ", requireAuth=" + requireAuth + ", keystore='" + keystore + '\'' + ", keystoreType='" + keystoreType + '\'' + ", keystorePassword='" + keystorePassword + '\'' + ", truststore='" + truststore + '\'' + ", truststorePassword='" + truststorePassword + '\'' + ", truststoreType='" + truststoreType + '\'' + ", alias='" + alias + '\'' + ", sslEnabledComponent=" + sslEnabledComponent + ", properties=" + properties + '}';
+    return "SSLConfig{" + "enabled=" + enabled + ", protocols='" + protocols + '\'' + ", ciphers='" + ciphers + '\'' + ", requireAuth=" + requireAuth + ", keystore='" + keystore + '\'' + ", keystoreType='" + keystoreType + '\'' + ", keystorePassword='" + keystorePassword + '\'' + ", truststore='" + truststore + '\'' + ", truststorePassword='" + truststorePassword + '\'' + ", truststoreType='" + truststoreType + '\'' + ", alias='" + alias + '\'' + ", securableCommunicationChannel=" + securableCommunicationChannel + ", properties=" + properties + '}';
   }
 
   /**

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8ff5e7a4/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/AcceptorImpl.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/AcceptorImpl.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/AcceptorImpl.java
index 0ad87ed..611b9fb 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/AcceptorImpl.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/AcceptorImpl.java
@@ -86,6 +86,7 @@ import com.gemstone.gemfire.internal.logging.LogService;
 import com.gemstone.gemfire.internal.logging.LoggingThreadGroup;
 import com.gemstone.gemfire.internal.logging.log4j.LocalizedMessage;
 import com.gemstone.gemfire.internal.security.IntegratedSecurityService;
+import com.gemstone.gemfire.internal.security.SecurableCommunicationChannel;
 import com.gemstone.gemfire.internal.security.SecurableComponent;
 import com.gemstone.gemfire.internal.security.SecurityService;
 import com.gemstone.gemfire.internal.net.SocketCreatorFactory;
@@ -388,9 +389,9 @@ public class AcceptorImpl extends Acceptor implements Runnable
     {
       if(!isGatewayReceiver) {
         //If configured use SSL properties for cache-server
-        this.socketCreator = SocketCreatorFactory.getSocketCreatorForComponent(SecurableComponent.SERVER);
+        this.socketCreator = SocketCreatorFactory.getSocketCreatorForComponent(SecurableCommunicationChannel.SERVER);
       } else {
-        this.socketCreator = SocketCreatorFactory.getSocketCreatorForComponent(SecurableComponent.GATEWAY);
+        this.socketCreator = SocketCreatorFactory.getSocketCreatorForComponent(SecurableCommunicationChannel.GATEWAY);
       }
       
       final GemFireCacheImpl gc;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8ff5e7a4/geode-core/src/main/java/com/gemstone/gemfire/internal/net/SSLConfigurationFactory.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/net/SSLConfigurationFactory.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/net/SSLConfigurationFactory.java
index 1339f5a..03b1a47 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/net/SSLConfigurationFactory.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/net/SSLConfigurationFactory.java
@@ -27,13 +27,14 @@ import org.springframework.util.StringUtils;
 import com.gemstone.gemfire.GemFireConfigException;
 import com.gemstone.gemfire.distributed.internal.DistributionConfig;
 import com.gemstone.gemfire.internal.admin.SSLConfig;
+import com.gemstone.gemfire.internal.security.SecurableCommunicationChannel;
 import com.gemstone.gemfire.internal.security.SecurableComponent;
 
 public class SSLConfigurationFactory {
 
   private static SSLConfigurationFactory instance = new SSLConfigurationFactory();
   private DistributionConfig distributionConfig = null;
-  private Map<SecurableComponent, SSLConfig> registeredSSLConfig = new HashMap<>();
+  private Map<SecurableCommunicationChannel, SSLConfig> registeredSSLConfig = new HashMap<>();
 
   private SSLConfigurationFactory() {
   }
@@ -61,7 +62,7 @@ public class SSLConfigurationFactory {
     getInstance().distributionConfig = distributionConfig;
   }
 
-  public static SSLConfig getSSLConfigForComponent(SecurableComponent sslEnabledComponent) {
+  public static SSLConfig getSSLConfigForComponent(SecurableCommunicationChannel sslEnabledComponent) {
     SSLConfig sslConfig = getInstance().getRegisteredSSLConfigForComponent(sslEnabledComponent);
     if (sslConfig == null) {
       sslConfig = getInstance().createSSLConfigForComponent(sslEnabledComponent);
@@ -70,21 +71,21 @@ public class SSLConfigurationFactory {
     return sslConfig;
   }
 
-  private synchronized void registeredSSLConfigForComponent(final SecurableComponent sslEnabledComponent, final SSLConfig sslConfig) {
+  private synchronized void registeredSSLConfigForComponent(final SecurableCommunicationChannel sslEnabledComponent, final SSLConfig sslConfig) {
     registeredSSLConfig.put(sslEnabledComponent, sslConfig);
   }
 
-  private SSLConfig createSSLConfigForComponent(final SecurableComponent sslEnabledComponent) {
+  private SSLConfig createSSLConfigForComponent(final SecurableCommunicationChannel sslEnabledComponent) {
     SSLConfig sslConfig = createSSLConfig(sslEnabledComponent);
-    SecurableComponent[] sslEnabledComponents = getDistributionConfig().getSSLEnabledComponents();
+    SecurableCommunicationChannel[] sslEnabledComponents = getDistributionConfig().getSecurableCommunicationChannels();
     if (sslEnabledComponents.length == 0) {
       sslConfig = configureLegacyClusterSSL(sslConfig);
     }
-    sslConfig.setSslEnabledComponent(sslEnabledComponent);
+    sslConfig.setSecurableCommunicationChannel(sslEnabledComponent);
     switch (sslEnabledComponent) {
       case ALL: {
         //Create a SSLConfig separate for HTTP Service. As the require-authentication might differ
-        createSSLConfigForComponent(SecurableComponent.HTTP_SERVICE);
+        createSSLConfigForComponent(SecurableCommunicationChannel.WEB);
         break;
       }
       case CLUSTER: {
@@ -117,7 +118,7 @@ public class SSLConfigurationFactory {
         }
         break;
       }
-      case HTTP_SERVICE: {
+      case WEB: {
         if (sslEnabledComponents.length > 0) {
           sslConfig = setAliasForComponent(sslConfig, getDistributionConfig().getHTTPServiceSSLAlias());
           sslConfig.setRequireAuth(getDistributionConfig().getSSLHTTPRequireAuthentication());
@@ -146,7 +147,7 @@ public class SSLConfigurationFactory {
     return sslConfig;
   }
 
-  private SSLConfig createSSLConfig(final SecurableComponent sslEnabledComponent) {
+  private SSLConfig createSSLConfig(final SecurableCommunicationChannel sslEnabledComponent) {
     SSLConfig sslConfig = new SSLConfig();
     sslConfig.setCiphers(getDistributionConfig().getSSLCiphers());
     sslConfig.setEnabled(determineIfSSLEnabledForSSLComponent(sslEnabledComponent));
@@ -161,14 +162,14 @@ public class SSLConfigurationFactory {
     return sslConfig;
   }
 
-  private boolean determineIfSSLEnabledForSSLComponent(final SecurableComponent sslEnabledComponent) {
-    if (ArrayUtils.contains(getDistributionConfig().getSSLEnabledComponents(), SecurableComponent.NONE)) {
+  private boolean determineIfSSLEnabledForSSLComponent(final SecurableCommunicationChannel sslEnabledComponent) {
+    if (ArrayUtils.contains(getDistributionConfig().getSecurableCommunicationChannels(), SecurableComponent.NONE)) {
       return false;
     }
-    if (ArrayUtils.contains(getDistributionConfig().getSSLEnabledComponents(), SecurableComponent.ALL)) {
+    if (ArrayUtils.contains(getDistributionConfig().getSecurableCommunicationChannels(), SecurableComponent.ALL)) {
       return true;
     }
-    return ArrayUtils.contains(getDistributionConfig().getSSLEnabledComponents(), sslEnabledComponent) ? true : false;
+    return ArrayUtils.contains(getDistributionConfig().getSecurableCommunicationChannels(), sslEnabledComponent) ? true : false;
   }
 
   /**
@@ -308,7 +309,7 @@ public class SSLConfigurationFactory {
     return propertyValue;
   }
 
-  private SSLConfig getRegisteredSSLConfigForComponent(final SecurableComponent sslEnabledComponent) {
+  private SSLConfig getRegisteredSSLConfigForComponent(final SecurableCommunicationChannel sslEnabledComponent) {
     return registeredSSLConfig.get(sslEnabledComponent);
   }
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8ff5e7a4/geode-core/src/main/java/com/gemstone/gemfire/internal/net/SocketCreator.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/net/SocketCreator.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/net/SocketCreator.java
index 6ddd0a2..5136f19 100755
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/net/SocketCreator.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/net/SocketCreator.java
@@ -331,7 +331,7 @@ public class SocketCreator {
   private void initialize() {
     try {
       // set p2p values...
-      if (SecurableComponent.CLUSTER.equals(sslConfig.getSecuredComponent())) {
+      if (SecurableComponent.CLUSTER.equals(sslConfig.getSecuredCommunicationChannel())) {
         if (this.sslConfig.isEnabled()) {
           System.setProperty("p2p.useSSL", "true");
           System.setProperty("p2p.oldIO", "true");

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8ff5e7a4/geode-core/src/main/java/com/gemstone/gemfire/internal/net/SocketCreatorFactory.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/net/SocketCreatorFactory.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/net/SocketCreatorFactory.java
index 337ca9c..4ef3103 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/net/SocketCreatorFactory.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/net/SocketCreatorFactory.java
@@ -19,20 +19,18 @@ package com.gemstone.gemfire.internal.net;
 import java.util.HashMap;
 import java.util.Map;
 import java.util.Properties;
-import java.util.StringTokenizer;
-import java.util.Vector;
 
 import org.apache.commons.lang.ArrayUtils;
 
 import com.gemstone.gemfire.GemFireConfigException;
 import com.gemstone.gemfire.distributed.internal.DistributionConfig;
 import com.gemstone.gemfire.internal.admin.SSLConfig;
-import com.gemstone.gemfire.internal.security.SecurableComponent;
+import com.gemstone.gemfire.internal.security.SecurableCommunicationChannel;
 
 public class SocketCreatorFactory {
 
   private static SocketCreatorFactory instance = null;
-  private Map<SecurableComponent, SocketCreator> socketCreators = new HashMap<>();
+  private Map<SecurableCommunicationChannel, SocketCreator> socketCreators = new HashMap<>();
   private DistributionConfig distributionConfig;
 
   /**
@@ -65,16 +63,16 @@ public class SocketCreatorFactory {
     return getInstance(false);
   }
 
-  public static SocketCreator getSocketCreatorForComponent(SecurableComponent sslEnabledComponent) {
+  public static SocketCreator getSocketCreatorForComponent(SecurableCommunicationChannel sslEnabledComponent) {
     SSLConfig sslConfigForComponent = SSLConfigurationFactory.getSSLConfigForComponent(sslEnabledComponent);
     return getInstance().getOrCreateSocketCreatorForSSLEnabledComponent(sslEnabledComponent, sslConfigForComponent);
   }
 
-  private SocketCreator getSSLSocketCreator(final SecurableComponent sslComponent, final SSLConfig sslConfig) {
+  private SocketCreator getSSLSocketCreator(final SecurableCommunicationChannel sslComponent, final SSLConfig sslConfig) {
     if (sslConfig.isEnabled()) {
-      if (ArrayUtils.contains(getDistributionConfig().getSSLEnabledComponents(), SecurableComponent.ALL)) {
-        return createSSLSocketCreator(SecurableComponent.ALL, sslConfig);
-//      } else if (ArrayUtils.contains(getDistributionConfig().getSSLEnabledComponents(), sslComponent)) {
+      if (ArrayUtils.contains(getDistributionConfig().getSecurableCommunicationChannels(), SecurableCommunicationChannel.ALL)) {
+        return createSSLSocketCreator(SecurableCommunicationChannel.ALL, sslConfig);
+        //      } else if (ArrayUtils.contains(getDistributionConfig().getSecurableCommunicationChannels(), sslComponent)) {
       } else {
         return createSSLSocketCreator(sslComponent, sslConfig);
       }
@@ -83,7 +81,7 @@ public class SocketCreatorFactory {
   }
 
 
-  private SocketCreator getOrCreateSocketCreatorForSSLEnabledComponent(final SecurableComponent sslEnabledComponent, final SSLConfig sslConfig) {
+  private SocketCreator getOrCreateSocketCreatorForSSLEnabledComponent(final SecurableCommunicationChannel sslEnabledComponent, final SSLConfig sslConfig) {
     SocketCreator socketCreator = getRegisteredSocketCreatorForComponent(sslEnabledComponent);
     if (socketCreator == null) {
       return getSSLSocketCreator(sslEnabledComponent, sslConfig);
@@ -92,7 +90,7 @@ public class SocketCreatorFactory {
     }
   }
 
-  private SocketCreator createSSLSocketCreator(final SecurableComponent sslEnableComponent, final SSLConfig sslConfig) {
+  private SocketCreator createSSLSocketCreator(final SecurableCommunicationChannel sslEnableComponent, final SSLConfig sslConfig) {
     SocketCreator socketCreator = null;
     if (sslConfig.isEnabled()) {
       socketCreator = new SocketCreator(sslConfig);
@@ -107,11 +105,11 @@ public class SocketCreatorFactory {
     return socketCreator;
   }
 
-  private synchronized void registerSocketCreatorForComponent(SecurableComponent sslEnabledComponent, SocketCreator socketCreator) {
+  private synchronized void registerSocketCreatorForComponent(SecurableCommunicationChannel sslEnabledComponent, SocketCreator socketCreator) {
     socketCreators.put(sslEnabledComponent, socketCreator);
   }
 
-  private synchronized SocketCreator getRegisteredSocketCreatorForComponent(SecurableComponent sslEnabledComponent) {
+  private synchronized SocketCreator getRegisteredSocketCreatorForComponent(SecurableCommunicationChannel sslEnabledComponent) {
     return socketCreators.get(sslEnabledComponent);
   }
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8ff5e7a4/geode-core/src/main/java/com/gemstone/gemfire/internal/security/SecurableCommunicationChannel.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/security/SecurableCommunicationChannel.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/security/SecurableCommunicationChannel.java
new file mode 100644
index 0000000..5dce877
--- /dev/null
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/security/SecurableCommunicationChannel.java
@@ -0,0 +1,56 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.gemstone.gemfire.internal.security;
+
+import org.apache.geode.security.SecurableCommunicationChannels;
+
+import com.gemstone.gemfire.GemFireConfigException;
+
+public enum SecurableCommunicationChannel {
+  ALL(SecurableCommunicationChannels.ALL),
+  CLUSTER(SecurableCommunicationChannels.CLUSTER),
+  SERVER(SecurableCommunicationChannels.SERVER),
+  JMX(SecurableCommunicationChannels.JMX),
+  WEB(SecurableCommunicationChannels.WEB),
+  GATEWAY(SecurableCommunicationChannels.GATEWAY),
+  LOCATOR(SecurableCommunicationChannels.LOCATOR),
+  NONE("NO_COMPONENT");
+
+  private final String constant;
+
+  SecurableCommunicationChannel(final String constant) {
+    this.constant = constant;
+  }
+
+  public static SecurableCommunicationChannel getEnum(String enumString) {
+    for (SecurableCommunicationChannel securableCommunicationChannel : SecurableCommunicationChannel.values()) {
+      if (securableCommunicationChannel.constant.equalsIgnoreCase(enumString)) {
+        return securableCommunicationChannel;
+      }
+    }
+    throw new GemFireConfigException("There is no registered component for the name: " + enumString);
+  }
+
+  public String getConstant() {
+    return constant;
+  }
+
+  @Override
+  public String toString() {
+    return constant;
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8ff5e7a4/geode-core/src/main/java/com/gemstone/gemfire/internal/tcp/TCPConduit.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/tcp/TCPConduit.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/tcp/TCPConduit.java
index aa60101..dc8fdff 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/tcp/TCPConduit.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/tcp/TCPConduit.java
@@ -61,6 +61,7 @@ import com.gemstone.gemfire.internal.logging.log4j.LocalizedMessage;
 import com.gemstone.gemfire.internal.logging.log4j.LogMarker;
 import com.gemstone.gemfire.internal.net.SocketCreator;
 import com.gemstone.gemfire.internal.net.SocketCreatorFactory;
+import com.gemstone.gemfire.internal.security.SecurableCommunicationChannel;
 import com.gemstone.gemfire.internal.security.SecurableComponent;
 
 /**
@@ -282,7 +283,7 @@ public class TCPConduit implements Runnable {
       }
     }
 
-    this.socketCreator = SocketCreatorFactory.getSocketCreatorForComponent(SecurableComponent.CLUSTER);
+    this.socketCreator = SocketCreatorFactory.getSocketCreatorForComponent(SecurableCommunicationChannel.CLUSTER);
 
     startAcceptor();
   }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8ff5e7a4/geode-core/src/main/java/com/gemstone/gemfire/management/GemFireProperties.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/management/GemFireProperties.java b/geode-core/src/main/java/com/gemstone/gemfire/management/GemFireProperties.java
index 61f4072..fce1314 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/management/GemFireProperties.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/management/GemFireProperties.java
@@ -17,6 +17,7 @@
 package com.gemstone.gemfire.management;
 
 
+import com.gemstone.gemfire.internal.security.SecurableCommunicationChannel;
 import com.gemstone.gemfire.internal.security.SecurableComponent;
 
 /**
@@ -640,7 +641,7 @@ public class GemFireProperties {
 
   private String locatorSSLAlias;
 
-  private SecurableComponent[] sslEnabledComponents;
+  private SecurableCommunicationChannel[] securableCommunicationChannels;
   private String sslProtocols;
   private String sslCiphers;
   private boolean sslRequireAuthentication;
@@ -1785,12 +1786,12 @@ public class GemFireProperties {
     this.locatorSSLAlias = locatorSSLAlias;
   }
 
-  public SecurableComponent[] getSSLEnabledComponents() {
-    return sslEnabledComponents;
+  public SecurableCommunicationChannel[] getSecurableCommunicationChannel() {
+    return securableCommunicationChannels;
   }
 
-  public void setSSLEnabledComponents(final SecurableComponent[] sslEnabledComponents) {
-    this.sslEnabledComponents = sslEnabledComponents;
+  public void setSecurableCommunicationChannel(final SecurableCommunicationChannel[] sslEnabledComponents) {
+    this.securableCommunicationChannels = sslEnabledComponents;
   }
 
   public String getSSLProtocols() {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8ff5e7a4/geode-core/src/main/java/com/gemstone/gemfire/management/internal/JettyHelper.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/management/internal/JettyHelper.java b/geode-core/src/main/java/com/gemstone/gemfire/management/internal/JettyHelper.java
index 569cb7b..69acb3e 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/management/internal/JettyHelper.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/management/internal/JettyHelper.java
@@ -37,7 +37,7 @@ import com.gemstone.gemfire.internal.admin.SSLConfig;
 import com.gemstone.gemfire.internal.lang.StringUtils;
 import com.gemstone.gemfire.internal.logging.LogService;
 import com.gemstone.gemfire.internal.net.SSLConfigurationFactory;
-import com.gemstone.gemfire.internal.security.SecurableComponent;
+import com.gemstone.gemfire.internal.security.SecurableCommunicationChannel;
 
 /**
  * @since GemFire 8.1
@@ -197,7 +197,7 @@ public class JettyHelper {
     if (args.length > 1) {
       System.out.printf("Temporary Directory @ ($1%s)%n", USER_DIR);
 
-      final Server jetty = JettyHelper.initJetty(null, 8090, SSLConfigurationFactory.getSSLConfigForComponent(SecurableComponent.HTTP_SERVICE));
+      final Server jetty = JettyHelper.initJetty(null, 8090, SSLConfigurationFactory.getSSLConfigForComponent(SecurableCommunicationChannel.WEB));
 
       for (int index = 0; index < args.length; index += 2) {
         final String webAppContext = args[index];

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8ff5e7a4/geode-core/src/main/java/com/gemstone/gemfire/management/internal/ManagementAgent.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/management/internal/ManagementAgent.java b/geode-core/src/main/java/com/gemstone/gemfire/management/internal/ManagementAgent.java
index 5f0d497..a9cc0ed 100755
--- a/geode-core/src/main/java/com/gemstone/gemfire/management/internal/ManagementAgent.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/management/internal/ManagementAgent.java
@@ -60,7 +60,7 @@ import com.gemstone.gemfire.internal.net.SSLConfigurationFactory;
 import com.gemstone.gemfire.internal.net.SocketCreator;
 import com.gemstone.gemfire.internal.net.SocketCreatorFactory;
 import com.gemstone.gemfire.internal.security.GeodeSecurityUtil;
-import com.gemstone.gemfire.internal.security.SecurableComponent;
+import com.gemstone.gemfire.internal.security.SecurableCommunicationChannel;
 import com.gemstone.gemfire.internal.security.shiro.JMXShiroAuthenticator;
 import com.gemstone.gemfire.internal.tcp.TCPConduit;
 import com.gemstone.gemfire.management.ManagementException;
@@ -227,7 +227,7 @@ public class ManagementAgent {
 
           boolean isRestWebAppAdded = false;
 
-          this.httpServer = JettyHelper.initJetty(bindAddress, port, SSLConfigurationFactory.getSSLConfigForComponent(SecurableComponent.HTTP_SERVICE));
+          this.httpServer = JettyHelper.initJetty(bindAddress, port, SSLConfigurationFactory.getSSLConfigForComponent(SecurableCommunicationChannel.WEB));
 
           if (agentUtil.isWebApplicationAvailable(gemfireWar)) {
             this.httpServer = JettyHelper
@@ -356,7 +356,7 @@ public class ManagementAgent {
       bindAddr = InetAddress.getByName(hostname);
     }
 
-    final SocketCreator socketCreator = SocketCreatorFactory.getSocketCreatorForComponent(SecurableComponent.JMX);
+    final SocketCreator socketCreator = SocketCreatorFactory.getSocketCreatorForComponent(SecurableCommunicationChannel.JMX);
 
     final boolean ssl = socketCreator.useSSL();
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8ff5e7a4/geode-core/src/main/java/com/gemstone/gemfire/management/internal/RestAgent.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/management/internal/RestAgent.java b/geode-core/src/main/java/com/gemstone/gemfire/management/internal/RestAgent.java
index a8c480b..ed586db 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/management/internal/RestAgent.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/management/internal/RestAgent.java
@@ -36,7 +36,7 @@ import com.gemstone.gemfire.internal.net.SocketCreator;
 import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
 import com.gemstone.gemfire.internal.cache.InternalRegionArguments;
 import com.gemstone.gemfire.internal.logging.LogService;
-import com.gemstone.gemfire.internal.security.SecurableComponent;
+import com.gemstone.gemfire.internal.security.SecurableCommunicationChannel;
 import com.gemstone.gemfire.management.ManagementService;
 
 /**
@@ -133,7 +133,7 @@ public class RestAgent {
 
         final int port = this.config.getHttpServicePort();
 
-        this.httpServer = JettyHelper.initJetty(httpServiceBindAddress, port, SSLConfigurationFactory.getSSLConfigForComponent(SecurableComponent.HTTP_SERVICE));
+        this.httpServer = JettyHelper.initJetty(httpServiceBindAddress, port, SSLConfigurationFactory.getSSLConfigForComponent(SecurableCommunicationChannel.WEB));
 
         this.httpServer = JettyHelper.addWebApplication(httpServer, "/gemfire-api", gemfireAPIWar);
         this.httpServer = JettyHelper.addWebApplication(httpServer, "/geode", gemfireAPIWar);

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8ff5e7a4/geode-core/src/main/java/com/gemstone/gemfire/management/internal/beans/BeanUtilFuncs.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/management/internal/beans/BeanUtilFuncs.java b/geode-core/src/main/java/com/gemstone/gemfire/management/internal/beans/BeanUtilFuncs.java
index 8e05d74..c591192 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/management/internal/beans/BeanUtilFuncs.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/management/internal/beans/BeanUtilFuncs.java
@@ -334,7 +334,7 @@ public class BeanUtilFuncs {
     gemFirePropertyData.setStartDevRestApi(config.getStartDevRestApi());
 
     gemFirePropertyData.setSSLCiphers(config.getSSLCiphers());
-    gemFirePropertyData.setSSLEnabledComponents(config.getSSLEnabledComponents());
+    gemFirePropertyData.setSecurableCommunicationChannel(config.getSecurableCommunicationChannels());
     gemFirePropertyData.setSSLHttpServiceRequireAuthentication(config.getSSLHTTPRequireAuthentication());
     gemFirePropertyData.setSSLKeyStore(config.getSSLKeyStore());
     gemFirePropertyData.setSSLKeyStoreType(config.getSSLKeyStoreType());

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8ff5e7a4/geode-core/src/main/java/org/apache/geode/security/SecurableCommunicationChannels.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/security/SecurableCommunicationChannels.java b/geode-core/src/main/java/org/apache/geode/security/SecurableCommunicationChannels.java
new file mode 100644
index 0000000..cf398da
--- /dev/null
+++ b/geode-core/src/main/java/org/apache/geode/security/SecurableCommunicationChannels.java
@@ -0,0 +1,62 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.geode.security;
+
+import com.gemstone.gemfire.distributed.ConfigurationProperties;
+
+/**
+ * This class defines all the static definitions for the {@link ConfigurationProperties#SSL_ENABLED_COMPONENTS}
+ * <U>Since</U>: Geode 1.0
+ */
+public interface SecurableCommunicationChannels {
+
+  /**
+   * This determines that all components will be secured.
+   * <U>Since</U>: Geode 1.0
+   */
+  String ALL = "all";
+  /**
+   * This determines that the client-server communication will be secured.
+   * <U>Since</U>: Geode 1.0
+   */
+  String SERVER = "server";
+  /**
+   * This determines that the inter-server (or server-to-server) communication will be secured.
+   * <U>Since</U>: Geode 1.0
+   */
+  String CLUSTER = "cluster";
+  /**
+   * This determines that test jmx communication will be secured.
+   * <U>Since</U>: Geode 1.0
+   */
+  String JMX = "jmx";
+  /**
+   * This determines that the http service communication will be secured.
+   * <U>Since</U>: Geode 1.0
+   */
+  String WEB = "web";
+  /**
+   * This determines that the gateway communication will be secured.
+   * <U>Since</U>: Geode 1.0
+   */
+  String GATEWAY = "gateway";
+  /**
+   * This determines that the locator communication will be secured.
+   * <U>Since</U>: Geode 1.0
+   */
+  String LOCATOR = "locator";
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8ff5e7a4/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorLauncherLocalIntegrationTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorLauncherLocalIntegrationTest.java b/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorLauncherLocalIntegrationTest.java
index a3623f6..8b9bd96 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorLauncherLocalIntegrationTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorLauncherLocalIntegrationTest.java
@@ -25,7 +25,7 @@ import com.gemstone.gemfire.internal.net.SocketCreatorFactory;
 import com.gemstone.gemfire.internal.process.ProcessControllerFactory;
 import com.gemstone.gemfire.internal.process.ProcessType;
 import com.gemstone.gemfire.internal.process.ProcessUtils;
-import com.gemstone.gemfire.internal.security.SecurableComponent;
+import com.gemstone.gemfire.internal.security.SecurableCommunicationChannel;
 import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
 import com.gemstone.gemfire.test.junit.runners.CategoryWithParameterizedRunnerFactory;
 import org.junit.After;
@@ -327,7 +327,7 @@ public class LocatorLauncherLocalIntegrationTest extends AbstractLocatorLauncher
       return;
     }
 
-    this.socket = SocketCreatorFactory.getSocketCreatorForComponent(SecurableComponent.CLUSTER).createServerSocket(this.locatorPort, 50, null, -1);
+    this.socket = SocketCreatorFactory.getSocketCreatorForComponent(SecurableCommunicationChannel.CLUSTER).createServerSocket(this.locatorPort, 50, null, -1);
     assertTrue(this.socket.isBound());
     assertFalse(this.socket.isClosed());
     assertFalse(AvailablePort.isPortAvailable(this.locatorPort, AvailablePort.SOCKET));
@@ -544,7 +544,7 @@ public class LocatorLauncherLocalIntegrationTest extends AbstractLocatorLauncher
     }
 
     // generate one free port and then use it instead of default
-    this.socket = SocketCreatorFactory.getSocketCreatorForComponent(SecurableComponent.CLUSTER).createServerSocket(this.locatorPort, 50, null, -1);
+    this.socket = SocketCreatorFactory.getSocketCreatorForComponent(SecurableCommunicationChannel.CLUSTER).createServerSocket(this.locatorPort, 50, null, -1);
     
     this.launcher = new Builder()
         .setMemberName(getUniqueName())

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8ff5e7a4/geode-core/src/test/java/com/gemstone/gemfire/distributed/ServerLauncherLocalIntegrationTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/distributed/ServerLauncherLocalIntegrationTest.java b/geode-core/src/test/java/com/gemstone/gemfire/distributed/ServerLauncherLocalIntegrationTest.java
index 129e727..03b01cf 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/distributed/ServerLauncherLocalIntegrationTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/distributed/ServerLauncherLocalIntegrationTest.java
@@ -35,7 +35,7 @@ import com.gemstone.gemfire.internal.net.SocketCreatorFactory;
 import com.gemstone.gemfire.internal.process.ProcessControllerFactory;
 import com.gemstone.gemfire.internal.process.ProcessType;
 import com.gemstone.gemfire.internal.process.ProcessUtils;
-import com.gemstone.gemfire.internal.security.SecurableComponent;
+import com.gemstone.gemfire.internal.security.SecurableCommunicationChannel;
 import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
 import org.junit.After;
 import org.junit.Before;
@@ -609,7 +609,7 @@ public class ServerLauncherLocalIntegrationTest extends AbstractServerLauncherIn
     String rootFolder = this.temporaryFolder.getRoot().getCanonicalPath();
 
     // generate one free port and then use TEST_OVERRIDE_DEFAULT_PORT_PROPERTY
-    this.socket = SocketCreatorFactory.getSocketCreatorForComponent(SecurableComponent.CLUSTER).createServerSocket(this.serverPort, 50, null, -1);
+    this.socket = SocketCreatorFactory.getSocketCreatorForComponent(SecurableCommunicationChannel.CLUSTER).createServerSocket(this.serverPort, 50, null, -1);
     assertFalse(AvailablePort.isPortAvailable(this.serverPort, AvailablePort.SOCKET));
     
     // build and start the server
@@ -770,7 +770,7 @@ public class ServerLauncherLocalIntegrationTest extends AbstractServerLauncherIn
 
     // generate one free port and then use TEST_OVERRIDE_DEFAULT_PORT_PROPERTY
     final int freeTCPPort = AvailablePort.getRandomAvailablePort(AvailablePort.SOCKET);
-    this.socket = SocketCreatorFactory.getSocketCreatorForComponent(SecurableComponent.CLUSTER).createServerSocket(freeTCPPort, 50, null, -1);
+    this.socket = SocketCreatorFactory.getSocketCreatorForComponent(SecurableCommunicationChannel.CLUSTER).createServerSocket(freeTCPPort, 50, null, -1);
     
     // build and start the server
     final Builder builder = new Builder()

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8ff5e7a4/geode-core/src/test/java/com/gemstone/gemfire/internal/net/JSSESocketJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/net/JSSESocketJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/net/JSSESocketJUnitTest.java
index 313f797..e0f1e8c 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/net/JSSESocketJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/net/JSSESocketJUnitTest.java
@@ -50,7 +50,7 @@ import com.gemstone.gemfire.distributed.internal.DistributionConfig;
 import com.gemstone.gemfire.distributed.internal.DistributionConfigImpl;
 import com.gemstone.gemfire.internal.AvailablePort;
 import com.gemstone.gemfire.internal.logging.LogService;
-import com.gemstone.gemfire.internal.security.SecurableComponent;
+import com.gemstone.gemfire.internal.security.SecurableCommunicationChannel;
 import com.gemstone.gemfire.test.dunit.ThreadUtils;
 import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
 import com.gemstone.gemfire.util.test.TestUtil;
@@ -127,13 +127,13 @@ public class JSSESocketJUnitTest {
       DistributionConfigImpl distributionConfig = new DistributionConfigImpl(new Properties());
 
       SocketCreatorFactory.setDistributionConfig(distributionConfig);
-      assertTrue(SocketCreatorFactory.getSocketCreatorForComponent(SecurableComponent.CLUSTER).useSSL());
+      assertTrue(SocketCreatorFactory.getSocketCreatorForComponent(SecurableCommunicationChannel.CLUSTER).useSSL());
 
-      final ServerSocket serverSocket = SocketCreatorFactory.getSocketCreatorForComponent(SecurableComponent.CLUSTER).createServerSocket(randport, 0, InetAddress.getByName("localhost"));
+      final ServerSocket serverSocket = SocketCreatorFactory.getSocketCreatorForComponent(SecurableCommunicationChannel.CLUSTER).createServerSocket(randport, 0, InetAddress.getByName("localhost"));
 
       Thread serverThread = startServer(serverSocket, receiver);
 
-      Socket client = SocketCreatorFactory.getSocketCreatorForComponent(SecurableComponent.CLUSTER).connectForServer(InetAddress.getByName("localhost"), randport);
+      Socket client = SocketCreatorFactory.getSocketCreatorForComponent(SecurableCommunicationChannel.CLUSTER).connectForServer(InetAddress.getByName("localhost"), randport);
 
       ObjectOutputStream oos = new ObjectOutputStream(client.getOutputStream());
       String expected = new String("testing " + name.getMethodName());
@@ -186,7 +186,7 @@ public class JSSESocketJUnitTest {
     factoryInvoked = false;
     try {
       try {
-        Socket sock = SocketCreatorFactory.getSocketCreatorForComponent(SecurableComponent.CLUSTER).connectForClient("localhost", 12345, 0);
+        Socket sock = SocketCreatorFactory.getSocketCreatorForComponent(SecurableCommunicationChannel.CLUSTER).connectForClient("localhost", 12345, 0);
         sock.close();
         fail("socket factory was invoked");
       } catch (IOException e) {
@@ -194,7 +194,7 @@ public class JSSESocketJUnitTest {
       }
     } finally {
       System.getProperties().remove(DistributionConfig.GEMFIRE_PREFIX + "clientSocketFactory");
-      SocketCreatorFactory.getSocketCreatorForComponent(SecurableComponent.CLUSTER).initializeClientSocketFactory();
+      SocketCreatorFactory.getSocketCreatorForComponent(SecurableCommunicationChannel.CLUSTER).initializeClientSocketFactory();
     }
   }
 
@@ -222,7 +222,7 @@ public class JSSESocketJUnitTest {
       public void run() {
         try {
           Socket s = serverSocket.accept();
-          SocketCreatorFactory.getSocketCreatorForComponent(SecurableComponent.CLUSTER).configureServerSSLSocket(s);
+          SocketCreatorFactory.getSocketCreatorForComponent(SecurableCommunicationChannel.CLUSTER).configureServerSSLSocket(s);
           ObjectInputStream ois = new ObjectInputStream(s.getInputStream());
           receiver[0] = ois.readObject();
           server = s;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8ff5e7a4/geode-core/src/test/java/com/gemstone/gemfire/internal/net/SSLConfigurationFactoryTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/net/SSLConfigurationFactoryTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/net/SSLConfigurationFactoryTest.java
index bc142e2..18729fd 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/net/SSLConfigurationFactoryTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/net/SSLConfigurationFactoryTest.java
@@ -29,7 +29,7 @@ import org.junit.experimental.categories.Category;
 import com.gemstone.gemfire.distributed.internal.DistributionConfig;
 import com.gemstone.gemfire.distributed.internal.DistributionConfigImpl;
 import com.gemstone.gemfire.internal.admin.SSLConfig;
-import com.gemstone.gemfire.internal.security.SecurableComponent;
+import com.gemstone.gemfire.internal.security.SecurableCommunicationChannel;
 import com.gemstone.gemfire.test.dunit.internal.JUnit4DistributedTestCase;
 import com.gemstone.gemfire.test.junit.categories.UnitTest;
 
@@ -55,7 +55,7 @@ public class SSLConfigurationFactoryTest extends JUnit4DistributedTestCase {
     properties.setProperty(SSL_PROTOCOLS, "Protocol1,Protocol2");
     DistributionConfigImpl distributionConfig = new DistributionConfigImpl(properties);
     SSLConfigurationFactory.setDistributionConfig(distributionConfig);
-    for (SecurableComponent securableComponent : SecurableComponent.values()) {
+    for (SecurableCommunicationChannel securableComponent : SecurableCommunicationChannel.values()) {
       assertSSLConfig(properties, SSLConfigurationFactory.getSSLConfigForComponent(securableComponent), securableComponent, distributionConfig);
     }
   }
@@ -74,8 +74,8 @@ public class SSLConfigurationFactoryTest extends JUnit4DistributedTestCase {
     properties.setProperty(SSL_PROTOCOLS, "any");
     DistributionConfigImpl distributionConfig = new DistributionConfigImpl(properties);
     SSLConfigurationFactory.setDistributionConfig(distributionConfig);
-    for (SecurableComponent securableComponent : SecurableComponent.values()) {
-      assertSSLConfig(properties, SSLConfigurationFactory.getSSLConfigForComponent(securableComponent), securableComponent, distributionConfig);
+    for (SecurableCommunicationChannel securableCommunicationChannel : SecurableCommunicationChannel.values()) {
+      assertSSLConfig(properties, SSLConfigurationFactory.getSSLConfigForComponent(securableCommunicationChannel), securableCommunicationChannel, distributionConfig);
     }
   }
 
@@ -93,15 +93,15 @@ public class SSLConfigurationFactoryTest extends JUnit4DistributedTestCase {
     properties.setProperty(SSL_PROTOCOLS, "any");
     DistributionConfigImpl distributionConfig = new DistributionConfigImpl(properties);
     SSLConfigurationFactory.setDistributionConfig(distributionConfig);
-    for (SecurableComponent securableComponent : SecurableComponent.values()) {
-      assertSSLConfig(properties, SSLConfigurationFactory.getSSLConfigForComponent(securableComponent), securableComponent, distributionConfig);
+    for (SecurableCommunicationChannel securableCommunicationChannel : SecurableCommunicationChannel.values()) {
+      assertSSLConfig(properties, SSLConfigurationFactory.getSSLConfigForComponent(securableCommunicationChannel), securableCommunicationChannel, distributionConfig);
     }
   }
 
   @Test
   public void getSSLConfigForComponentHTTPService() throws Exception {
     Properties properties = new Properties();
-    properties.setProperty(SSL_ENABLED_COMPONENTS, SecurableComponent.HTTP_SERVICE.getConstant());
+    properties.setProperty(SSL_ENABLED_COMPONENTS, SecurableCommunicationChannel.WEB.getConstant());
     properties.setProperty(SSL_KEYSTORE, "someKeyStore");
     properties.setProperty(SSL_KEYSTORE_PASSWORD, "keystorePassword");
     properties.setProperty(SSL_KEYSTORE_TYPE, "JKS");
@@ -112,15 +112,15 @@ public class SSLConfigurationFactoryTest extends JUnit4DistributedTestCase {
     properties.setProperty(SSL_PROTOCOLS, "any");
     DistributionConfigImpl distributionConfig = new DistributionConfigImpl(properties);
     SSLConfigurationFactory.setDistributionConfig(distributionConfig);
-    for (SecurableComponent securableComponent : SecurableComponent.values()) {
-      assertSSLConfig(properties, SSLConfigurationFactory.getSSLConfigForComponent(securableComponent), securableComponent, distributionConfig);
+    for (SecurableCommunicationChannel securableCommunicationChannel : SecurableCommunicationChannel.values()) {
+      assertSSLConfig(properties, SSLConfigurationFactory.getSSLConfigForComponent(securableCommunicationChannel), securableCommunicationChannel, distributionConfig);
     }
   }
 
   @Test
   public void getSSLConfigForComponentHTTPServiceWithAlias() throws Exception {
     Properties properties = new Properties();
-    properties.setProperty(SSL_ENABLED_COMPONENTS, SecurableComponent.HTTP_SERVICE.getConstant());
+    properties.setProperty(SSL_ENABLED_COMPONENTS, SecurableCommunicationChannel.WEB.getConstant());
     properties.setProperty(SSL_KEYSTORE, "someKeyStore");
     properties.setProperty(SSL_KEYSTORE_PASSWORD, "keystorePassword");
     properties.setProperty(SSL_KEYSTORE_TYPE, "JKS");
@@ -132,15 +132,15 @@ public class SSLConfigurationFactoryTest extends JUnit4DistributedTestCase {
     properties.setProperty(SSL_PROTOCOLS, "any");
     DistributionConfigImpl distributionConfig = new DistributionConfigImpl(properties);
     SSLConfigurationFactory.setDistributionConfig(distributionConfig);
-    for (SecurableComponent securableComponent : SecurableComponent.values()) {
-      assertSSLConfig(properties, SSLConfigurationFactory.getSSLConfigForComponent(securableComponent), securableComponent, distributionConfig);
+    for (SecurableCommunicationChannel securableCommunicationChannel : SecurableCommunicationChannel.values()) {
+      assertSSLConfig(properties, SSLConfigurationFactory.getSSLConfigForComponent(securableCommunicationChannel), securableCommunicationChannel, distributionConfig);
     }
   }
 
   @Test
   public void getSSLConfigForComponentHTTPServiceWithMutualAuth() throws Exception {
     Properties properties = new Properties();
-    properties.setProperty(SSL_ENABLED_COMPONENTS, SecurableComponent.HTTP_SERVICE.getConstant());
+    properties.setProperty(SSL_ENABLED_COMPONENTS, SecurableCommunicationChannel.WEB.getConstant());
     properties.setProperty(SSL_KEYSTORE, "someKeyStore");
     properties.setProperty(SSL_KEYSTORE_PASSWORD, "keystorePassword");
     properties.setProperty(SSL_KEYSTORE_TYPE, "JKS");
@@ -153,16 +153,16 @@ public class SSLConfigurationFactoryTest extends JUnit4DistributedTestCase {
     properties.setProperty(SSL_PROTOCOLS, "any");
     DistributionConfigImpl distributionConfig = new DistributionConfigImpl(properties);
     SSLConfigurationFactory.setDistributionConfig(distributionConfig);
-    for (SecurableComponent securableComponent : SecurableComponent.values()) {
-      assertSSLConfig(properties, SSLConfigurationFactory.getSSLConfigForComponent(securableComponent), securableComponent, distributionConfig);
+    for (SecurableCommunicationChannel securableCommunicationChannel : SecurableCommunicationChannel.values()) {
+      assertSSLConfig(properties, SSLConfigurationFactory.getSSLConfigForComponent(securableCommunicationChannel), securableCommunicationChannel, distributionConfig);
     }
   }
 
   private void assertSSLConfig(final Properties properties,
                                final SSLConfig sslConfig,
-                               final SecurableComponent expectedSecurableComponent,
+                               final SecurableCommunicationChannel expectedSecurableComponent,
                                final DistributionConfigImpl distributionConfig) {
-    assertEquals(isSSLComponentEnabled(expectedSecurableComponent, distributionConfig.getSSLEnabledComponents()), sslConfig.isEnabled());
+    assertEquals(isSSLComponentEnabled(expectedSecurableComponent, distributionConfig.getSecurableCommunicationChannels()), sslConfig.isEnabled());
     assertEquals(properties.getProperty(SSL_KEYSTORE), sslConfig.getKeystore());
     assertEquals(properties.getProperty(SSL_KEYSTORE_PASSWORD), sslConfig.getKeystorePassword());
     assertEquals(properties.getProperty(SSL_KEYSTORE_TYPE), sslConfig.getKeystoreType());
@@ -172,17 +172,17 @@ public class SSLConfigurationFactoryTest extends JUnit4DistributedTestCase {
     assertEquals(properties.getProperty(SSL_PROTOCOLS).replace(","," "), sslConfig.getProtocols());
     assertEquals(getCorrectAlias(expectedSecurableComponent, properties), sslConfig.getAlias());
     assertEquals(requiresAuthentication(properties, expectedSecurableComponent), sslConfig.isRequireAuth());
-    assertEquals(expectedSecurableComponent, sslConfig.getSecuredComponent());
+    assertEquals(expectedSecurableComponent, sslConfig.getSecuredCommunicationChannel());
   }
 
-  private boolean requiresAuthentication(final Properties properties, final SecurableComponent expectedSecurableComponent) {
-    boolean defaultAuthentication = expectedSecurableComponent.equals(SecurableComponent.HTTP_SERVICE) ? DistributionConfig.DEFAULT_SSL_HTTP_SERVICE_REQUIRE_AUTHENTICATION : DistributionConfig.DEFAULT_SSL_REQUIRE_AUTHENTICATION;
+  private boolean requiresAuthentication(final Properties properties, final SecurableCommunicationChannel expectedSecurableComponent) {
+    boolean defaultAuthentication = expectedSecurableComponent.equals(SecurableCommunicationChannel.WEB) ? DistributionConfig.DEFAULT_SSL_HTTP_SERVICE_REQUIRE_AUTHENTICATION : DistributionConfig.DEFAULT_SSL_REQUIRE_AUTHENTICATION;
     String httpRequiresAuthentication = properties.getProperty(SSL_HTTP_SERVICE_REQUIRE_AUTHENTICATION);
 
     return httpRequiresAuthentication == null ? defaultAuthentication : Boolean.parseBoolean(httpRequiresAuthentication);
   }
 
-  private String getCorrectAlias(final SecurableComponent expectedSecurableComponent, final Properties properties) {
+  private String getCorrectAlias(final SecurableCommunicationChannel expectedSecurableComponent, final Properties properties) {
     switch (expectedSecurableComponent) {
       case ALL:
         return properties.getProperty(SSL_DEFAULT_ALIAS);
@@ -190,7 +190,7 @@ public class SSLConfigurationFactoryTest extends JUnit4DistributedTestCase {
         return getAliasForComponent(properties, SSL_CLUSTER_ALIAS);
       case GATEWAY:
         return getAliasForComponent(properties, SSL_GATEWAY_ALIAS);
-      case HTTP_SERVICE:
+      case WEB:
         return getAliasForComponent(properties, SSL_HTTP_SERVICE_ALIAS);
       case JMX:
         return getAliasForComponent(properties, SSL_JMX_ALIAS);
@@ -208,9 +208,9 @@ public class SSLConfigurationFactoryTest extends JUnit4DistributedTestCase {
     return !StringUtils.isEmpty(aliasProperty) ? aliasProperty : properties.getProperty(SSL_DEFAULT_ALIAS);
   }
 
-  private boolean isSSLComponentEnabled(final SecurableComponent expectedSecurableComponent, final SecurableComponent[] SecurableComponents) {
-    for (SecurableComponent SecurableComponent : SecurableComponents) {
-      if (SecurableComponent.ALL.equals(SecurableComponent) || SecurableComponent.equals(expectedSecurableComponent)) {
+  private boolean isSSLComponentEnabled(final SecurableCommunicationChannel expectedSecurableComponent, final SecurableCommunicationChannel[] SecurableComponents) {
+    for (SecurableCommunicationChannel securableCommunicationChannel : SecurableComponents) {
+      if (securableCommunicationChannel.ALL.equals(securableCommunicationChannel) || securableCommunicationChannel.equals(expectedSecurableComponent)) {
         return true;
       }
     }


[39/50] [abbrv] incubator-geode git commit: Merge branch 'develop' into feature/GEODE-420

Posted by ud...@apache.org.
Merge branch 'develop' into feature/GEODE-420

# Conflicts:
#	geode-core/src/main/java/com/gemstone/gemfire/management/internal/JmxManagerLocatorRequest.java
#	geode-core/src/main/java/com/gemstone/gemfire/management/internal/cli/commands/ShellCommands.java


Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/d4cca873
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/d4cca873
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/d4cca873

Branch: refs/heads/develop
Commit: d4cca8737b4dafb727f90be28ad0fb8e097172bf
Parents: c6f5997 a4c38a4
Author: Udo Kohlmeyer <uk...@pivotal.io>
Authored: Wed Sep 7 02:19:15 2016 +1000
Committer: Udo Kohlmeyer <uk...@pivotal.io>
Committed: Wed Sep 7 02:19:15 2016 +1000

----------------------------------------------------------------------
 .../internal/JmxManagerLocatorRequest.java      |   8 +-
 .../internal/cli/commands/ShellCommands.java    |  13 +-
 .../ConnectToLocatorSSLDUnitTest.java           | 136 +++++++++++++++++++
 3 files changed, 150 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/d4cca873/geode-core/src/main/java/com/gemstone/gemfire/management/internal/JmxManagerLocatorRequest.java
----------------------------------------------------------------------
diff --cc geode-core/src/main/java/com/gemstone/gemfire/management/internal/JmxManagerLocatorRequest.java
index 495f64d,ac250d0..39f914f
--- a/geode-core/src/main/java/com/gemstone/gemfire/management/internal/JmxManagerLocatorRequest.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/management/internal/JmxManagerLocatorRequest.java
@@@ -88,8 -85,11 +85,13 @@@ public class JmxManagerLocatorRequest i
          distributionConfigProps.putAll(sslConfigProps);
        }
  
+       // re-initialize the SocketCreator with the sslConfigProps. Note this initializes the SocketCreator with cluster-ssl-* settings since
+       // we are connecting to the locator only.
 -      SocketCreator.getDefaultInstance(distributionConfigProps);
++      //TODO Udo: Look into this
++      // SocketCreator.getDefaultInstance(distributionConfigProps);
+ 
 -      Object responseFromServer = TcpClient.requestToServer(networkAddress, locatorPort, SINGLETON, msTimeout);
 +      TcpClient client = new TcpClient();
 +      Object responseFromServer = client.requestToServer(networkAddress, locatorPort, SINGLETON, msTimeout);
  
        return (JmxManagerLocatorResponse) responseFromServer;
      }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/d4cca873/geode-core/src/main/java/com/gemstone/gemfire/management/internal/cli/commands/ShellCommands.java
----------------------------------------------------------------------


[11/50] [abbrv] incubator-geode git commit: Merge branch 'develop' into feature/GEODE-420

Posted by ud...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/dfbc88b2/geode-core/src/test/java/com/gemstone/gemfire/internal/statistics/GemFireStatSamplerIntegrationTest.java
----------------------------------------------------------------------
diff --cc geode-core/src/test/java/com/gemstone/gemfire/internal/statistics/GemFireStatSamplerIntegrationTest.java
index 0000000,ff7c34d..0e87a47
mode 000000,100644..100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/statistics/GemFireStatSamplerIntegrationTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/statistics/GemFireStatSamplerIntegrationTest.java
@@@ -1,0 -1,612 +1,616 @@@
+ /*
+  * Licensed to the Apache Software Foundation (ASF) under one or more
+  * contributor license agreements.  See the NOTICE file distributed with
+  * this work for additional information regarding copyright ownership.
+  * The ASF licenses this file to You under the Apache License, Version 2.0
+  * (the "License"); you may not use this file except in compliance with
+  * the License.  You may obtain a copy of the License at
+  *
+  *      http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  */
+ package com.gemstone.gemfire.internal.statistics;
+ 
+ import static com.gemstone.gemfire.distributed.ConfigurationProperties.*;
+ import static org.junit.Assert.*;
+ import static org.junit.Assume.*;
+ 
+ import java.io.File;
+ import java.lang.reflect.Method;
+ import java.util.Arrays;
+ import java.util.List;
+ import java.util.Properties;
+ import java.util.concurrent.atomic.AtomicBoolean;
+ import java.util.concurrent.atomic.AtomicInteger;
+ 
+ import org.apache.logging.log4j.Logger;
+ import org.junit.After;
+ import org.junit.Assert;
+ import org.junit.Before;
+ import org.junit.Rule;
+ import org.junit.Test;
+ import org.junit.experimental.categories.Category;
+ import org.junit.rules.TemporaryFolder;
+ import org.junit.rules.TestName;
+ 
+ import com.gemstone.gemfire.Statistics;
+ import com.gemstone.gemfire.StatisticsType;
+ import com.gemstone.gemfire.distributed.DistributedSystem;
+ import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem;
+ import com.gemstone.gemfire.internal.GemFireVersion;
+ import com.gemstone.gemfire.internal.PureJavaMode;
+ import com.gemstone.gemfire.internal.SocketCreator;
+ import com.gemstone.gemfire.internal.cache.control.HeapMemoryMonitor;
+ import com.gemstone.gemfire.internal.logging.LogService;
++import com.gemstone.gemfire.internal.net.SocketCreator;
++import com.gemstone.gemfire.internal.statistics.SampleCollector;
++import com.gemstone.gemfire.internal.statistics.StatArchiveHandler;
++import com.gemstone.gemfire.internal.statistics.StatArchiveHandlerConfig;
+ import com.gemstone.gemfire.internal.statistics.GemFireStatSampler.LocalStatListenerImpl;
+ import com.gemstone.gemfire.internal.statistics.platform.OsStatisticsFactory;
+ import com.gemstone.gemfire.internal.statistics.platform.ProcessStats;
+ import com.gemstone.gemfire.internal.stats50.VMStats50;
+ import com.gemstone.gemfire.internal.util.StopWatch;
+ import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
+ 
+ /**
+  * Integration tests for {@link GemFireStatSampler}.
+  *
+  * @since GemFire 7.0
+  */
+ @Category(IntegrationTest.class)
+ public class GemFireStatSamplerIntegrationTest extends StatSamplerTestCase {
+   
+   private static final Logger logger = LogService.getLogger();
+   
+   private static final int STAT_SAMPLE_RATE = 1000;
+ 
+   private DistributedSystem system;
+   private File testDir;
+ 
+   @Rule
+   public TemporaryFolder temporaryFolder = new TemporaryFolder();
+ 
+   @Rule
+   public TestName testName = new TestName();
 -  
++
+   @Before
+   public void setUp() throws Exception {
+     this.testDir = this.temporaryFolder.getRoot();
+     assertTrue(this.testDir.exists());
+   }
+ 
+   /**
+    * Removes the loner DistributedSystem at the end of each test.
+    */
+   @After
+   public void tearDown() throws Exception {
+     System.clearProperty(GemFireStatSampler.TEST_FILE_SIZE_LIMIT_IN_KB_PROPERTY);
+     disconnect();
+   }
+ 
+   /**
+    * Tests the majority of getters and the basic functionality of the sampler.
+    * 
+    * This test is skipped when running on Windows 7 because ProcessStats is not created for this OS. See #45395.
+    */
+   @Test
+   public void testBasics() throws Exception {
+     final String osName = System.getProperty("os.name", "unknown");
+     assumeFalse(osName.equals("Windows 7"));
+ 
+     connect(createGemFireProperties());
+ 
+     GemFireStatSampler statSampler = getGemFireStatSampler();
+     assertTrue(statSampler.waitForInitialization(5000));
+ 
+     assertEquals(0, statSampler.getArchiveFileSizeLimit());
+     assertEquals(0, statSampler.getArchiveDiskSpaceLimit());
+     assertEquals(STAT_SAMPLE_RATE, statSampler.getSampleRate());
+     assertEquals(true, statSampler.isSamplingEnabled());
+ 
+     int statsCount = statSampler.getStatisticsManager().getStatisticsCount();
+ 
+     assertEquals(statsCount, statSampler.getStatisticsModCount());
+     assertEquals(statsCount, statSampler.getStatisticsManager().getStatisticsCount());
+     assertEquals(statsCount, statSampler.getStatistics().length);
+ 
+     Assert.assertEquals(getStatisticsManager().getId(), statSampler.getSystemId());
+     assertTrue(statSampler.getSystemStartTime() < System.currentTimeMillis());
+     Assert.assertEquals(SocketCreator.getHostName(SocketCreator.getLocalHost()),
+                  statSampler.getSystemDirectoryPath());
+ 
+     AllStatistics allStats = new AllStatistics(statSampler);
+ 
+     VMStatsContract vmStats = statSampler.getVMStats();
+     assertNotNull(vmStats);
+     assertTrue(vmStats instanceof VMStats50);
+     /* NOTE: VMStats50 is not an instance of Statistics but instead its
+      * instance contains 3 instances of Statistics:
+      * 1) vmStats
+      * 2) heapMemStats
+      * 3) nonHeapMemStats
+      */
+ 
+     Method getProcessStats = getGemFireStatSampler().getClass().getMethod("getProcessStats");
+     assertNotNull(getProcessStats);
+ 
+     ProcessStats processStats = statSampler.getProcessStats();
+     if (osName.equals("SunOS")) {
+       assertNotNull(processStats);
+       assertTrue(PureJavaMode.osStatsAreAvailable());
+       assertTrue(allStats.containsStatisticsType("SolarisProcessStats"));
+       assertTrue(allStats.containsStatisticsType("SolarisSystemStats"));
+     } else if (osName.startsWith("Windows")) {
+       // fails on Windows 7: 45395 "ProcessStats are not created on Windows 7"
+       assertNotNull("ProcessStats were not created on " + osName, processStats);
+       assertTrue(PureJavaMode.osStatsAreAvailable());
+       assertTrue(allStats.containsStatisticsType("WindowsProcessStats"));
+       assertTrue(allStats.containsStatisticsType("WindowsSystemStats"));
+     } else if (osName.startsWith("Linux")) {
+       assertNotNull(processStats);
+       assertTrue(PureJavaMode.osStatsAreAvailable());
+       assertTrue(allStats.containsStatisticsType("LinuxProcessStats"));
+       assertTrue(allStats.containsStatisticsType("LinuxSystemStats"));
+     } else if (osName.equals("Mac OS X")) {
+       assertNull(processStats);
+       assertFalse(PureJavaMode.osStatsAreAvailable());
+       assertFalse(allStats.containsStatisticsType("OSXProcessStats"));
+       assertFalse(allStats.containsStatisticsType("OSXSystemStats"));
+     } else {
+       assertNull(processStats);
+     }
+ 
+     String productDesc = statSampler.getProductDescription();
+     assertTrue(productDesc.contains(GemFireVersion.getGemFireVersion()));
+     assertTrue(productDesc.contains(GemFireVersion.getBuildId()));
+     assertTrue(productDesc.contains(GemFireVersion.getSourceDate()));
+   }
+ 
+   /**
+    * Tests that the configured archive file is created and exists.
+    */
+   @Test
+   public void testArchiveFileExists() throws Exception {
+     final String dir = this.testDir.getAbsolutePath();
+     final String archiveFileName = dir + File.separator + this.testName.getMethodName() + ".gfs";
+     
+     final File archiveFile1 = new File(dir + File.separator + this.testName.getMethodName() + ".gfs");
+     
+     Properties props = createGemFireProperties();
+     props.setProperty(STATISTIC_ARCHIVE_FILE, archiveFileName);
+     connect(props);
+ 
+     GemFireStatSampler statSampler = getGemFireStatSampler();
+     assertTrue(statSampler.waitForInitialization(5000));
+ 
+     final File archiveFile = statSampler.getArchiveFileName();
+     assertNotNull(archiveFile);
+     assertEquals(archiveFile1, archiveFile);
+ 
+     waitForFileToExist(archiveFile, 5000, 10);
+     
+     assertTrue("File name incorrect: archiveFile.getName()=" + archiveFile.getName() +
+         " archiveFile.getAbsolutePath()=" + archiveFile.getAbsolutePath() +
+         " getCanonicalPath()" + archiveFile.getCanonicalPath(),
+         archiveFileName.contains(archiveFile.getName()));
+   }
+ 
+   /**
+    * Tests the statistics sample rate within an acceptable margin of error.
+    */
+   @Test
+   public void testSampleRate() throws Exception {
+     connect(createGemFireProperties());
+ 
+     GemFireStatSampler statSampler = getGemFireStatSampler();
+     assertTrue(statSampler.waitForInitialization(5000));
+ 
+     assertEquals(STAT_SAMPLE_RATE, statSampler.getSampleRate());
+ 
+     assertTrue(getStatisticsManager().getStatListModCount() > 0);
+ 
+     List<Statistics> statistics = getStatisticsManager().getStatsList();
+     assertNotNull(statistics);
+     assertTrue(statistics.size() > 0);
+ 
+     StatisticsType statSamplerType = getStatisticsManager().findType("StatSampler");
+     Statistics[] statsArray = getStatisticsManager().findStatisticsByType(statSamplerType);
+     assertEquals(1, statsArray.length);
+ 
+     final Statistics statSamplerStats = statsArray[0];
+     final int initialSampleCount = statSamplerStats.getInt("sampleCount");
+     final int expectedSampleCount = initialSampleCount + 2;
+ 
+     waitForExpectedStatValue(statSamplerStats, "sampleCount", expectedSampleCount, 5000, 10);
+   }
+ 
+   /**
+    * Adds a LocalStatListener for an individual stat. Validates that it
+    * receives notifications. Removes the listener and validates that it
+    * was in fact removed and no longer receives notifications.
+    */
+   @Test
+   public void testLocalStatListener() throws Exception {
+     connect(createGemFireProperties());
+ 
+     GemFireStatSampler statSampler = getGemFireStatSampler();
+     assertTrue(statSampler.waitForInitialization(5000));
+ 
+     Method getLocalListeners = getGemFireStatSampler().getClass().getMethod("getLocalListeners");
+     assertNotNull(getLocalListeners);
+ 
+     Method addLocalStatListener = getGemFireStatSampler().getClass().getMethod("addLocalStatListener", LocalStatListener.class, Statistics.class, String.class);
+     assertNotNull(addLocalStatListener);
+ 
+     Method removeLocalStatListener = getGemFireStatSampler().getClass().getMethod("removeLocalStatListener", LocalStatListener.class);
+     assertNotNull(removeLocalStatListener);
+ 
+     // validate that there are no listeners
+     assertTrue(statSampler.getLocalListeners().isEmpty());
+ 
+     // add a listener for sampleCount stat in StatSampler statistics
+     StatisticsType statSamplerType = getStatisticsManager().findType("StatSampler");
+     Statistics[] statsArray = getStatisticsManager().findStatisticsByType(statSamplerType);
+     assertEquals(1, statsArray.length);
+ 
+     final Statistics statSamplerStats = statsArray[0];
+     final String statName = "sampleCount";
+     final AtomicInteger sampleCountValue = new AtomicInteger(0);
+     final AtomicInteger sampleCountChanged = new AtomicInteger(0);
+ 
+     LocalStatListener listener = new LocalStatListener() {
+       public void statValueChanged(double value) {
+         sampleCountValue.set((int)value);
+         sampleCountChanged.incrementAndGet();
+       }
+     };
+ 
+     statSampler.addLocalStatListener(listener, statSamplerStats, statName);
+     assertTrue(statSampler.getLocalListeners().size() == 1);
+ 
+     // there's a level of indirection here and some protected member fields
+     LocalStatListenerImpl lsli = (LocalStatListenerImpl)
+         statSampler.getLocalListeners().iterator().next();
+     assertEquals("sampleCount", lsli.stat.getName());
+ 
+     // wait for the listener to update 4 times
+     final int expectedChanges = 4;
+     boolean done = false;
+     try {
+       for (StopWatch time = new StopWatch(true); !done && time.elapsedTimeMillis() < 5000; done = (sampleCountChanged.get() >= expectedChanges)) {
+         Thread.sleep(10);
+       }
+     } catch (InterruptedException e) {
+       Thread.currentThread().interrupt();
+     }
+     assertTrue("Waiting for sampleCountChanged >= " + expectedChanges, done);
+ 
+     // validate that the listener fired and updated the value
+     assertTrue(sampleCountValue.get() > 0);
+     assertTrue(sampleCountChanged.get() >= expectedChanges);
+ 
+     // remove the listener
+     statSampler.removeLocalStatListener(listener);
+     final int expectedSampleCountValue = sampleCountValue.get();
+     final int expectedSampleCountChanged = sampleCountChanged.get();
+ 
+     // validate that there are no listeners now
+     assertTrue(statSampler.getLocalListeners().isEmpty());
+ 
+     // wait for 2 stat samples to occur
+     waitForStatSample(statSamplerStats, expectedSampleCountValue, 5000, 10);
+ 
+     // validate that the listener did not fire
+     assertEquals(expectedSampleCountValue, sampleCountValue.get());
+     assertEquals(expectedSampleCountChanged, sampleCountChanged.get());
+   }
+ 
+   /**
+    * Invokes stop() and then validates that the sampler did in fact stop.
+    */
+   @Test
+   public void testStop() throws Exception {
+     connect(createGemFireProperties());
+ 
+     GemFireStatSampler statSampler = getGemFireStatSampler();
+     assertTrue(statSampler.waitForInitialization(5000));
+ 
+     // validate the stat sampler is running
+     StatisticsType statSamplerType = getStatisticsManager().findType("StatSampler");
+     Statistics[] statsArray = getStatisticsManager().findStatisticsByType(statSamplerType);
+     assertEquals(1, statsArray.length);
+ 
+     final Statistics statSamplerStats = statsArray[0];
+     final int initialSampleCount = statSamplerStats.getInt("sampleCount");
+     final int expectedSampleCount = initialSampleCount + 2;
+ 
+     waitForStatSample(statSamplerStats, expectedSampleCount, 20000, 10);
+ 
+     // stop the stat sampler
+     statSampler.stop();
+ 
+     // validate the stat sampler has stopped
+     final int stoppedSampleCount = statSamplerStats.getInt("sampleCount");
+ 
+     // the following should timeout rather than complete
+     assertStatValueDoesNotChange(statSamplerStats, "sampleCount", stoppedSampleCount, 5000, 10);
+ 
+     assertEquals(stoppedSampleCount, statSamplerStats.getInt("sampleCount"));
+   }
+ 
+   /**
+    * Verifies that archive rolling works correctly when archive-file-size-limit
+    * is specified.
+    */
+   @Test
+   public void testArchiveRolling() throws Exception {
+     final String dirName = this.testDir.getAbsolutePath() + File.separator + this.testName;
+     new File(dirName).mkdirs();
+     final String archiveFileName = dirName + File.separator + this.testName + ".gfs";
+ 
+     final File archiveFile = new File(archiveFileName);
+     final File archiveFile1 = new File(dirName + File.separator + this.testName + "-01-01.gfs");
+     final File archiveFile2 = new File(dirName + File.separator + this.testName + "-01-02.gfs");
+     final File archiveFile3 = new File(dirName + File.separator + this.testName + "-01-03.gfs");
+ 
+     // set the system property to use KB instead of MB for file size
+     System.setProperty(HostStatSampler.TEST_FILE_SIZE_LIMIT_IN_KB_PROPERTY, "true");
+     Properties props = createGemFireProperties();
+     props.setProperty(ARCHIVE_FILE_SIZE_LIMIT, "1");
+     props.setProperty(ARCHIVE_DISK_SPACE_LIMIT, "0");
+     props.setProperty(STATISTIC_ARCHIVE_FILE, archiveFileName);
+     connect(props);
+ 
+     assertTrue(getGemFireStatSampler().waitForInitialization(5000));
+ 
+     boolean done = false;
+     try {
+       for (StopWatch time = new StopWatch(true); !done && time.elapsedTimeMillis() < 4000; done = (getSampleCollector() != null && getSampleCollector().getStatArchiveHandler() != null)) {
+         Thread.sleep(10);
+       }
+     } catch (InterruptedException e) {
+       Thread.currentThread().interrupt();
+     }
+     assertTrue("Waiting for getSampleCollector().getStatArchiveHandler() to not be null", done);  
+ 
+     StatArchiveHandler statArchiveHandler = getSampleCollector().getStatArchiveHandler();
+     StatArchiveHandlerConfig config = statArchiveHandler.getStatArchiveHandlerConfig();
+     assertEquals(1 * 1024, config.getArchiveFileSizeLimit());
+     
+     waitForFileToExist(archiveFile, 4000, 10);
+     waitForFileToExist(archiveFile1, 4000, 10);
+     waitForFileToExist(archiveFile2, 4000, 10);
+     waitForFileToExist(archiveFile3, 4000, 10);
+   }
+ 
+   /**
+    * Verifies that archive removal works correctly when archive-disk-space-limit
+    * is specified.
+    */
+   @Test
+   public void testArchiveRemoval() throws Exception {
+     final String dirName = this.testDir.getAbsolutePath();// + File.separator + this.testName;
+     new File(dirName).mkdirs();
+     final String archiveFileName = dirName + File.separator + this.testName + ".gfs";
+ 
+     final File archiveFile = new File(archiveFileName);
+     final File archiveFile1 = new File(dirName + File.separator + this.testName + "-01-01.gfs");
+     final File archiveFile2 = new File(dirName + File.separator + this.testName + "-01-02.gfs");
+     final File archiveFile3 = new File(dirName + File.separator + this.testName + "-01-03.gfs");
+     final File archiveFile4 = new File(dirName + File.separator + this.testName + "-01-04.gfs");
+ 
+     final int sampleRate = 1000;
+     
+     // set the system property to use KB instead of MB for file size
+     System.setProperty(HostStatSampler.TEST_FILE_SIZE_LIMIT_IN_KB_PROPERTY, "true");
+     Properties props = createGemFireProperties();
+     props.setProperty(STATISTIC_ARCHIVE_FILE, archiveFileName);
+     props.setProperty(ARCHIVE_FILE_SIZE_LIMIT, "1");
+     props.setProperty(ARCHIVE_DISK_SPACE_LIMIT, "12");
+     props.setProperty(STATISTIC_SAMPLE_RATE, String.valueOf(sampleRate));
+     connect(props);
+ 
+     assertTrue(getGemFireStatSampler().waitForInitialization(5000));
+ 
+     boolean exists1 = false;
+     boolean exists2 = false;
+     boolean exists3 = false;
+     boolean exists4 = false;
+     boolean exists = false;
+     boolean done = false;
+     try {
+       for (StopWatch time = new StopWatch(true); !done && time.elapsedTimeMillis() < 10*sampleRate;) {
+         exists1 = exists1 || archiveFile1.exists();
+         exists2 = exists2 || archiveFile2.exists();
+         exists3 = exists3 || archiveFile3.exists();
+         exists4 = exists4 || archiveFile4.exists();
+         exists = exists || archiveFile.exists();
+         done = exists1 && exists2 && exists3 && exists4 && exists;      
+         if (!done) {
+           Thread.sleep(10);
+         }
+       }
+     } catch (InterruptedException e) {
+       Thread.currentThread().interrupt();
+     }
+     assertTrue("Waiting for archive files to exist:" 
+         + " exists1=" + exists1
+         + " exists2=" + exists2
+         + " exists3=" + exists3
+         + " exists4=" + exists4
+         + " exists=" + exists, done);
+     
+     waitForFileToDelete(archiveFile1, 10*sampleRate, 10);
+   }
+ 
+   @Test
+   public void testLocalStatListenerRegistration() throws Exception {
+     connect(createGemFireProperties());
+ 
+     final GemFireStatSampler statSampler = getGemFireStatSampler();
+     statSampler.waitForInitialization(5000);
+ 
+     final AtomicBoolean flag = new AtomicBoolean(false);
+     final LocalStatListener listener = new LocalStatListener(){
+       public void statValueChanged(double value) {
+         flag.set(true);
+       }
+     };
+     
+     final String tenuredPoolName = HeapMemoryMonitor.getTenuredMemoryPoolMXBean().getName();
+     logger.info("TenuredPoolName: {}", tenuredPoolName);
+     
+     final List<Statistics> list = ((StatisticsManager)this.system).getStatsList();
+     assertFalse(list.isEmpty());
+ 
+     boolean done = false;
+     try {
+       for (StopWatch time = new StopWatch(true); !done && time.elapsedTimeMillis() < 5000;) {
+         Thread.sleep(10);
+         int i=0;
+         synchronized (list) {
+           for (Object obj : list) {
+             ++i;
+             logger.info("List:{}:{}", i, obj);
+             if (obj instanceof StatisticsImpl) {
+               StatisticsImpl si = (StatisticsImpl)obj;
+               logger.info("stat:{}", si.getTextId());
+               if (si.getTextId().contains(tenuredPoolName)) {
+                 statSampler.addLocalStatListener(listener, si, "currentUsedMemory");
+                 done = true;
+               }
+             }
+           }
+         }
+         //done = false;
+       }
+     } catch (InterruptedException e) {
+       Thread.currentThread().interrupt();
+     }
+     assertTrue("Waiting for " + tenuredPoolName + " statistics to be added to create listener for", done);
+     
+     assertTrue("expected at least one stat listener, found " +
+         statSampler.getLocalListeners().size(), 
+         statSampler.getLocalListeners().size() > 0);     
+     
+     long maxTenuredMemory = HeapMemoryMonitor.getTenuredMemoryPoolMXBean()
+                           .getUsage().getMax();
+ 
+     //byte[] bytes = new byte[1024 * 1024 * 10];
+     byte[] bytes = new byte[(int)(maxTenuredMemory*0.01)];
+     Arrays.fill(bytes, Byte.MAX_VALUE);
+ 
+     done = false;
+     try {
+       for (StopWatch time = new StopWatch(true); !done && time.elapsedTimeMillis() < 5000; done = (flag.get())) {
+         Thread.sleep(10);
+       }
+     } catch (InterruptedException e) {
+       Thread.currentThread().interrupt();
+     }
+     assertTrue("Waiting for listener to set flag to true", done);
+   }
+   
+   @Override
+   protected StatisticsManager getStatisticsManager() {
+     return (InternalDistributedSystem)this.system;
+   }
+ 
+   protected OsStatisticsFactory getOsStatisticsFactory() {
+     return (InternalDistributedSystem)this.system;
+   }
+ 
+   private GemFireStatSampler getGemFireStatSampler() {
+     return ((InternalDistributedSystem)this.system).getStatSampler();
+   }
+   
+   private SampleCollector getSampleCollector() {
+     return getGemFireStatSampler().getSampleCollector();
+   }
+ 
+   private Properties createGemFireProperties() {
+     Properties props = new Properties();
+     props.setProperty(STATISTIC_SAMPLING_ENABLED, "true"); // TODO: test true/false
+     props.setProperty(ENABLE_TIME_STATISTICS, "true"); // TODO: test true/false
+     props.setProperty(STATISTIC_SAMPLE_RATE, String.valueOf(STAT_SAMPLE_RATE));
+     props.setProperty(ARCHIVE_FILE_SIZE_LIMIT, "0");
+     props.setProperty(ARCHIVE_DISK_SPACE_LIMIT, "0");
+     props.setProperty(MCAST_PORT, "0");
+     props.setProperty(LOCATORS, "");
+     return props;
+   }
+ 
+   /**
+    * Creates a fresh loner DistributedSystem for each test. Note
+    * that the DistributedSystem is the StatisticsManager/Factory/etc.
+    */
+   @SuppressWarnings("deprecation")
+   private void connect(Properties props) {
+     this.system = DistributedSystem.connect(props);
+   }
+ 
+   @SuppressWarnings("deprecation")
+   private void disconnect() {
+     if (this.system != null) {
+       this.system.disconnect();
+       this.system = null;
+     }
+   }
+ 
+ //  public static class AsyncInvoker {
+ //    public static AsyncInvocation invokeAsync(Runnable r) {
+ //      return invokeAsync(r, "run", new Object[0]);
+ //    }
+ //    public static AsyncInvocation invokeAsync(Callable c) {
+ //      return invokeAsync(c, "call", new Object[0]);
+ //    }
+ //    public static AsyncInvocation invokeAsync(
+ //        final Object o, final String methodName, final Object[] args) {
+ //      AsyncInvocation ai =
+ //        new AsyncInvocation(o, methodName, new Runnable() {
+ //          public void run() {
+ //            MethExecutorResult result = 
+ //                MethExecutor.executeObject(o, methodName, args);
+ //            if (result.exceptionOccurred()) {
+ //              throw new AsyncInvocationException(result.getException());
+ //            }
+ //            AsyncInvocation.setReturnValue(result.getResult());
+ //          }
+ //      });
+ //      ai.start();
+ //      return ai;
+ //    }
+ //    
+ //    public static class AsyncInvocationException extends RuntimeException {
+ //      private static final long serialVersionUID = -5522299018650622945L;
+ //      /**
+ //       * Creates a new <code>AsyncInvocationException</code>.
+ //       */
+ //      public AsyncInvocationException(String message) {
+ //        super(message);
+ //      }
+ //
+ //      /**
+ //       * Creates a new <code>AsyncInvocationException</code> that was
+ //       * caused by a given exception
+ //       */
+ //      public AsyncInvocationException(String message, Throwable thr) {
+ //        super(message, thr);
+ //      }
+ //
+ //      /**
+ //       * Creates a new <code>AsyncInvocationException</code> that was
+ //       * caused by a given exception
+ //       */
+ //      public AsyncInvocationException(Throwable thr) {
+ //        super(thr.getMessage(), thr);
+ //      }
+ //    }
+ //  }
+ }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/dfbc88b2/geode-core/src/test/java/com/gemstone/gemfire/internal/statistics/SimpleStatSamplerIntegrationTest.java
----------------------------------------------------------------------
diff --cc geode-core/src/test/java/com/gemstone/gemfire/internal/statistics/SimpleStatSamplerIntegrationTest.java
index 0000000,d86b968..f3b80a7
mode 000000,100755..100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/statistics/SimpleStatSamplerIntegrationTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/statistics/SimpleStatSamplerIntegrationTest.java
@@@ -1,0 -1,351 +1,351 @@@
+ /*
+  * Licensed to the Apache Software Foundation (ASF) under one or more
+  * contributor license agreements.  See the NOTICE file distributed with
+  * this work for additional information regarding copyright ownership.
+  * The ASF licenses this file to You under the Apache License, Version 2.0
+  * (the "License"); you may not use this file except in compliance with
+  * the License.  You may obtain a copy of the License at
+  *
+  *      http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  */
+ package com.gemstone.gemfire.internal.statistics;
+ 
+ import static org.junit.Assert.*;
+ 
+ import java.io.File;
+ import java.lang.reflect.Method;
+ import java.util.List;
+ 
+ import org.junit.After;
+ import org.junit.Assert;
+ import org.junit.Before;
+ import org.junit.Rule;
+ import org.junit.Test;
+ import org.junit.experimental.categories.Category;
+ import org.junit.rules.TemporaryFolder;
+ import org.junit.rules.TestName;
+ 
+ import com.gemstone.gemfire.CancelCriterion;
+ import com.gemstone.gemfire.Statistics;
+ import com.gemstone.gemfire.StatisticsType;
 -import com.gemstone.gemfire.internal.SocketCreator;
++import com.gemstone.gemfire.internal.net.SocketCreator;
+ import com.gemstone.gemfire.internal.stats50.VMStats50;
+ import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
+ 
+ /**
+  * Integration tests for {@link SimpleStatSampler}.
+  * 
+  * @since GemFire 7.0
+  */
+ @Category(IntegrationTest.class)
+ public class SimpleStatSamplerIntegrationTest extends StatSamplerTestCase {
+ 
+   private LocalStatisticsFactory statisticsFactory;
+   private File testDir;
+ 
+   @Rule
+   public TemporaryFolder temporaryFolder = new TemporaryFolder();
+ 
+   @Rule
+   public TestName testName = new TestName();
+ 
+   @Before
+   public void setUp() throws Exception {
+     this.testDir = this.temporaryFolder.getRoot();
+     assertTrue(this.testDir.exists());
+     System.setProperty(SimpleStatSampler.ARCHIVE_FILE_NAME_PROPERTY,
+         this.testDir.getAbsolutePath() + File.separator + SimpleStatSampler.DEFAULT_ARCHIVE_FILE_NAME);
+   }
+ 
+   @After
+   public void tearDown() throws Exception {
+     System.clearProperty(SimpleStatSampler.ARCHIVE_FILE_NAME_PROPERTY);
+     System.clearProperty(SimpleStatSampler.FILE_SIZE_LIMIT_PROPERTY);
+     System.clearProperty(SimpleStatSampler.DISK_SPACE_LIMIT_PROPERTY);
+     System.clearProperty(SimpleStatSampler.SAMPLE_RATE_PROPERTY);
+     closeStatisticsFactory();
+   }
+   
+   /**
+    * Tests the majority of getters and the basic functionality of the sampler.
+    */
+   @Test
+   public void testBasics() throws Exception {
+     initStatisticsFactory();
+ 
+     SimpleStatSampler statSampler = getSimpleStatSampler();
+     assertTrue(statSampler.waitForInitialization(5000));
+     
+     assertEquals(new File(System.getProperty(SimpleStatSampler.ARCHIVE_FILE_NAME_PROPERTY)), 
+                  statSampler.getArchiveFileName());
+     assertEquals(0, statSampler.getArchiveFileSizeLimit());
+     assertEquals(0, statSampler.getArchiveDiskSpaceLimit());
+     assertEquals(SimpleStatSampler.DEFAULT_SAMPLE_RATE, statSampler.getSampleRate());
+     assertEquals(true, statSampler.isSamplingEnabled());
+     
+     int statsCount = statSampler.getStatisticsManager().getStatisticsCount();
+     
+     assertEquals(statsCount, statSampler.getStatisticsModCount());
+     assertEquals(statsCount, statSampler.getStatisticsManager().getStatisticsCount());
+     assertEquals(statsCount, statSampler.getStatistics().length);
+     
+     assertTrue(statsCount > 0);
+     
+     Assert.assertEquals(getStatisticsManager().getId(), statSampler.getSystemId());
+     assertTrue(statSampler.getSystemStartTime() <= System.currentTimeMillis());
 -    Assert.assertEquals(SocketCreator.getHostName(SocketCreator.getLocalHost()),
++    assertEquals(SocketCreator.getHostName(SocketCreator.getLocalHost()),
+                  statSampler.getSystemDirectoryPath());
+ 
+     VMStatsContract vmStats = statSampler.getVMStats();
+     assertNotNull(vmStats);
+     assertTrue(vmStats instanceof VMStats50);
+     /* NOTE: VMStats50 is not an instance of Statistics but instead its
+      * instance contains 3 instances of Statistics:
+      * 1) vmStats
+      * 2) heapMemStats
+      * 3) nonHeapMemStats
+      */
+     
+     Method getProcessStats = null;
+     try {
+       getProcessStats = SimpleStatSampler.class.getMethod("getProcessStats");
+       fail("SimpleStatSampler should not have the method getProcessStats()");
+     } catch (NoSuchMethodException exected) {
+       // passed
+     }
+     assertNull(getProcessStats);
+     
+     assertEquals("Unknown product", statSampler.getProductDescription());
+   }
+ 
+   /**
+    * Tests that the configured archive file is created and exists. 
+    */
+   @Test
+   public void testArchiveFileExists() throws Exception {
+     final String dir = this.testDir.getAbsolutePath();
+     final String archiveFileName = dir + File.separator + this.testName + ".gfs";
+     final File archiveFile1 = new File(dir + File.separator + this.testName + ".gfs");
+     System.setProperty(SimpleStatSampler.ARCHIVE_FILE_NAME_PROPERTY, archiveFileName);
+     initStatisticsFactory();
+     
+     SimpleStatSampler statSampler = getSimpleStatSampler();
+     assertTrue(statSampler.waitForInitialization(5000));
+     
+     final File archiveFile = statSampler.getArchiveFileName();
+     assertNotNull(archiveFile);
+     assertEquals(archiveFile1, archiveFile);
+ 
+     waitForFileToExist(archiveFile, 5000, 10);
+     
+     assertTrue("File name incorrect: archiveFile.getName()=" + archiveFile.getName() +
+         " archiveFile.getAbsolutePath()=" + archiveFile.getAbsolutePath() +
+         " getCanonicalPath()" + archiveFile.getCanonicalPath(), 
+         archiveFileName.contains(archiveFile.getName()));
+   }
+   
+   /**
+    * Tests the statistics sample rate within an acceptable margin of error.
+    */
+   @Test
+   public void testSampleRate() throws Exception {
+     initStatisticsFactory();
+ 
+     SimpleStatSampler statSampler = getSimpleStatSampler();
+     assertTrue(statSampler.waitForInitialization(5000));
+ 
+     assertEquals(SimpleStatSampler.DEFAULT_SAMPLE_RATE, statSampler.getSampleRate());
+     
+     assertTrue(getStatisticsManager().getStatListModCount() > 0);
+     
+     List<Statistics> statistics = getStatisticsManager().getStatsList();
+     assertNotNull(statistics);
+     assertTrue(statistics.size() > 0);
+     
+     StatisticsType statSamplerType = getStatisticsManager().findType("StatSampler");
+     Statistics[] statsArray = getStatisticsManager().findStatisticsByType(statSamplerType);
+     assertEquals(1, statsArray.length);
+     
+     final Statistics statSamplerStats = statsArray[0];
+     final int initialSampleCount = statSamplerStats.getInt("sampleCount");
+     final int expectedSampleCount = initialSampleCount + 2;
+     
+     waitForStatSample(statSamplerStats, expectedSampleCount, 20000, 10);
+   }
+   
+   /**
+    * Tests lack of methods for supporting LocalStatListener.
+    */
+   @Test
+   public void testLocalStatListener() throws Exception {
+     initStatisticsFactory();
+ 
+     SimpleStatSampler statSampler = getSimpleStatSampler();
+     assertTrue(statSampler.waitForInitialization(5000));
+     
+     Method getLocalListeners = null;
+     try {
+       getLocalListeners = getSimpleStatSampler().getClass().getMethod("getLocalListeners");
+       fail("SimpleStatSampler should not have the method getLocalListeners()");
+     } catch (NoSuchMethodException exected) {
+       // passed
+     }
+     assertNull(getLocalListeners);
+ 
+     Method addLocalStatListener = null;
+     try {
+       addLocalStatListener = getSimpleStatSampler().getClass().getMethod("addLocalStatListener", LocalStatListener.class, Statistics.class, String.class);
+       fail("SimpleStatSampler should not have the method addLocalStatListener()");
+     } catch (NoSuchMethodException exected) {
+       // passed
+     }
+     assertNull(addLocalStatListener);
+ 
+     Method removeLocalStatListener = null;
+     try {
+       removeLocalStatListener = getSimpleStatSampler().getClass().getMethod("removeLocalStatListener", LocalStatListener.class);
+       fail("SimpleStatSampler should not have the method addLocalStatListener()");
+     } catch (NoSuchMethodException exected) {
+       // passed
+     }
+     assertNull(removeLocalStatListener);
+   }
+   
+   /**
+    * Invokes stop() and then validates that the sampler did in fact stop.
+    */
+   @Test
+   public void testStop() throws Exception {
+     initStatisticsFactory();
+ 
+     SimpleStatSampler statSampler = getSimpleStatSampler();
+     assertTrue(statSampler.waitForInitialization(5000));
+ 
+     // validate the stat sampler is running
+     StatisticsType statSamplerType = getStatisticsManager().findType("StatSampler");
+     Statistics[] statsArray = getStatisticsManager().findStatisticsByType(statSamplerType);
+     assertEquals(1, statsArray.length);
+     
+     final Statistics statSamplerStats = statsArray[0];
+     final int initialSampleCount = statSamplerStats.getInt("sampleCount");
+     final int expectedSampleCount = initialSampleCount + 2;
+     
+     waitForStatSample(statSamplerStats, expectedSampleCount, 20000, 10);
+ 
+     // stop the stat sampler
+     statSampler.stop();
+     
+     // validate the stat sampler has stopped
+     final int stoppedSampleCount = statSamplerStats.getInt("sampleCount");
+ 
+     // the following should timeout without completing
+     assertStatValueDoesNotChange(statSamplerStats, "sampleCount", stoppedSampleCount, 5000, 10);
+ 
+     assertEquals(stoppedSampleCount, statSamplerStats.getInt("sampleCount"));
+   }
+ 
+   /**
+    * Verifies that archive rolling works correctly when archive-file-size-limit
+    * is specified. This feature is broken in SimpleStatSampler.
+    */
+   @Test
+   public void testArchiveRolling() throws Exception {
+     // set the system property to use KB instead of MB for file size
+     System.setProperty(HostStatSampler.TEST_FILE_SIZE_LIMIT_IN_KB_PROPERTY, "true");
+ 
+     final String dir = this.testDir.getAbsolutePath() + File.separator + this.testName;
+     new File(dir).mkdir();
+ 
+     final String archiveFileName = dir + File.separator + this.testName + ".gfs";
+     System.setProperty(SimpleStatSampler.ARCHIVE_FILE_NAME_PROPERTY, archiveFileName);
+     System.setProperty(SimpleStatSampler.FILE_SIZE_LIMIT_PROPERTY, "1");
+     System.setProperty(SimpleStatSampler.DISK_SPACE_LIMIT_PROPERTY, "0");
+     System.setProperty(SimpleStatSampler.SAMPLE_RATE_PROPERTY, "1000");
+     initStatisticsFactory();
+ 
+     final File archiveFile1 = new File(dir + File.separator + this.testName + "-01-01.gfs");
+     final File archiveFile2 = new File(dir + File.separator + this.testName + "-01-02.gfs");
+     final File archiveFile3 = new File(dir + File.separator + this.testName + "-01-03.gfs");
+     final File archiveFile4 = new File(dir + File.separator + this.testName + "-01-04.gfs");
+ 
+     assertTrue(getSimpleStatSampler().waitForInitialization(5000));
+ 
+     assertTrue(getSimpleStatSampler().fileSizeLimitInKB());
+     assertEquals(1024, getSimpleStatSampler().getArchiveFileSizeLimit());
+ 
+     waitForFileToExist(archiveFile1, 4000, 10);
+     waitForFileToExist(archiveFile2, 4000, 10);
+     waitForFileToExist(archiveFile3, 4000, 10);
+     waitForFileToExist(archiveFile4, 4000, 10);
+   }
+ 
+   /**
+    * Verifies that archive removal works correctly when archive-disk-space-limit
+    * is specified. This feature is broken in SimpleStatSampler. 
+    */
+   @Test
+   public void testArchiveRemoval() throws Exception {
+     // set the system property to use KB instead of MB for file size
+     System.setProperty(HostStatSampler.TEST_FILE_SIZE_LIMIT_IN_KB_PROPERTY, "true");
+ 
+     final String dir = this.testDir.getAbsolutePath() + File.separator + this.testName;
+     new File(dir).mkdir();
+     
+     final String archiveFileName = dir + File.separator + this.testName + ".gfs";
+     final int sampleRate = 1000;
+     System.setProperty(SimpleStatSampler.ARCHIVE_FILE_NAME_PROPERTY, archiveFileName);
+     System.setProperty(SimpleStatSampler.FILE_SIZE_LIMIT_PROPERTY, "1");
+     System.setProperty(SimpleStatSampler.DISK_SPACE_LIMIT_PROPERTY, "12");
+     System.setProperty(SimpleStatSampler.SAMPLE_RATE_PROPERTY, String.valueOf(sampleRate));
+     initStatisticsFactory();
+ 
+     final File archiveFile1 = new File(dir + File.separator + this.testName + "-01-01.gfs");
+     final File archiveFile2 = new File(dir + File.separator + this.testName + "-01-02.gfs");
+     final File archiveFile3 = new File(dir + File.separator + this.testName + "-01-03.gfs");
+     final File archiveFile4 = new File(dir + File.separator + this.testName + "-01-04.gfs");
+     final File archiveFile5 = new File(dir + File.separator + this.testName + "-01-05.gfs");
+     
+     assertTrue(getSimpleStatSampler().waitForInitialization(5000));
+ 
+     waitForFileToExist(archiveFile1, 4*sampleRate, 10);
+     waitForFileToExist(archiveFile2, 4*sampleRate, 10);
+     waitForFileToExist(archiveFile3, 4*sampleRate, 10);
+     waitForFileToExist(archiveFile4, 4*sampleRate, 10);
+     waitForFileToExist(archiveFile5, 4*sampleRate, 10);
+     waitForFileToDelete(archiveFile1, 10*sampleRate, 10);
+   }
+ 
+   @Override
+   protected StatisticsManager getStatisticsManager() {
+     return this.statisticsFactory;
+   }
+ 
+   private SimpleStatSampler getSimpleStatSampler() {
+     return this.statisticsFactory.getStatSampler();
+   }
+   
+   private void initStatisticsFactory() {
+     CancelCriterion stopper = new CancelCriterion() {
+       public String cancelInProgress() {
+         return null;
+       }
+       public RuntimeException generateCancelledException(Throwable e) {
+         return null;
+       }
+     };
+     this.statisticsFactory = new LocalStatisticsFactory(stopper);
+   }
+   
+   private void closeStatisticsFactory() {
+     if (this.statisticsFactory != null) {
+       this.statisticsFactory.close();
+       this.statisticsFactory = null;
+     }
+   }
+ }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/dfbc88b2/geode-core/src/test/resources/com/gemstone/gemfire/codeAnalysis/excludedClasses.txt
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/dfbc88b2/geode-wan/src/main/java/com/gemstone/gemfire/cache/client/internal/locator/wan/LocatorDiscovery.java
----------------------------------------------------------------------
diff --cc geode-wan/src/main/java/com/gemstone/gemfire/cache/client/internal/locator/wan/LocatorDiscovery.java
index a9de5b3,0fd206e..4ff2b5e
--- a/geode-wan/src/main/java/com/gemstone/gemfire/cache/client/internal/locator/wan/LocatorDiscovery.java
+++ b/geode-wan/src/main/java/com/gemstone/gemfire/cache/client/internal/locator/wan/LocatorDiscovery.java
@@@ -60,13 -57,12 +60,13 @@@ public class LocatorDiscovery
    public static final int WAN_LOCATOR_PING_INTERVAL = Integer.getInteger(
        "WANLocator.PING_INTERVAL", 10000).intValue();
  
-   public LocatorDiscovery(WanLocatorDiscoverer discoverer, DistributionLocatorId locotor,RemoteLocatorJoinRequest request,
+   public LocatorDiscovery(WanLocatorDiscoverer discoverer, DistributionLocatorId locator,RemoteLocatorJoinRequest request,
        LocatorMembershipListener locatorListener) {
      this.discoverer = discoverer;
-     this.locatorId = locotor;
+     this.locatorId = locator;
      this.request = request; 
      this.locatorListener = locatorListener;
 +    this.locatorClient = new TcpClient();
    }
    
    /**

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/dfbc88b2/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/WANTestBase.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/dfbc88b2/geode-wan/src/test/java/com/gemstone/gemfire/management/internal/configuration/ClusterConfigurationDUnitTest.java
----------------------------------------------------------------------



[25/50] [abbrv] incubator-geode git commit: Merge branch 'develop' into feature/GEODE-420

Posted by ud...@apache.org.
Merge branch 'develop' into feature/GEODE-420

# Conflicts:
#	geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/InternalLocator.java


Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/1cc8d4e0
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/1cc8d4e0
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/1cc8d4e0

Branch: refs/heads/develop
Commit: 1cc8d4e09b76cc0eb88f7595846980b2650eb8ae
Parents: 5fd94d5 98531a1
Author: Udo Kohlmeyer <uk...@pivotal.io>
Authored: Thu Aug 25 10:37:44 2016 +1000
Committer: Udo Kohlmeyer <uk...@pivotal.io>
Committed: Thu Aug 25 10:37:44 2016 +1000

----------------------------------------------------------------------
 .../modules/session/catalina/DeltaSession8.java |   5 +-
 .../modules/session/EmbeddedTomcat8.java        |   6 +-
 .../session/TestSessionsTomcat8Base.java        |  54 ++------
 .../Tomcat8SessionsClientServerDUnitTest.java   |  96 +++++++++++++
 .../session/Tomcat8SessionsDUnitTest.java       |  77 +++++++++++
 .../session/Tomcat8SessionsJUnitTest.java       |  32 -----
 .../session/bootstrap/AbstractCache.java        |   4 +-
 .../session/bootstrap/ClientServerCache.java    |   2 +-
 .../session/bootstrap/PeerToPeerCache.java      |   2 +-
 .../modules/session/catalina/DeltaSession.java  |   5 +-
 .../session/catalina/DeltaSessionInterface.java |   1 +
 .../SessionExpirationCacheListener.java         |   5 +-
 .../distributed/internal/InternalLocator.java   |   4 +-
 .../internal/WanLocatorDiscoverer.java          |   2 +-
 .../admin/remote/DistributionLocatorId.java     |  12 +-
 .../internal/cache/CacheServerLauncher.java     |   7 +
 .../internal/cache/PartitionedRegion.java       |  13 +-
 .../internal/cache/xmlcache/CacheCreation.java  |  49 +++----
 .../gemfire/internal/i18n/LocalizedStrings.java |   2 +-
 .../management/ResourceManagerDUnitTest.java    |   7 +-
 .../distributed/DistributedSystemDUnitTest.java |   6 +-
 .../PersistentRVVRecoveryDUnitTest.java         |   2 +-
 .../cache/wan/AsyncEventQueueTestBase.java      |  55 ++++++++
 .../asyncqueue/AsyncEventListenerDUnitTest.java |  29 ++++
 .../cache/xmlcache/CacheCreationJUnitTest.java  |  25 ++++
 .../security/ClientAuthenticationTestCase.java  |  33 +++--
 .../lucene/LuceneQueriesPeerPRDUnitTest.java    |   5 +-
 .../LuceneQueriesPeerPRRedundancyDUnitTest.java |   5 +-
 geode-site/website/content/releases/index.html  |  50 +++++++
 .../internal/locator/wan/LocatorDiscovery.java  |   4 +-
 .../locator/wan/WanLocatorDiscovererImpl.java   |  36 +++--
 .../gemfire/internal/cache/wan/WANTestBase.java |  50 ++++---
 .../wan/misc/WanAutoDiscoveryDUnitTest.java     | 134 ++++++++++++-------
 ...rialGatewaySenderEventListenerDUnitTest.java |   1 -
 gradle/publish.gradle                           |   2 +
 35 files changed, 586 insertions(+), 236 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1cc8d4e0/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/InternalLocator.java
----------------------------------------------------------------------
diff --cc geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/InternalLocator.java
index 23ee38e,3c9fa97..8511d8b
--- a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/InternalLocator.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/InternalLocator.java
@@@ -798,13 -830,13 +798,13 @@@ public class InternalLocator extends Lo
      } else {
        InternalDistributedSystem.addConnectListener(this);
      }
 -    
 +
      this.locatorDiscoverer = WANServiceProvider.createLocatorDiscoverer();
-     if (this.locatorDiscoverer != null) {
-       this.locatorDiscoverer.discover(getPort(), config, locatorListener);
+     if(this.locatorDiscoverer != null) {
+       this.locatorDiscoverer.discover(getPort(), config, locatorListener, hostnameForClients);
      }
    }
 -  
 +
    /**
     * Start server location services in this locator. Server location
     * can only be started once there is a running distributed system.

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1cc8d4e0/geode-core/src/main/java/com/gemstone/gemfire/internal/admin/remote/DistributionLocatorId.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1cc8d4e0/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/CacheServerLauncher.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1cc8d4e0/geode-core/src/main/java/com/gemstone/gemfire/internal/i18n/LocalizedStrings.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1cc8d4e0/geode-core/src/test/java/com/gemstone/gemfire/distributed/DistributedSystemDUnitTest.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1cc8d4e0/geode-wan/src/main/java/com/gemstone/gemfire/cache/client/internal/locator/wan/LocatorDiscovery.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1cc8d4e0/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/WANTestBase.java
----------------------------------------------------------------------


[05/50] [abbrv] incubator-geode git commit: GEODE-420: fixed more tests. Renamed some configuration properties, ssl-http-service-alias -> ssl-http-alias Added SSLConfigurationFactoryTest.java

Posted by ud...@apache.org.
GEODE-420: fixed more tests.
Renamed some configuration properties, ssl-http-service-alias -> ssl-http-alias
Added SSLConfigurationFactoryTest.java


Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/daf025ce
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/daf025ce
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/daf025ce

Branch: refs/heads/develop
Commit: daf025ce63c4ca5249a76e511abb0111c927b58c
Parents: 8754dae
Author: Udo Kohlmeyer <uk...@pivotal.io>
Authored: Thu Aug 18 07:24:11 2016 +1000
Committer: Udo Kohlmeyer <uk...@pivotal.io>
Committed: Thu Aug 18 07:24:11 2016 +1000

----------------------------------------------------------------------
 .../controllers/RestAPIsWithSSLDUnitTest.java   | 32 ++++++++++++--------
 .../distributed/ConfigurationProperties.java    | 16 +++++-----
 .../internal/AbstractDistributionConfig.java    |  1 +
 .../internal/DistributionConfig.java            |  2 +-
 .../internal/DistributionConfigJUnitTest.java   |  2 +-
 .../net/SSLConfigurationFactoryTest.java        | 22 ++++++++++++--
 6 files changed, 51 insertions(+), 24 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/daf025ce/geode-assembly/src/test/java/com/gemstone/gemfire/rest/internal/web/controllers/RestAPIsWithSSLDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-assembly/src/test/java/com/gemstone/gemfire/rest/internal/web/controllers/RestAPIsWithSSLDUnitTest.java b/geode-assembly/src/test/java/com/gemstone/gemfire/rest/internal/web/controllers/RestAPIsWithSSLDUnitTest.java
index 1d91016..f1a4d5b 100644
--- a/geode-assembly/src/test/java/com/gemstone/gemfire/rest/internal/web/controllers/RestAPIsWithSSLDUnitTest.java
+++ b/geode-assembly/src/test/java/com/gemstone/gemfire/rest/internal/web/controllers/RestAPIsWithSSLDUnitTest.java
@@ -33,7 +33,6 @@ import java.util.Date;
 import java.util.HashMap;
 import java.util.Map;
 import java.util.Properties;
-
 import javax.net.ssl.SSLContext;
 
 import org.apache.commons.lang.StringUtils;
@@ -52,9 +51,14 @@ import org.junit.experimental.categories.Category;
 import org.junit.runner.RunWith;
 import org.junit.runners.Parameterized;
 
-import com.gemstone.gemfire.test.junit.categories.DistributedTest;
-
-import com.gemstone.gemfire.cache.*;
+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.Region;
+import com.gemstone.gemfire.cache.RegionAttributes;
+import com.gemstone.gemfire.cache.RegionFactory;
+import com.gemstone.gemfire.cache.RegionShortcut;
 import com.gemstone.gemfire.cache.client.ClientCache;
 import com.gemstone.gemfire.cache.client.ClientCacheFactory;
 import com.gemstone.gemfire.cache.client.ClientRegionShortcut;
@@ -71,6 +75,7 @@ import com.gemstone.gemfire.test.dunit.Host;
 import com.gemstone.gemfire.test.dunit.IgnoredException;
 import com.gemstone.gemfire.test.dunit.NetworkUtils;
 import com.gemstone.gemfire.test.dunit.VM;
+import com.gemstone.gemfire.test.junit.categories.DistributedTest;
 import com.gemstone.gemfire.test.junit.runners.CategoryWithParameterizedRunnerFactory;
 import com.gemstone.gemfire.util.test.TestUtil;
 
@@ -95,8 +100,6 @@ public class RestAPIsWithSSLDUnitTest extends LocatorTestBase {
     return Arrays.asList("/geode", "/gemfire-api");
   }
 
-  private File jks;
-
   public RestAPIsWithSSLDUnitTest() {
     super();
   }
@@ -286,6 +289,10 @@ public class RestAPIsWithSSLDUnitTest extends LocatorTestBase {
     }
   }
 
+  /**
+   * @Deprecated once the legacy SSL properties have been removed we need to remove this logic.
+   */
+  @Deprecated()
   private Properties configureSSL(Properties props, Properties sslProperties, boolean clusterLevel) {
 
     if (clusterLevel) {
@@ -318,6 +325,8 @@ public class RestAPIsWithSSLDUnitTest extends LocatorTestBase {
       sslPropertyConverter(sslProperties, props, SSL_TRUSTSTORE_PASSWORD, null);
       sslPropertyConverter(sslProperties, props, SSL_HTTP_SERVICE_ALIAS, null);
       sslPropertyConverter(sslProperties, props, SSL_ENABLED_COMPONENTS, null);
+      sslPropertyConverter(sslProperties, props, SSL_HTTP_SERVICE_REQUIRE_AUTHENTICATION, null);
+      sslPropertyConverter(sslProperties, props, SSL_DEFAULT_ALIAS, null);
     }
     return props;
   }
@@ -420,15 +429,11 @@ public class RestAPIsWithSSLDUnitTest extends LocatorTestBase {
 
     // Host checking is disabled here , as tests might run on multiple hosts and
     // host entries can not be assumed
-    SSLConnectionSocketFactory sslsf = new SSLConnectionSocketFactory(sslcontext, SSLConnectionSocketFactory.ALLOW_ALL_HOSTNAME_VERIFIER);
+    SSLConnectionSocketFactory sslConnectionSocketFactory = new SSLConnectionSocketFactory(sslcontext, SSLConnectionSocketFactory.ALLOW_ALL_HOSTNAME_VERIFIER);
 
-    return HttpClients.custom().setSSLSocketFactory(sslsf).build();
+    return HttpClients.custom().setSSLSocketFactory(sslConnectionSocketFactory).build();
   }
 
-  //  private void validateConnection(String restEndpoint, String algo) {
-  //    validateConnection(restEndpoint, algo, new Properties());
-  //  }
-
   private void validateConnection(String restEndpoint, String algo, Properties properties) {
 
     try {
@@ -492,6 +497,7 @@ public class RestAPIsWithSSLDUnitTest extends LocatorTestBase {
     props.setProperty(SSL_KEYSTORE_TYPE, "JKS");
     props.setProperty(SSL_ENABLED_COMPONENTS, SSLEnabledComponents.HTTP_SERVICE);
     props.setProperty(SSL_HTTP_SERVICE_ALIAS, "httpservicekey");
+    props.setProperty(SSL_HTTP_SERVICE_REQUIRE_AUTHENTICATION, "true");
     String restEndpoint = startInfraWithSSL(props, false);
     validateConnection(restEndpoint, "SSL", props);
   }
@@ -506,6 +512,7 @@ public class RestAPIsWithSSLDUnitTest extends LocatorTestBase {
     props.setProperty(SSL_TRUSTSTORE_PASSWORD, "password");
     props.setProperty(SSL_KEYSTORE_TYPE, "JKS");
     props.setProperty(SSL_ENABLED_COMPONENTS, SSLEnabledComponents.HTTP_SERVICE);
+    props.setProperty(SSL_HTTP_SERVICE_REQUIRE_AUTHENTICATION, "true");
     props.setProperty(SSL_HTTP_SERVICE_ALIAS, "httpservicekey");
     props.setProperty(INVALID_CLIENT_ALIAS, "someAlias");
     String restEndpoint = startInfraWithSSL(props, false);
@@ -656,6 +663,7 @@ public class RestAPIsWithSSLDUnitTest extends LocatorTestBase {
     props.setProperty(SSL_KEYSTORE_TYPE, "JKS");
     props.setProperty(SSL_PROTOCOLS, "SSL");
     props.setProperty(SSL_REQUIRE_AUTHENTICATION, "true");
+    props.setProperty(SSL_HTTP_SERVICE_REQUIRE_AUTHENTICATION, "true");
     props.setProperty(SSL_ENABLED_COMPONENTS, SSLEnabledComponents.HTTP_SERVICE);
 
     String restEndpoint = startInfraWithSSL(props, false);

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/daf025ce/geode-core/src/main/java/com/gemstone/gemfire/distributed/ConfigurationProperties.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/distributed/ConfigurationProperties.java b/geode-core/src/main/java/com/gemstone/gemfire/distributed/ConfigurationProperties.java
index fdb3bf6..34953a0 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/distributed/ConfigurationProperties.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/distributed/ConfigurationProperties.java
@@ -591,15 +591,15 @@ public interface ConfigurationProperties {
    */
   String HTTP_SERVICE_PORT = "http-service-port";
   /**
-   * The static String definition of the <i>"ssl-http-service-alias"</i> property
-   * <a name="ssl-http-service-alias"/a></p>
+   * The static String definition of the <i>"ssl-http-alias"</i> property
+   * <a name="ssl-http-alias"/a></p>
    * <U>Description</U>: This property is to be used if a specific key is to be used for the SSL communications for the HTTP service.
    * </p>
    * <U><i>Optional</i></U>
    * <U>Default</U>: "" </p>
    * <U>Since</U>: Geode 1.0
    */
-  String SSL_HTTP_SERVICE_ALIAS = "ssl-http-service-alias";
+  String SSL_HTTP_SERVICE_ALIAS = "ssl-http-alias";
   /**
    * The static String definition of the <i>"http-service-ssl-ciphers"</i> property
    * <a name="http-service-ssl-ciphers"/a></p>
@@ -822,15 +822,15 @@ public interface ConfigurationProperties {
    */
   String JMX_MANAGER_UPDATE_RATE = "jmx-manager-update-rate";
   /**
-   * The static String definition of the <i>"ssl-jmx-manager-alias"</i> property
-   * <a name="ssl-jmx-manager-alias"/a></p>
+   * The static String definition of the <i>"ssl-jmx-alias"</i> property
+   * <a name="ssl-jmx-alias"/a></p>
    * <U>Description</U>: This property is to be used if a specific key is to be used for the SSL communications for the jmx manager.
    * </p>
    * <U><i>Optional</i></U>
    * <U>Default</U>: "" </p>
    * <U>Since</U>: Geode 1.0
    */
-  String SSL_JMX_MANAGER_ALIAS = "ssl-jmx-manager-alias";
+  String SSL_JMX_MANAGER_ALIAS = "ssl-jmx-alias";
   /**
    * The static String definition of the <i>"jmx-manager-ssl-ciphers"</i> property
    * <a name="jmx-manager-ssl-ciphers"/a></p>
@@ -1759,12 +1759,12 @@ public interface ConfigurationProperties {
    */
   String SSL_DEFAULT_ALIAS = "ssl-default-alias";
   /**
-   * The static String definition of the <i>"ssl-http-service-require-authentication"</i> property
+   * The static String definition of the <i>"ssl-http-require-authentication"</i> property
    *
    * <U>Description</U>If false allows client side's http connection to be authenticated without a 2-way SSL authentication.
    * </p>
    * <U>Default</U>: "false"</p>
    * <U>Since</U>: Geode 1.0
    */
-  String SSL_HTTP_SERVICE_REQUIRE_AUTHENTICATION = "ssl-http-service-require-authentication";
+  String SSL_HTTP_SERVICE_REQUIRE_AUTHENTICATION = "ssl-http-require-authentication";
 }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/daf025ce/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/AbstractDistributionConfig.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/AbstractDistributionConfig.java b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/AbstractDistributionConfig.java
index 282a239..571d4ba 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/AbstractDistributionConfig.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/AbstractDistributionConfig.java
@@ -957,6 +957,7 @@ public abstract class AbstractDistributionConfig extends AbstractConfig implemen
     m.put(SSL_TRUSTSTORE, "Location of the Java keystore file containing the collection of trusted certificates.");
     m.put(SSL_TRUSTSTORE_PASSWORD, "Password to unlock the truststore.");
     m.put(SSL_DEFAULT_ALIAS, "The default certificate alias to be used in a multi-key keystore");
+    m.put(SSL_HTTP_SERVICE_REQUIRE_AUTHENTICATION, "This property determines is the HTTP service with use mutual ssl authentication.");
 
     dcAttDescriptions = Collections.unmodifiableMap(m);
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/daf025ce/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionConfig.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionConfig.java b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionConfig.java
index 8e2a60b..3f60778 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionConfig.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionConfig.java
@@ -4552,7 +4552,7 @@ public interface DistributionConfig extends Config, LogConfig {
    * property.
    */
   @ConfigAttributeSetter(name = SSL_HTTP_SERVICE_REQUIRE_AUTHENTICATION)
-  void setSSLHTTPRequireAuthentication(boolean requiresAuthenatication);
+  void setSSLHTTPRequireAuthentication(boolean requiresAuthentication);
 
   /**
    * The name of the {@link ConfigurationProperties#SSL_HTTP_SERVICE_REQUIRE_AUTHENTICATION} property

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/daf025ce/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/DistributionConfigJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/DistributionConfigJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/DistributionConfigJUnitTest.java
index aa65a41..56b35ea 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/DistributionConfigJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/DistributionConfigJUnitTest.java
@@ -78,7 +78,7 @@ public class DistributionConfigJUnitTest {
   @Test
   public void testGetAttributeNames() {
     String[] attNames = AbstractDistributionConfig._getAttNames();
-    assertEquals(attNames.length, 154);
+    assertEquals(attNames.length, 155);
 
     List boolList = new ArrayList();
     List intList = new ArrayList();

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/daf025ce/geode-core/src/test/java/com/gemstone/gemfire/internal/net/SSLConfigurationFactoryTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/net/SSLConfigurationFactoryTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/net/SSLConfigurationFactoryTest.java
index 067333e..0b70c8f 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/net/SSLConfigurationFactoryTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/net/SSLConfigurationFactoryTest.java
@@ -1,3 +1,19 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 package com.gemstone.gemfire.internal.net;
 
 import static com.gemstone.gemfire.distributed.ConfigurationProperties.*;
@@ -8,17 +24,19 @@ import java.util.Properties;
 import org.apache.commons.lang.StringUtils;
 import org.junit.After;
 import org.junit.Test;
+import org.junit.experimental.categories.Category;
 
 import com.gemstone.gemfire.distributed.internal.DistributionConfig;
 import com.gemstone.gemfire.distributed.internal.DistributionConfigImpl;
 import com.gemstone.gemfire.internal.admin.SSLConfig;
 import com.gemstone.gemfire.test.dunit.internal.JUnit4DistributedTestCase;
+import com.gemstone.gemfire.test.junit.categories.UnitTest;
 
+@Category(UnitTest.class)
 public class SSLConfigurationFactoryTest extends JUnit4DistributedTestCase {
 
   @After
-  public void tearDownTest()
-  {
+  public void tearDownTest() {
     SSLConfigurationFactory.close();
   }
 


[29/50] [abbrv] incubator-geode git commit: GEODE-420: Removing FileUtils from LauncherLifecycleCommandsDUnitTest.java

Posted by ud...@apache.org.
GEODE-420: Removing FileUtils from LauncherLifecycleCommandsDUnitTest.java


Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/507b83f9
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/507b83f9
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/507b83f9

Branch: refs/heads/develop
Commit: 507b83f9e8f99bc23fbaf66c88b77eca8d5249ac
Parents: 7272c64
Author: Udo Kohlmeyer <uk...@pivotal.io>
Authored: Tue Aug 30 12:23:04 2016 +1000
Committer: Udo Kohlmeyer <uk...@pivotal.io>
Committed: Tue Aug 30 12:23:04 2016 +1000

----------------------------------------------------------------------
 .../cli/commands/LauncherLifecycleCommandsDUnitTest.java        | 5 -----
 1 file changed, 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/507b83f9/geode-assembly/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/LauncherLifecycleCommandsDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-assembly/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/LauncherLifecycleCommandsDUnitTest.java b/geode-assembly/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/LauncherLifecycleCommandsDUnitTest.java
index 1610b8e..50201ba 100644
--- a/geode-assembly/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/LauncherLifecycleCommandsDUnitTest.java
+++ b/geode-assembly/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/LauncherLifecycleCommandsDUnitTest.java
@@ -47,7 +47,6 @@ import javax.management.remote.JMXConnector;
 import javax.management.remote.JMXConnectorFactory;
 import javax.management.remote.JMXServiceURL;
 
-import org.apache.commons.io.FileUtils;
 import org.junit.FixMethodOrder;
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
@@ -563,7 +562,6 @@ public class LauncherLifecycleCommandsDUnitTest extends CliCommandTestBase {
       assertTrue(serviceStateStatusStringNormalized(toString(result)).contains(serviceStateStatusStringNormalized(expectedLocatorState)));
     } finally {
       stopLocator(workingDirectory);
-      FileUtils.copyDirectory(workingDirectory.getCanonicalFile(), new File("/tmp"));
     }
   }
 
@@ -621,7 +619,6 @@ public class LauncherLifecycleCommandsDUnitTest extends CliCommandTestBase {
       assertTrue(serviceStateStatusStringNormalized(toString(result)).contains(serviceStateStatusStringNormalized(expectedLocatorState)));
     } finally {
       stopLocator(workingDirectory);
-      FileUtils.copyDirectory(workingDirectory.getCanonicalFile(), new File("/tmp"));
     }
   }
 
@@ -722,7 +719,6 @@ public class LauncherLifecycleCommandsDUnitTest extends CliCommandTestBase {
       assertNotNull(locatorStatus);
       assertEquals(Status.NOT_RESPONDING, locatorStatus.getStatus());
     } finally {
-      FileUtils.copyDirectory(workingDirectory.getCanonicalFile(), new File("/tmp"));
     }
 
   }
@@ -807,7 +803,6 @@ public class LauncherLifecycleCommandsDUnitTest extends CliCommandTestBase {
       assertNotNull(locatorState);
       assertEquals(Status.NOT_RESPONDING, locatorState.getStatus());
     } finally {
-      FileUtils.copyDirectory(workingDirectory.getCanonicalFile(),new File("/tmp"));
     }
   }
 


[03/50] [abbrv] incubator-geode git commit: GEODE-420: Reverting checkAttributes change in AbstractDistributionConfig.java.

Posted by ud...@apache.org.
GEODE-420: Reverting checkAttributes change in AbstractDistributionConfig.java.


Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/6179a698
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/6179a698
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/6179a698

Branch: refs/heads/develop
Commit: 6179a6988afd75f1441d65c737b2e4ef3b9d11fe
Parents: 31cbd2f
Author: Udo Kohlmeyer <uk...@pivotal.io>
Authored: Wed Aug 17 06:00:12 2016 +1000
Committer: Udo Kohlmeyer <uk...@pivotal.io>
Committed: Wed Aug 17 06:00:12 2016 +1000

----------------------------------------------------------------------
 .../internal/AbstractDistributionConfig.java    | 44 +------------
 .../internal/DistributionConfigImpl.java        | 67 ++++++++++++++++++++
 .../gemfire/distributed/LocatorDUnitTest.java   |  1 -
 .../internal/DistributionConfigJUnitTest.java   |  3 -
 4 files changed, 69 insertions(+), 46 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/6179a698/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/AbstractDistributionConfig.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/AbstractDistributionConfig.java b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/AbstractDistributionConfig.java
index ce835c5..282a239 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/AbstractDistributionConfig.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/AbstractDistributionConfig.java
@@ -464,9 +464,6 @@ public abstract class AbstractDistributionConfig extends AbstractConfig implemen
   @ConfigAttributeChecker(name = SSL_ENABLED_COMPONENTS)
   protected SSLEnabledComponent[] checkLegacySSLWhenSSLEnabledComponentsSet(SSLEnabledComponent[] value) {
     for (SSLEnabledComponent component : value) {
-      if (!isAliasCorrectlyConfiguredForComponents(component)) {
-        throw new IllegalArgumentException(LocalizedStrings.AbstractDistributionConfig_SSL_ENABLED_COMPONENTS_INVALID_ALIAS_OPTIONS.toLocalizedString());
-      }
       switch (component) {
         case ALL:
         case CLUSTER:
@@ -498,43 +495,7 @@ public abstract class AbstractDistributionConfig extends AbstractConfig implemen
     return value;
   }
 
-  private boolean isAliasCorrectlyConfiguredForComponents(final SSLEnabledComponent component) {
-    switch (component) {
-      case ALL: {
-        //If the default alias is not set, then check that all the other component aliases are set
-        if (StringUtils.isEmpty(getSSLDefaultAlias())) {
-          boolean correctAlias = true;
-          correctAlias &= isAliasCorrectlyConfiguredForComponents(SSLEnabledComponent.CLUSTER);
-          correctAlias &= isAliasCorrectlyConfiguredForComponents(SSLEnabledComponent.GATEWAY);
-          correctAlias &= isAliasCorrectlyConfiguredForComponents(SSLEnabledComponent.HTTP_SERVICE);
-          correctAlias &= isAliasCorrectlyConfiguredForComponents(SSLEnabledComponent.JMX);
-          correctAlias &= isAliasCorrectlyConfiguredForComponents(SSLEnabledComponent.LOCATOR);
-          correctAlias &= isAliasCorrectlyConfiguredForComponents(SSLEnabledComponent.SERVER);
-          return correctAlias;
-        }
-      }
-      case CLUSTER: {
-        return StringUtils.isEmpty(getClusterSSLAlias()) ? true : (getSSLEnabledComponents().length > 1 ? !StringUtils.isEmpty(getSSLDefaultAlias()) : true);
-      }
-      case GATEWAY: {
-        return StringUtils.isEmpty(getGatewaySSLAlias()) ? true : (getSSLEnabledComponents().length > 1 ? !StringUtils.isEmpty(getSSLDefaultAlias()) : true);
-      }
-      case HTTP_SERVICE: {
-        return StringUtils.isEmpty(getHTTPServiceSSLAlias()) ? true : (getSSLEnabledComponents().length > 1 ? !StringUtils.isEmpty(getSSLDefaultAlias()) : true);
-      }
-      case JMX: {
-        return StringUtils.isEmpty(getJMXManagerSSLAlias()) ? true : (getSSLEnabledComponents().length > 1 ? !StringUtils.isEmpty(getSSLDefaultAlias()) : true);
-      }
-      case LOCATOR: {
-        return StringUtils.isEmpty(getLocatorSSLAlias()) ? true : (getSSLEnabledComponents().length > 1 ? !StringUtils.isEmpty(getSSLDefaultAlias()) : true);
-      }
-      case SERVER: {
-        return StringUtils.isEmpty(getServerSSLAlias()) ? true : (getSSLEnabledComponents().length > 1 ? !StringUtils.isEmpty(getSSLDefaultAlias()) : true);
-      }
-      default:
-        return false;
-    }
-  }
+
 
   // AbstractConfig overriding methods
 
@@ -597,8 +558,7 @@ public abstract class AbstractDistributionConfig extends AbstractConfig implemen
       throw new InternalGemFireException("the attribute setter must have one and only one parametter");
     }
 
-    //Moved this to the outside loop to complete the setting of configuration before checking their validity.
-    //    checkAttribute(attName, attValue);
+    checkAttribute(attName, attValue);
     try {
       setter.invoke(this, attValue);
     } catch (Exception e) {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/6179a698/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionConfigImpl.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionConfigImpl.java b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionConfigImpl.java
index 7c2d551..26263d3 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionConfigImpl.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionConfigImpl.java
@@ -35,11 +35,13 @@ import java.util.Map;
 import java.util.Properties;
 import java.util.Set;
 
+import org.apache.commons.lang.StringUtils;
 import org.apache.geode.redis.GeodeRedisServer;
 
 import com.gemstone.gemfire.GemFireConfigException;
 import com.gemstone.gemfire.GemFireIOException;
 import com.gemstone.gemfire.InternalGemFireException;
+import com.gemstone.gemfire.distributed.ConfigurationProperties;
 import com.gemstone.gemfire.distributed.DistributedSystem;
 import com.gemstone.gemfire.internal.ConfigSource;
 import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
@@ -919,11 +921,76 @@ public class DistributionConfigImpl extends AbstractDistributionConfig implement
     // Make attributes writeable only
     this.modifiable = true;
     validateConfigurationProperties(props);
+    validateSSLEnabledComponentsConfiguration();
     // Make attributes read only
     this.modifiable = false;
 
   }
 
+  private void validateSSLEnabledComponentsConfiguration() {
+    Object value = null;
+    try {
+      Method method = getters.get(ConfigurationProperties.SSL_ENABLED_COMPONENTS);
+      if (method != null) {
+        value = method.invoke(this, new Object[] {});
+      }
+    } catch (Exception e) {
+      if (e instanceof RuntimeException) {
+        throw (RuntimeException) e;
+      }
+      if (e.getCause() instanceof RuntimeException) {
+        throw (RuntimeException) e.getCause();
+      } else {
+        throw new InternalGemFireException("error invoking getter for property" + ConfigurationProperties.SSL_ENABLED_COMPONENTS);
+      }
+    }
+    SSLEnabledComponent[] sslEnabledComponents = (SSLEnabledComponent[]) value;
+    for (SSLEnabledComponent sslEnabledComponent : sslEnabledComponents) {
+      if (!isAliasCorrectlyConfiguredForComponents(sslEnabledComponent)) {
+        throw new IllegalArgumentException(LocalizedStrings.AbstractDistributionConfig_SSL_ENABLED_COMPONENTS_INVALID_ALIAS_OPTIONS.toLocalizedString());
+      }
+    }
+
+  }
+
+  private boolean isAliasCorrectlyConfiguredForComponents(final SSLEnabledComponent component) {
+    switch (component) {
+      case ALL: {
+        //If the default alias is not set, then check that all the other component aliases are set
+        if (StringUtils.isEmpty(getSSLDefaultAlias())) {
+          boolean correctAlias = true;
+          correctAlias &= isAliasCorrectlyConfiguredForComponents(SSLEnabledComponent.CLUSTER);
+          correctAlias &= isAliasCorrectlyConfiguredForComponents(SSLEnabledComponent.GATEWAY);
+          correctAlias &= isAliasCorrectlyConfiguredForComponents(SSLEnabledComponent.HTTP_SERVICE);
+          correctAlias &= isAliasCorrectlyConfiguredForComponents(SSLEnabledComponent.JMX);
+          correctAlias &= isAliasCorrectlyConfiguredForComponents(SSLEnabledComponent.LOCATOR);
+          correctAlias &= isAliasCorrectlyConfiguredForComponents(SSLEnabledComponent.SERVER);
+          return correctAlias;
+        }
+      }
+      case CLUSTER: {
+        return StringUtils.isEmpty(getClusterSSLAlias()) ? true : (getSSLEnabledComponents().length > 1 ? !StringUtils.isEmpty(getSSLDefaultAlias()) : true);
+      }
+      case GATEWAY: {
+        return StringUtils.isEmpty(getGatewaySSLAlias()) ? true : (getSSLEnabledComponents().length > 1 ? !StringUtils.isEmpty(getSSLDefaultAlias()) : true);
+      }
+      case HTTP_SERVICE: {
+        return StringUtils.isEmpty(getHTTPServiceSSLAlias()) ? true : (getSSLEnabledComponents().length > 1 ? !StringUtils.isEmpty(getSSLDefaultAlias()) : true);
+      }
+      case JMX: {
+        return StringUtils.isEmpty(getJMXManagerSSLAlias()) ? true : (getSSLEnabledComponents().length > 1 ? !StringUtils.isEmpty(getSSLDefaultAlias()) : true);
+      }
+      case LOCATOR: {
+        return StringUtils.isEmpty(getLocatorSSLAlias()) ? true : (getSSLEnabledComponents().length > 1 ? !StringUtils.isEmpty(getSSLDefaultAlias()) : true);
+      }
+      case SERVER: {
+        return StringUtils.isEmpty(getServerSSLAlias()) ? true : (getSSLEnabledComponents().length > 1 ? !StringUtils.isEmpty(getSSLDefaultAlias()) : true);
+      }
+      default:
+        return false;
+    }
+  }
+
   /**
    * Here we will validate the correctness of the set properties as per the CheckAttributeChecker annotations defined in #AbstractDistributionConfig
    * @param props

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/6179a698/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorDUnitTest.java
index 9fe4e8f..2bff100 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorDUnitTest.java
@@ -26,7 +26,6 @@ import java.util.List;
 import java.util.Properties;
 import java.util.Set;
 
-import com.sun.xml.internal.ws.api.FeatureListValidatorAnnotation;
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/6179a698/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/DistributionConfigJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/DistributionConfigJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/DistributionConfigJUnitTest.java
index ad10f0c..aa65a41 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/DistributionConfigJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/DistributionConfigJUnitTest.java
@@ -279,7 +279,6 @@ public class DistributionConfigJUnitTest {
   @Test(expected = UnmodifiableException.class)
   public void testSetUnmodifiableAttributeObject() {
     config.setAttributeObject(ARCHIVE_DISK_SPACE_LIMIT, 0, ConfigSource.api());
-    config.checkAttribute(ARCHIVE_DISK_SPACE_LIMIT, 0);
   }
 
   @Test
@@ -291,7 +290,6 @@ public class DistributionConfigJUnitTest {
   @Test(expected = IllegalArgumentException.class)
   public void testOutOfRangeAttributeObject() {
     config.setAttributeObject(HTTP_SERVICE_PORT, -1, ConfigSource.api());
-    config.checkAttribute(HTTP_SERVICE_PORT, -1);
   }
 
   @Test
@@ -318,7 +316,6 @@ public class DistributionConfigJUnitTest {
     config.modifiable = true;
 //    config.setStartLocator(address);
     config.setAttributeObject(START_LOCATOR,address,ConfigSource.api());
-    config.checkAttribute(START_LOCATOR,address);
   }
 
   @Test


[14/50] [abbrv] incubator-geode git commit: GEODE-420: Fixed tests after merge with develop

Posted by ud...@apache.org.
GEODE-420: Fixed tests after merge with develop


Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/981f2f0b
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/981f2f0b
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/981f2f0b

Branch: refs/heads/develop
Commit: 981f2f0b60ea1b68aaab5f2861b618fcaf6e932c
Parents: dfbc88b
Author: Udo Kohlmeyer <uk...@pivotal.io>
Authored: Fri Aug 19 07:17:42 2016 +1000
Committer: Udo Kohlmeyer <uk...@pivotal.io>
Committed: Fri Aug 19 07:17:42 2016 +1000

----------------------------------------------------------------------
 .../internal/DistributionConfigImpl.java        | 1272 +++++-------------
 .../internal/InternalDistributedSystem.java     |    9 -
 .../gemstone/gemfire/internal/SystemAdmin.java  |    2 -
 .../internal/statistics/HostStatHelper.java     |    4 +-
 .../internal/statistics/HostStatSampler.java    |    7 +-
 .../internal/statistics/StatArchiveWriter.java  |    7 +-
 .../internal/DistributionConfigJUnitTest.java   |    2 +-
 .../GemFireStatSamplerIntegrationTest.java      |    4 -
 8 files changed, 363 insertions(+), 944 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/981f2f0b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionConfigImpl.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionConfigImpl.java b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionConfigImpl.java
index 140401a..2b26a58 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionConfigImpl.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionConfigImpl.java
@@ -32,18 +32,21 @@ import java.util.HashMap;
 import java.util.HashSet;
 import java.util.Iterator;
 import java.util.Map;
+import java.util.Objects;
 import java.util.Properties;
 import java.util.Set;
 
 import org.apache.commons.lang.StringUtils;
+import org.apache.commons.lang.builder.EqualsBuilder;
+import org.apache.commons.lang.builder.HashCodeBuilder;
 import org.apache.geode.redis.GeodeRedisServer;
+import org.apache.geode.security.SecurableComponents;
 
 import com.gemstone.gemfire.GemFireConfigException;
 import com.gemstone.gemfire.GemFireIOException;
 import com.gemstone.gemfire.InternalGemFireException;
 import com.gemstone.gemfire.distributed.ConfigurationProperties;
 import com.gemstone.gemfire.distributed.DistributedSystem;
-import org.apache.geode.security.SecurableComponents;
 import com.gemstone.gemfire.internal.ConfigSource;
 import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
 import com.gemstone.gemfire.internal.net.SSLEnabledComponent;
@@ -569,7 +572,9 @@ public class DistributionConfigImpl extends AbstractDistributionConfig implement
 
   private String securityEnabledComponents = DEFAULT_SECURITY_ENABLED_COMPONENTS;
 
-  /** "off-heap-memory-size" with value of "" or "<size>[g|m]" */
+  /**
+   * "off-heap-memory-size" with value of "" or "<size>[g|m]"
+   */
 
   protected String offHeapMemorySize = DEFAULT_OFF_HEAP_MEMORY_SIZE;
 
@@ -2171,7 +2176,7 @@ public class DistributionConfigImpl extends AbstractDistributionConfig implement
   }
 
   public Properties getSecurityProps() {
-    if(security.containsKey(SECURITY_MANAGER) && !security.containsKey(SECURITY_ENABLED_COMPONENTS)){
+    if (security.containsKey(SECURITY_MANAGER) && !security.containsKey(SECURITY_ENABLED_COMPONENTS)) {
       security.setProperty(SECURITY_ENABLED_COMPONENTS, SecurableComponents.ALL);
     }
     return security;
@@ -2498,7 +2503,7 @@ public class DistributionConfigImpl extends AbstractDistributionConfig implement
 
   @Override
   public void setSecurityEnabledComponents(final String securityEnabledComponents) {
-    this.securityEnabledComponents = (String) checkAttribute(SECURITY_ENABLED_COMPONENTS, securityEnabledComponents);
+    this.securityEnabledComponents = securityEnabledComponents;
   }
 
   @Override
@@ -2673,774 +2678,193 @@ public class DistributionConfigImpl extends AbstractDistributionConfig implement
 
   ///////////////////////  Utility Methods  ///////////////////////
 
+
   /**
    * Two instances of <code>DistributedConfigImpl</code> are equal if all of
    * their configuration properties are the same. Be careful if you need to
    * remove final and override this. See bug #50939.
    */
   @Override
-  public final boolean equals(Object obj) {
-    // this was auto-generated using Eclipse
-    if (this == obj) {
+  public boolean equals(final Object o) {
+    if (this == o) {
       return true;
     }
-    if (!super.equals(obj)) {
-      return false;
-    }
-    if (getClass() != obj.getClass()) {
-      return false;
-    }
-    DistributionConfigImpl other = (DistributionConfigImpl) obj;
-    if (ackForceDisconnectThreshold != other.ackForceDisconnectThreshold) {
-      return false;
-    }
-    if (ackWaitThreshold != other.ackWaitThreshold) {
-      return false;
-    }
-    if (archiveDiskSpaceLimit != other.archiveDiskSpaceLimit) {
-      return false;
-    }
-    if (archiveFileSizeLimit != other.archiveFileSizeLimit) {
-      return false;
-    }
-    if (asyncDistributionTimeout != other.asyncDistributionTimeout) {
-      return false;
-    }
-    if (asyncMaxQueueSize != other.asyncMaxQueueSize) {
-      return false;
-    }
-    if (asyncQueueTimeout != other.asyncQueueTimeout) {
-      return false;
-    }
-    if (bindAddress == null) {
-      if (other.bindAddress != null) {
-        return false;
-      }
-    } else if (!bindAddress.equals(other.bindAddress)) {
-      return false;
-    }
-    if (cacheXmlFile == null) {
-      if (other.cacheXmlFile != null) {
-        return false;
-      }
-    } else if (!cacheXmlFile.equals(other.cacheXmlFile)) {
-      return false;
-    }
-    if (clientConflation == null) {
-      if (other.clientConflation != null) {
-        return false;
-      }
-    } else if (!clientConflation.equals(other.clientConflation)) {
-      return false;
-    }
-    if (clusterSSLCiphers == null) {
-      if (other.clusterSSLCiphers != null) {
-        return false;
-      }
-    } else if (!clusterSSLCiphers.equals(other.clusterSSLCiphers)) {
-      return false;
-    }
-    if (clusterSSLEnabled != other.clusterSSLEnabled) {
-      return false;
-    }
-    if (clusterSSLKeyStore == null) {
-      if (other.clusterSSLKeyStore != null) {
-        return false;
-      }
-    } else if (!clusterSSLKeyStore.equals(other.clusterSSLKeyStore)) {
-      return false;
-    }
-    if (clusterSSLKeyStorePassword == null) {
-      if (other.clusterSSLKeyStorePassword != null) {
-        return false;
-      }
-    } else if (!clusterSSLKeyStorePassword.equals(other.clusterSSLKeyStorePassword)) {
-      return false;
-    }
-    if (clusterSSLKeyStoreType == null) {
-      if (other.clusterSSLKeyStoreType != null) {
-        return false;
-      }
-    } else if (!clusterSSLKeyStoreType.equals(other.clusterSSLKeyStoreType)) {
-      return false;
-    }
-    if (clusterSSLProperties == null) {
-      if (other.clusterSSLProperties != null) {
-        return false;
-      }
-    } else if (!clusterSSLProperties.equals(other.clusterSSLProperties)) {
-      return false;
-    }
-    if (clusterSSLProtocols == null) {
-      if (other.clusterSSLProtocols != null) {
-        return false;
-      }
-    } else if (!clusterSSLProtocols.equals(other.clusterSSLProtocols)) {
-      return false;
-    }
-    if (clusterSSLRequireAuthentication != other.clusterSSLRequireAuthentication) {
-      return false;
-    }
-    if (clusterSSLTrustStore == null) {
-      if (other.clusterSSLTrustStore != null) {
-        return false;
-      }
-    } else if (!clusterSSLTrustStore.equals(other.clusterSSLTrustStore)) {
-      return false;
-    }
-    if (clusterSSLTrustStorePassword == null) {
-      if (other.clusterSSLTrustStorePassword != null) {
-        return false;
-      }
-    } else if (!clusterSSLTrustStorePassword.equals(other.clusterSSLTrustStorePassword)) {
-      return false;
-    }
-    if (conserveSockets != other.conserveSockets) {
-      return false;
-    }
-    if (deltaPropagation != other.deltaPropagation) {
-      return false;
-    }
-    if (deployWorkingDir == null) {
-      if (other.deployWorkingDir != null) {
-        return false;
-      }
-    } else if (!deployWorkingDir.equals(other.deployWorkingDir)) {
-      return false;
-    }
-    if (disableAutoReconnect != other.disableAutoReconnect) {
-      return false;
-    }
-    if (disableTcp != other.disableTcp) {
-      return false;
-    }
-    if (distributedSystemId != other.distributedSystemId) {
-      return false;
-    }
-    if (durableClientId == null) {
-      if (other.durableClientId != null) {
-        return false;
-      }
-    } else if (!durableClientId.equals(other.durableClientId)) {
-      return false;
-    }
-    if (durableClientTimeout != other.durableClientTimeout) {
-      return false;
-    }
-    if (enableNetworkPartitionDetection != other.enableNetworkPartitionDetection) {
-      return false;
-    }
-    if (enableSharedConfiguration != other.enableSharedConfiguration) {
-      return false;
-    }
-    if (enableTimeStatistics != other.enableTimeStatistics) {
-      return false;
-    }
-    if (enforceUniqueHost != other.enforceUniqueHost) {
-      return false;
-    }
-    if (gatewaySSLEnabled != other.gatewaySSLEnabled) {
-      return false;
-    }
-    if (gatewaySSLKeyStore == null) {
-      if (other.gatewaySSLKeyStore != null) {
-        return false;
-      }
-    } else if (!gatewaySSLKeyStore.equals(other.gatewaySSLKeyStore)) {
-      return false;
-    }
-    if (gatewaySSLKeyStorePassword == null) {
-      if (other.gatewaySSLKeyStorePassword != null) {
-        return false;
-      }
-    } else if (!gatewaySSLKeyStorePassword.equals(other.gatewaySSLKeyStorePassword)) {
-      return false;
-    }
-    if (gatewaySSLKeyStoreType == null) {
-      if (other.gatewaySSLKeyStoreType != null) {
-        return false;
-      }
-    } else if (!gatewaySSLKeyStoreType.equals(other.gatewaySSLKeyStoreType)) {
-      return false;
-    }
-    if (gatewaySSLTrustStore == null) {
-      if (other.gatewaySSLTrustStore != null) {
-        return false;
-      }
-    } else if (!gatewaySSLTrustStore.equals(other.gatewaySSLTrustStore)) {
-      return false;
-    }
-    if (gatewaySSLTrustStorePassword == null) {
-      if (other.gatewaySSLTrustStorePassword != null) {
-        return false;
-      }
-    } else if (!gatewaySSLTrustStorePassword.equals(other.gatewaySSLTrustStorePassword)) {
-      return false;
-    }
-    if (gatewaySslCiphers == null) {
-      if (other.gatewaySslCiphers != null) {
-        return false;
-      }
-    } else if (!gatewaySslCiphers.equals(other.gatewaySslCiphers)) {
-      return false;
-    }
-    if (gatewaySslProperties == null) {
-      if (other.gatewaySslProperties != null) {
-        return false;
-      }
-    } else if (!gatewaySslProperties.equals(other.gatewaySslProperties)) {
-      return false;
-    }
-    if (gatewaySslProtocols == null) {
-      if (other.gatewaySslProtocols != null) {
-        return false;
-      }
-    } else if (!gatewaySslProtocols.equals(other.gatewaySslProtocols)) {
-      return false;
-    }
-    if (gatewaySslRequireAuthentication != other.gatewaySslRequireAuthentication) {
-      return false;
-    }
-    if (groups == null) {
-      if (other.groups != null) {
-        return false;
-      }
-    } else if (!groups.equals(other.groups)) {
-      return false;
-    }
-    if (httpServiceBindAddress == null) {
-      if (other.httpServiceBindAddress != null) {
-        return false;
-      }
-    } else if (!httpServiceBindAddress.equals(other.httpServiceBindAddress)) {
-      return false;
-    }
-    if (httpServicePort != other.httpServicePort) {
-      return false;
-    }
-    if (jmxManager != other.jmxManager) {
-      return false;
-    }
-    if (jmxManagerAccessFile == null) {
-      if (other.jmxManagerAccessFile != null) {
-        return false;
-      }
-    } else if (!jmxManagerAccessFile.equals(other.jmxManagerAccessFile)) {
-      return false;
-    }
-    if (jmxManagerBindAddress == null) {
-      if (other.jmxManagerBindAddress != null) {
-        return false;
-      }
-    } else if (!jmxManagerBindAddress.equals(other.jmxManagerBindAddress)) {
-      return false;
-    }
-    if (jmxManagerHostnameForClients == null) {
-      if (other.jmxManagerHostnameForClients != null) {
-        return false;
-      }
-    } else if (!jmxManagerHostnameForClients.equals(other.jmxManagerHostnameForClients)) {
-      return false;
-    }
-    if (jmxManagerHttpPort != other.jmxManagerHttpPort) {
-      return false;
-    }
-    if (jmxManagerPasswordFile == null) {
-      if (other.jmxManagerPasswordFile != null) {
-        return false;
-      }
-    } else if (!jmxManagerPasswordFile.equals(other.jmxManagerPasswordFile)) {
-      return false;
-    }
-    if (jmxManagerPort != other.jmxManagerPort) {
-      return false;
-    }
-    if (jmxManagerSSLEnabled != other.jmxManagerSSLEnabled) {
-      return false;
-    }
-    if (jmxManagerSSLKeyStore == null) {
-      if (other.jmxManagerSSLKeyStore != null) {
-        return false;
-      }
-    } else if (!jmxManagerSSLKeyStore.equals(other.jmxManagerSSLKeyStore)) {
-      return false;
-    }
-    if (jmxManagerSSLKeyStorePassword == null) {
-      if (other.jmxManagerSSLKeyStorePassword != null) {
-        return false;
-      }
-    } else if (!jmxManagerSSLKeyStorePassword.equals(other.jmxManagerSSLKeyStorePassword)) {
-      return false;
-    }
-    if (jmxManagerSSLKeyStoreType == null) {
-      if (other.jmxManagerSSLKeyStoreType != null) {
-        return false;
-      }
-    } else if (!jmxManagerSSLKeyStoreType.equals(other.jmxManagerSSLKeyStoreType)) {
-      return false;
-    }
-    if (jmxManagerSSLTrustStore == null) {
-      if (other.jmxManagerSSLTrustStore != null) {
-        return false;
-      }
-    } else if (!jmxManagerSSLTrustStore.equals(other.jmxManagerSSLTrustStore)) {
-      return false;
-    }
-    if (jmxManagerSSLTrustStorePassword == null) {
-      if (other.jmxManagerSSLTrustStorePassword != null) {
-        return false;
-      }
-    } else if (!jmxManagerSSLTrustStorePassword.equals(other.jmxManagerSSLTrustStorePassword)) {
-      return false;
-    }
-    if (jmxManagerSslCiphers == null) {
-      if (other.jmxManagerSslCiphers != null) {
-        return false;
-      }
-    } else if (!jmxManagerSslCiphers.equals(other.jmxManagerSslCiphers)) {
-      return false;
-    }
-    if (jmxManagerSslProperties == null) {
-      if (other.jmxManagerSslProperties != null) {
-        return false;
-      }
-    } else if (!jmxManagerSslProperties.equals(other.jmxManagerSslProperties)) {
-      return false;
-    }
-    if (jmxManagerSslProtocols == null) {
-      if (other.jmxManagerSslProtocols != null) {
-        return false;
-      }
-    } else if (!jmxManagerSslProtocols.equals(other.jmxManagerSslProtocols)) {
-      return false;
-    }
-    if (jmxManagerSslRequireAuthentication != other.jmxManagerSslRequireAuthentication) {
-      return false;
-    }
-    if (jmxManagerStart != other.jmxManagerStart) {
-      return false;
-    }
-    if (jmxManagerUpdateRate != other.jmxManagerUpdateRate) {
-      return false;
-    }
-    if (loadSharedConfigurationFromDir != other.loadSharedConfigurationFromDir) {
-      return false;
-    }
-    if (locators == null) {
-      if (other.locators != null) {
-        return false;
-      }
-    } else if (!locators.equals(other.locators)) {
-      return false;
-    }
-    if (locatorWaitTime != other.locatorWaitTime) {
-      return false;
-    }
-    if (logDiskSpaceLimit != other.logDiskSpaceLimit) {
-      return false;
-    }
-    if (logFile == null) {
-      if (other.logFile != null) {
-        return false;
-      }
-    } else if (!logFile.equals(other.logFile)) {
-      return false;
-    }
-    if (logFileSizeLimit != other.logFileSizeLimit) {
-      return false;
-    }
-    if (logLevel != other.logLevel) {
-      return false;
-    }
-    if (maxNumReconnectTries != other.maxNumReconnectTries) {
-      return false;
-    }
-    if (maxWaitTimeForReconnect != other.maxWaitTimeForReconnect) {
-      return false;
-    }
-    if (mcastAddress == null) {
-      if (other.mcastAddress != null) {
-        return false;
-      }
-    } else if (!mcastAddress.equals(other.mcastAddress)) {
-      return false;
-    }
-    if (mcastFlowControl == null) {
-      if (other.mcastFlowControl != null) {
-        return false;
-      }
-    } else if (!mcastFlowControl.equals(other.mcastFlowControl)) {
-      return false;
-    }
-    if (mcastPort != other.mcastPort) {
-      return false;
-    }
-    if (mcastRecvBufferSize != other.mcastRecvBufferSize) {
-      return false;
-    }
-    if (mcastSendBufferSize != other.mcastSendBufferSize) {
-      return false;
-    }
-    if (mcastTtl != other.mcastTtl) {
-      return false;
-    }
-    if (memberTimeout != other.memberTimeout) {
-      return false;
-    }
-    if (!Arrays.equals(membershipPortRange, other.membershipPortRange)) {
-      return false;
-    }
-    if (memcachedPort != other.memcachedPort) {
-      return false;
-    }
-    if (memcachedProtocol == null) {
-      if (other.memcachedProtocol != null) {
-        return false;
-      }
-    } else if (!memcachedProtocol.equals(other.memcachedProtocol)) {
-      return false;
-    }
-    if (modifiable != other.modifiable) {
-      return false;
-    }
-    if (name == null) {
-      if (other.name != null) {
-        return false;
-      }
-    } else if (!name.equals(other.name)) {
-      return false;
-    }
-    if (props == null) {
-      if (other.props != null) {
-        return false;
-      }
-    } else if (!props.equals(other.props)) {
-      return false;
-    }
-    if (redundancyZone == null) {
-      if (other.redundancyZone != null) {
-        return false;
-      }
-    } else if (!redundancyZone.equals(other.redundancyZone)) {
-      return false;
-    }
-    if (remoteLocators == null) {
-      if (other.remoteLocators != null) {
-        return false;
-      }
-    } else if (!remoteLocators.equals(other.remoteLocators)) {
-      return false;
-    }
-    if (removeUnresponsiveClient != other.removeUnresponsiveClient) {
-      return false;
-    }
-    if (roles == null) {
-      if (other.roles != null) {
-        return false;
-      }
-    } else if (!roles.equals(other.roles)) {
-      return false;
-    }
-    if (security == null) {
-      if (other.security != null) {
-        return false;
-      }
-    } else if (!security.equals(other.security)) {
-      return false;
-    }
-    if (securityClientAccessor == null) {
-      if (other.securityClientAccessor != null) {
-        return false;
-      }
-    } else if (!securityClientAccessor.equals(other.securityClientAccessor)) {
-      return false;
-    }
-    if (securityClientAccessorPP == null) {
-      if (other.securityClientAccessorPP != null) {
-        return false;
-      }
-    } else if (!securityClientAccessorPP.equals(other.securityClientAccessorPP)) {
-      return false;
-    }
-    if (securityClientAuthInit == null) {
-      if (other.securityClientAuthInit != null) {
-        return false;
-      }
-    } else if (!securityClientAuthInit.equals(other.securityClientAuthInit)) {
-      return false;
-    }
-    if (securityClientAuthenticator == null) {
-      if (other.securityClientAuthenticator != null) {
-        return false;
-      }
-    } else if (!securityClientAuthenticator.equals(other.securityClientAuthenticator)) {
-      if (securityManager == null) {
-        if (other.securityManager != null) {
-          return false;
-        }
-      } else if (!securityManager.equals(other.securityManager)) {
-        return false;
-      }
-      if (postProcessor == null) {
-        if (other.postProcessor != null) {
-          return false;
-        }
-      } else if (!postProcessor.equals(other.postProcessor)) {
-        return false;
-      }
-      if (shiroInit == null) {
-        if (other.shiroInit != null) {
-          return false;
-        }
-      } else if (!shiroInit.equals(other.shiroInit)) {
-        return false;
-      }
-    }
-    if (securityClientDHAlgo == null) {
-      if (other.securityClientDHAlgo != null) {
-        return false;
-      }
-    } else if (!securityClientDHAlgo.equals(other.securityClientDHAlgo)) {
-      return false;
-    }
-    if (securityLogFile == null) {
-      if (other.securityLogFile != null) {
-        return false;
-      }
-    } else if (!securityLogFile.equals(other.securityLogFile)) {
-      return false;
-    }
-    if (securityLogLevel != other.securityLogLevel) {
-      return false;
-    }
-    if (securityPeerAuthInit == null) {
-      if (other.securityPeerAuthInit != null) {
-        return false;
-      }
-    } else if (!securityPeerAuthInit.equals(other.securityPeerAuthInit)) {
-      return false;
-    }
-    if (securityPeerAuthenticator == null) {
-      if (other.securityPeerAuthenticator != null) {
-        return false;
-      }
-    } else if (!securityPeerAuthenticator.equals(other.securityPeerAuthenticator)) {
-      return false;
-    }
-    if (securityPeerMembershipTimeout != other.securityPeerMembershipTimeout) {
-      return false;
-    }
-    if (serverBindAddress == null) {
-      if (other.serverBindAddress != null) {
-        return false;
-      }
-    } else if (!serverBindAddress.equals(other.serverBindAddress)) {
-      return false;
-    }
-    if (serverSSLEnabled != other.serverSSLEnabled) {
-      return false;
-    }
-    if (serverSSLKeyStore == null) {
-      if (other.serverSSLKeyStore != null) {
-        return false;
-      }
-    } else if (!serverSSLKeyStore.equals(other.serverSSLKeyStore)) {
-      return false;
-    }
-    if (serverSSLKeyStorePassword == null) {
-      if (other.serverSSLKeyStorePassword != null) {
-        return false;
-      }
-    } else if (!serverSSLKeyStorePassword.equals(other.serverSSLKeyStorePassword)) {
-      return false;
-    }
-    if (serverSSLKeyStoreType == null) {
-      if (other.serverSSLKeyStoreType != null) {
-        return false;
-      }
-    } else if (!serverSSLKeyStoreType.equals(other.serverSSLKeyStoreType)) {
-      return false;
-    }
-    if (serverSSLTrustStore == null) {
-      if (other.serverSSLTrustStore != null) {
-        return false;
-      }
-    } else if (!serverSSLTrustStore.equals(other.serverSSLTrustStore)) {
-      return false;
-    }
-    if (serverSSLTrustStorePassword == null) {
-      if (other.serverSSLTrustStorePassword != null) {
-        return false;
-      }
-    } else if (!serverSSLTrustStorePassword.equals(other.serverSSLTrustStorePassword)) {
-      return false;
-    }
-    if (serverSslCiphers == null) {
-      if (other.serverSslCiphers != null) {
-        return false;
-      }
-    } else if (!serverSslCiphers.equals(other.serverSslCiphers)) {
-      return false;
-    }
-    if (serverSslProperties == null) {
-      if (other.serverSslProperties != null) {
-        return false;
-      }
-    } else if (!serverSslProperties.equals(other.serverSslProperties)) {
-      return false;
-    }
-    if (serverSslProtocols == null) {
-      if (other.serverSslProtocols != null) {
-        return false;
-      }
-    } else if (!serverSslProtocols.equals(other.serverSslProtocols)) {
-      return false;
-    }
-    if (serverSslRequireAuthentication != other.serverSslRequireAuthentication) {
-      return false;
-    }
-    if (socketBufferSize != other.socketBufferSize) {
-      return false;
-    }
-    if (socketLeaseTime != other.socketLeaseTime) {
-      return false;
-    }
-    if (sourceMap == null) {
-      if (other.sourceMap != null) {
-        return false;
-      }
-    } else if (!sourceMap.equals(other.sourceMap)) {
-      return false;
-    }
-    if (sslProperties == null) {
-      if (other.sslProperties != null) {
-        return false;
-      }
-    } else if (!sslProperties.equals(other.sslProperties)) {
-      return false;
-    }
-    if (startDevRestApi != other.startDevRestApi) {
-      return false;
-    }
-    if (startLocator == null) {
-      if (other.startLocator != null) {
-        return false;
-      }
-    } else if (!startLocator.equals(other.startLocator)) {
-      return false;
-    if (sslProtocols == null) {
-      if (other.sslProtocols != null)
-        return false;
-    } else if (!sslProtocols.equals(other.sslProtocols))
-      return false;
-    if (sslRequireAuthentication != other.sslRequireAuthentication)
-      return false;
-    if (startDevRestApi != other.startDevRestApi)
-      return false;
-    if (startLocator == null) {
-      if (other.startLocator != null)
-        return false;
-    } else if (!startLocator.equals(other.startLocator))
-      return false;
-    if (startLocatorPort != other.startLocatorPort)
-      return false;
-    if (statisticArchiveFile == null) {
-      if (other.statisticArchiveFile != null)
-        return false;
-    } else if (!statisticArchiveFile.equals(other.statisticArchiveFile))
-      return false;
-    if (statisticSampleRate != other.statisticSampleRate)
-      return false;
-    if (statisticSamplingEnabled != other.statisticSamplingEnabled)
-      return false;
-    if (tcpPort != other.tcpPort)
-      return false;
-    if (udpFragmentSize != other.udpFragmentSize)
-      return false;
-    if (udpRecvBufferSize != other.udpRecvBufferSize)
-      return false;
-    if (udpSendBufferSize != other.udpSendBufferSize)
-      return false;
-    if (useSharedConfiguration != other.useSharedConfiguration)
-      return false;
-    if (userCommandPackages == null) {
-      if (other.userCommandPackages != null)
-        return false;
-    } else if (!userCommandPackages.equals(other.userCommandPackages))
-      return false;
-    if (userDefinedProps == null) {
-      if (other.userDefinedProps != null)
-        return false;
-    } else if (!userDefinedProps.equals(other.userDefinedProps))
-      return false;
-    if (!StringUtils.equals(securityEnabledComponents, other.securityEnabledComponents)) {
-      return false;
-    }
-    }
-    if (startLocatorPort != other.startLocatorPort) {
-      return false;
-    }
-    if (statisticArchiveFile == null) {
-      if (other.statisticArchiveFile != null) {
-        return false;
-      }
-    } else if (!statisticArchiveFile.equals(other.statisticArchiveFile)) {
-      return false;
-    }
-    if (statisticSampleRate != other.statisticSampleRate) {
-      return false;
-    }
-    if (statisticSamplingEnabled != other.statisticSamplingEnabled) {
-      return false;
-    }
-    if (tcpPort != other.tcpPort) {
-      return false;
-    }
-    if (udpFragmentSize != other.udpFragmentSize) {
-      return false;
-    }
-    if (udpRecvBufferSize != other.udpRecvBufferSize) {
-      return false;
-    }
-    if (udpSendBufferSize != other.udpSendBufferSize) {
-      return false;
-    }
-    if (useSharedConfiguration != other.useSharedConfiguration) {
-      return false;
-    }
-    if (userCommandPackages == null) {
-      if (other.userCommandPackages != null) {
-        return false;
-      }
-    } else if (!userCommandPackages.equals(other.userCommandPackages)) {
-      return false;
-    }
-    if (userDefinedProps == null) {
-      if (other.userDefinedProps != null) {
-        return false;
-      }
-    } else if (!userDefinedProps.equals(other.userDefinedProps)) {
-      return false;
-    }
-    if (clusterSSLAlias != other.clusterSSLAlias) {
-      return false;
-    }
-    if (serverSSLAlias != other.serverSSLAlias) {
-      return false;
-    }
-    if (httpServiceSSLAlias != other.httpServiceSSLAlias) {
-      return false;
-    }
-    if (jmxManagerSSLAlias != other.jmxManagerSSLAlias) {
-      return false;
-    }
-    if (gatewaySSLAlias != other.gatewaySSLAlias) {
-      return false;
-    }
-    if (sslEnabledComponents != other.sslEnabledComponents) {
-      return false;
-    }
-    return true;
+
+    if (o == null || getClass() != o.getClass()) {
+      return false;
+    }
+
+    final DistributionConfigImpl that = (DistributionConfigImpl) o;
+
+    return new EqualsBuilder().append(tcpPort, that.tcpPort)
+                              .append(mcastPort, that.mcastPort)
+                              .append(mcastTtl, that.mcastTtl)
+                              .append(socketLeaseTime, that.socketLeaseTime)
+                              .append(socketBufferSize, that.socketBufferSize)
+                              .append(conserveSockets, that.conserveSockets)
+                              .append(locatorWaitTime, that.locatorWaitTime)
+                              .append(logLevel, that.logLevel)
+                              .append(startLocatorPort, that.startLocatorPort)
+                              .append(statisticSamplingEnabled, that.statisticSamplingEnabled)
+                              .append(statisticSampleRate, that.statisticSampleRate)
+                              .append(ackWaitThreshold, that.ackWaitThreshold)
+                              .append(ackForceDisconnectThreshold, that.ackForceDisconnectThreshold)
+                              .append(archiveDiskSpaceLimit, that.archiveDiskSpaceLimit)
+                              .append(archiveFileSizeLimit, that.archiveFileSizeLimit)
+                              .append(logDiskSpaceLimit, that.logDiskSpaceLimit)
+                              .append(logFileSizeLimit, that.logFileSizeLimit)
+                              .append(clusterSSLEnabled, that.clusterSSLEnabled)
+                              .append(clusterSSLRequireAuthentication, that.clusterSSLRequireAuthentication)
+                              .append(mcastSendBufferSize, that.mcastSendBufferSize)
+                              .append(mcastRecvBufferSize, that.mcastRecvBufferSize)
+                              .append(udpSendBufferSize, that.udpSendBufferSize)
+                              .append(udpRecvBufferSize, that.udpRecvBufferSize)
+                              .append(udpFragmentSize, that.udpFragmentSize)
+                              .append(disableTcp, that.disableTcp)
+                              .append(enableTimeStatistics, that.enableTimeStatistics)
+                              .append(memberTimeout, that.memberTimeout)
+                              .append(maxWaitTimeForReconnect, that.maxWaitTimeForReconnect)
+                              .append(maxNumReconnectTries, that.maxNumReconnectTries)
+                              .append(asyncDistributionTimeout, that.asyncDistributionTimeout)
+                              .append(asyncQueueTimeout, that.asyncQueueTimeout)
+                              .append(asyncMaxQueueSize, that.asyncMaxQueueSize)
+                              .append(durableClientTimeout, that.durableClientTimeout)
+                              .append(securityLogLevel, that.securityLogLevel)
+                              .append(enableNetworkPartitionDetection, that.enableNetworkPartitionDetection)
+                              .append(disableAutoReconnect, that.disableAutoReconnect)
+                              .append(securityPeerMembershipTimeout, that.securityPeerMembershipTimeout)
+                              .append(removeUnresponsiveClient, that.removeUnresponsiveClient)
+                              .append(deltaPropagation, that.deltaPropagation)
+                              .append(distributedSystemId, that.distributedSystemId)
+                              .append(enforceUniqueHost, that.enforceUniqueHost)
+                              .append(enableSharedConfiguration, that.enableSharedConfiguration)
+                              .append(useSharedConfiguration, that.useSharedConfiguration)
+                              .append(loadSharedConfigurationFromDir, that.loadSharedConfigurationFromDir)
+                              .append(httpServicePort, that.httpServicePort)
+                              .append(startDevRestApi, that.startDevRestApi)
+                              .append(memcachedPort, that.memcachedPort)
+                              .append(distributedTransactions, that.distributedTransactions)
+                              .append(redisPort, that.redisPort)
+                              .append(jmxManager, that.jmxManager)
+                              .append(jmxManagerStart, that.jmxManagerStart)
+                              .append(jmxManagerPort, that.jmxManagerPort)
+                              .append(jmxManagerHttpPort, that.jmxManagerHttpPort)
+                              .append(jmxManagerUpdateRate, that.jmxManagerUpdateRate)
+                              .append(jmxManagerSSLEnabled, that.jmxManagerSSLEnabled)
+                              .append(jmxManagerSslRequireAuthentication, that.jmxManagerSslRequireAuthentication)
+                              .append(serverSSLEnabled, that.serverSSLEnabled)
+                              .append(serverSslRequireAuthentication, that.serverSslRequireAuthentication)
+                              .append(gatewaySSLEnabled, that.gatewaySSLEnabled)
+                              .append(gatewaySslRequireAuthentication, that.gatewaySslRequireAuthentication)
+                              .append(httpServiceSSLEnabled, that.httpServiceSSLEnabled)
+                              .append(httpServiceSSLRequireAuthentication, that.httpServiceSSLRequireAuthentication)
+                              .append(sslRequireAuthentication, that.sslRequireAuthentication)
+                              .append(sslHttpServiceRequireAuthentication, that.sslHttpServiceRequireAuthentication)
+                              .append(lockMemory, that.lockMemory)
+                              .append(modifiable, that.modifiable)
+                              .append(name, that.name)
+                              .append(roles, that.roles)
+                              .append(mcastAddress, that.mcastAddress)
+                              .append(bindAddress, that.bindAddress)
+                              .append(serverBindAddress, that.serverBindAddress)
+                              .append(locators, that.locators)
+                              .append(logFile, that.logFile)
+                              .append(deployWorkingDir, that.deployWorkingDir)
+                              .append(startLocator, that.startLocator)
+                              .append(statisticArchiveFile, that.statisticArchiveFile)
+                              .append(cacheXmlFile, that.cacheXmlFile)
+                              .append(clusterSSLProtocols, that.clusterSSLProtocols)
+                              .append(clusterSSLCiphers, that.clusterSSLCiphers)
+                              .append(clusterSSLKeyStore, that.clusterSSLKeyStore)
+                              .append(clusterSSLKeyStoreType, that.clusterSSLKeyStoreType)
+                              .append(clusterSSLKeyStorePassword, that.clusterSSLKeyStorePassword)
+                              .append(clusterSSLTrustStore, that.clusterSSLTrustStore)
+                              .append(clusterSSLTrustStorePassword, that.clusterSSLTrustStorePassword)
+                              .append(clusterSSLAlias, that.clusterSSLAlias)
+                              .append(mcastFlowControl, that.mcastFlowControl)
+                              .append(membershipPortRange, that.membershipPortRange)
+                              .append(clientConflation, that.clientConflation)
+                              .append(durableClientId, that.durableClientId)
+                              .append(securityClientAuthInit, that.securityClientAuthInit)
+                              .append(securityClientAuthenticator, that.securityClientAuthenticator)
+                              .append(securityManager, that.securityManager)
+                              .append(postProcessor, that.postProcessor)
+                              .append(securityClientDHAlgo, that.securityClientDHAlgo)
+                              .append(securityPeerAuthInit, that.securityPeerAuthInit)
+                              .append(securityPeerAuthenticator, that.securityPeerAuthenticator)
+                              .append(securityClientAccessor, that.securityClientAccessor)
+                              .append(securityClientAccessorPP, that.securityClientAccessorPP)
+                              .append(securityLogFile, that.securityLogFile)
+                              .append(security, that.security)
+                              .append(userDefinedProps, that.userDefinedProps)
+                              .append(props, that.props)
+                              .append(remoteLocators, that.remoteLocators)
+                              .append(redundancyZone, that.redundancyZone)
+                              .append(sslProperties, that.sslProperties)
+                              .append(clusterSSLProperties, that.clusterSSLProperties)
+                              .append(groups, that.groups)
+                              .append(clusterConfigDir, that.clusterConfigDir)
+                              .append(httpServiceBindAddress, that.httpServiceBindAddress)
+                              .append(memcachedProtocol, that.memcachedProtocol)
+                              .append(memcachedBindAddress, that.memcachedBindAddress)
+                              .append(redisBindAddress, that.redisBindAddress)
+                              .append(redisPassword, that.redisPassword)
+                              .append(jmxManagerBindAddress, that.jmxManagerBindAddress)
+                              .append(jmxManagerHostnameForClients, that.jmxManagerHostnameForClients)
+                              .append(jmxManagerPasswordFile, that.jmxManagerPasswordFile)
+                              .append(jmxManagerAccessFile, that.jmxManagerAccessFile)
+                              .append(jmxManagerSslProtocols, that.jmxManagerSslProtocols)
+                              .append(jmxManagerSslCiphers, that.jmxManagerSslCiphers)
+                              .append(jmxManagerSslProperties, that.jmxManagerSslProperties)
+                              .append(jmxManagerSSLKeyStore, that.jmxManagerSSLKeyStore)
+                              .append(jmxManagerSSLKeyStoreType, that.jmxManagerSSLKeyStoreType)
+                              .append(jmxManagerSSLKeyStorePassword, that.jmxManagerSSLKeyStorePassword)
+                              .append(jmxManagerSSLTrustStore, that.jmxManagerSSLTrustStore)
+                              .append(jmxManagerSSLTrustStorePassword, that.jmxManagerSSLTrustStorePassword)
+                              .append(jmxManagerSSLAlias, that.jmxManagerSSLAlias)
+                              .append(serverSslProtocols, that.serverSslProtocols)
+                              .append(serverSslCiphers, that.serverSslCiphers)
+                              .append(serverSslProperties, that.serverSslProperties)
+                              .append(serverSSLKeyStore, that.serverSSLKeyStore)
+                              .append(serverSSLKeyStoreType, that.serverSSLKeyStoreType)
+                              .append(serverSSLKeyStorePassword, that.serverSSLKeyStorePassword)
+                              .append(serverSSLTrustStore, that.serverSSLTrustStore)
+                              .append(serverSSLTrustStorePassword, that.serverSSLTrustStorePassword)
+                              .append(serverSSLAlias, that.serverSSLAlias)
+                              .append(gatewaySslProtocols, that.gatewaySslProtocols)
+                              .append(gatewaySslCiphers, that.gatewaySslCiphers)
+                              .append(gatewaySslProperties, that.gatewaySslProperties)
+                              .append(gatewaySSLKeyStore, that.gatewaySSLKeyStore)
+                              .append(gatewaySSLKeyStoreType, that.gatewaySSLKeyStoreType)
+                              .append(gatewaySSLKeyStorePassword, that.gatewaySSLKeyStorePassword)
+                              .append(gatewaySSLTrustStore, that.gatewaySSLTrustStore)
+                              .append(gatewaySSLTrustStorePassword, that.gatewaySSLTrustStorePassword)
+                              .append(gatewaySSLAlias, that.gatewaySSLAlias)
+                              .append(httpServiceSSLProtocols, that.httpServiceSSLProtocols)
+                              .append(httpServiceSSLCiphers, that.httpServiceSSLCiphers)
+                              .append(httpServiceSSLProperties, that.httpServiceSSLProperties)
+                              .append(httpServiceSSLKeyStore, that.httpServiceSSLKeyStore)
+                              .append(httpServiceSSLKeyStoreType, that.httpServiceSSLKeyStoreType)
+                              .append(httpServiceSSLKeyStorePassword, that.httpServiceSSLKeyStorePassword)
+                              .append(httpServiceSSLTrustStore, that.httpServiceSSLTrustStore)
+                              .append(httpServiceSSLTrustStorePassword, that.httpServiceSSLTrustStorePassword)
+                              .append(httpServiceSSLAlias, that.httpServiceSSLAlias)
+                              .append(sslEnabledComponents, that.sslEnabledComponents)
+                              .append(sslProtocols, that.sslProtocols)
+                              .append(sslCiphers, that.sslCiphers)
+                              .append(sslKeyStore, that.sslKeyStore)
+                              .append(sslKeyStoreType, that.sslKeyStoreType)
+                              .append(sslKeyStorePassword, that.sslKeyStorePassword)
+                              .append(sslTrustStore, that.sslTrustStore)
+                              .append(sslTrustStorePassword, that.sslTrustStorePassword)
+                              .append(locatorSSLAlias, that.locatorSSLAlias)
+                              .append(sslDefaultAlias, that.sslDefaultAlias)
+                              .append(sourceMap, that.sourceMap)
+                              .append(userCommandPackages, that.userCommandPackages)
+                              .append(securityEnabledComponents, that.securityEnabledComponents)
+                              .append(offHeapMemorySize, that.offHeapMemorySize)
+                              .append(shiroInit, that.shiroInit)
+                              .isEquals();
   }
 
   /**
@@ -3449,160 +2873,182 @@ public class DistributionConfigImpl extends AbstractDistributionConfig implement
    * remove final and override this. See bug #50939.
    */
   @Override
-  public final int hashCode() {
-    // this was auto-generated using Eclipse
-    final int prime = 31;
-    int result = super.hashCode();
-    result = prime * result + ackForceDisconnectThreshold;
-    result = prime * result + ackWaitThreshold;
-    result = prime * result + archiveDiskSpaceLimit;
-    result = prime * result + archiveFileSizeLimit;
-    result = prime * result + asyncDistributionTimeout;
-    result = prime * result + asyncMaxQueueSize;
-    result = prime * result + asyncQueueTimeout;
-    result = prime * result + ((bindAddress == null) ? 0 : bindAddress.hashCode());
-    result = prime * result + ((cacheXmlFile == null) ? 0 : cacheXmlFile.hashCode());
-    result = prime * result + ((clientConflation == null) ? 0 : clientConflation.hashCode());
-    result = prime * result + ((clusterSSLCiphers == null) ? 0 : clusterSSLCiphers.hashCode());
-    result = prime * result + (clusterSSLEnabled ? 1231 : 1237);
-    result = prime * result + ((clusterSSLKeyStore == null) ? 0 : clusterSSLKeyStore.hashCode());
-    result = prime * result + ((clusterSSLKeyStorePassword == null) ? 0 : clusterSSLKeyStorePassword.hashCode());
-    result = prime * result + ((clusterSSLKeyStoreType == null) ? 0 : clusterSSLKeyStoreType.hashCode());
-    result = prime * result + ((clusterSSLProperties == null) ? 0 : clusterSSLProperties.hashCode());
-    result = prime * result + ((clusterSSLProtocols == null) ? 0 : clusterSSLProtocols.hashCode());
-    result = prime * result + (clusterSSLRequireAuthentication ? 1231 : 1237);
-    result = prime * result + ((clusterSSLTrustStore == null) ? 0 : clusterSSLTrustStore.hashCode());
-    result = prime * result + ((clusterSSLTrustStorePassword == null) ? 0 : clusterSSLTrustStorePassword.hashCode());
-    result = prime * result + (conserveSockets ? 1231 : 1237);
-    result = prime * result + (deltaPropagation ? 1231 : 1237);
-    result = prime * result + ((deployWorkingDir == null) ? 0 : deployWorkingDir.hashCode());
-    result = prime * result + (disableAutoReconnect ? 1231 : 1237);
-    result = prime * result + (disableTcp ? 1231 : 1237);
-    result = prime * result + distributedSystemId;
-    result = prime * result + ((durableClientId == null) ? 0 : durableClientId.hashCode());
-    result = prime * result + durableClientTimeout;
-    result = prime * result + (enableNetworkPartitionDetection ? 1231 : 1237);
-    result = prime * result + (enableSharedConfiguration ? 1231 : 1237);
-    result = prime * result + (enableTimeStatistics ? 1231 : 1237);
-    result = prime * result + (enforceUniqueHost ? 1231 : 1237);
-    result = prime * result + (gatewaySSLEnabled ? 1231 : 1237);
-    result = prime * result + ((gatewaySSLKeyStore == null) ? 0 : gatewaySSLKeyStore.hashCode());
-    result = prime * result + ((gatewaySSLKeyStorePassword == null) ? 0 : gatewaySSLKeyStorePassword.hashCode());
-    result = prime * result + ((gatewaySSLKeyStoreType == null) ? 0 : gatewaySSLKeyStoreType.hashCode());
-    result = prime * result + ((gatewaySSLTrustStore == null) ? 0 : gatewaySSLTrustStore.hashCode());
-    result = prime * result + ((gatewaySSLTrustStorePassword == null) ? 0 : gatewaySSLTrustStorePassword.hashCode());
-    result = prime * result + ((gatewaySslCiphers == null) ? 0 : gatewaySslCiphers.hashCode());
-    result = prime * result + ((gatewaySslProperties == null) ? 0 : gatewaySslProperties.hashCode());
-    result = prime * result + ((gatewaySslProtocols == null) ? 0 : gatewaySslProtocols.hashCode());
-    result = prime * result + (gatewaySslRequireAuthentication ? 1231 : 1237);
-    result = prime * result + ((groups == null) ? 0 : groups.hashCode());
-    result = prime * result + ((httpServiceBindAddress == null) ? 0 : httpServiceBindAddress.hashCode());
-    result = prime * result + httpServicePort;
-    result = prime * result + (jmxManager ? 1231 : 1237);
-    result = prime * result + ((jmxManagerAccessFile == null) ? 0 : jmxManagerAccessFile.hashCode());
-    result = prime * result + ((jmxManagerBindAddress == null) ? 0 : jmxManagerBindAddress.hashCode());
-    result = prime * result + ((jmxManagerHostnameForClients == null) ? 0 : jmxManagerHostnameForClients.hashCode());
-    result = prime * result + jmxManagerHttpPort;
-    result = prime * result + ((jmxManagerPasswordFile == null) ? 0 : jmxManagerPasswordFile.hashCode());
-    result = prime * result + jmxManagerPort;
-    result = prime * result + (jmxManagerSSLEnabled ? 1231 : 1237);
-    result = prime * result + ((jmxManagerSSLKeyStore == null) ? 0 : jmxManagerSSLKeyStore.hashCode());
-    result = prime * result + ((jmxManagerSSLKeyStorePassword == null) ? 0 : jmxManagerSSLKeyStorePassword.hashCode());
-    result = prime * result + ((jmxManagerSSLKeyStoreType == null) ? 0 : jmxManagerSSLKeyStoreType.hashCode());
-    result = prime * result + ((jmxManagerSSLTrustStore == null) ? 0 : jmxManagerSSLTrustStore.hashCode());
-    result = prime * result + ((jmxManagerSSLTrustStorePassword == null) ? 0 : jmxManagerSSLTrustStorePassword.hashCode());
-    result = prime * result + ((jmxManagerSslCiphers == null) ? 0 : jmxManagerSslCiphers.hashCode());
-    result = prime * result + ((jmxManagerSslProperties == null) ? 0 : jmxManagerSslProperties.hashCode());
-    result = prime * result + ((jmxManagerSslProtocols == null) ? 0 : jmxManagerSslProtocols.hashCode());
-    result = prime * result + (jmxManagerSslRequireAuthentication ? 1231 : 1237);
-    result = prime * result + (jmxManagerStart ? 1231 : 1237);
-    result = prime * result + jmxManagerUpdateRate;
-    result = prime * result + (loadSharedConfigurationFromDir ? 1231 : 1237);
-    result = prime * result + ((locators == null) ? 0 : locators.hashCode());
-    result = prime * result + logDiskSpaceLimit;
-    result = prime * result + ((logFile == null) ? 0 : logFile.hashCode());
-    result = prime * result + logFileSizeLimit;
-    result = prime * result + logLevel;
-    result = prime * result + maxNumReconnectTries;
-    result = prime * result + maxWaitTimeForReconnect;
-    result = prime * result + ((mcastAddress == null) ? 0 : mcastAddress.hashCode());
-    result = prime * result + ((mcastFlowControl == null) ? 0 : mcastFlowControl.hashCode());
-    result = prime * result + mcastPort;
-    result = prime * result + mcastRecvBufferSize;
-    result = prime * result + mcastSendBufferSize;
-    result = prime * result + mcastTtl;
-    result = prime * result + memberTimeout;
-    result = prime * result + Arrays.hashCode(membershipPortRange);
-    result = prime * result + memcachedPort;
-    result = prime * result + ((memcachedProtocol == null) ? 0 : memcachedProtocol.hashCode());
-    result = prime * result + (modifiable ? 1231 : 1237);
-    result = prime * result + ((name == null) ? 0 : name.hashCode());
-    result = prime * result + ((props == null) ? 0 : props.hashCode());
-    result = prime * result + ((redundancyZone == null) ? 0 : redundancyZone.hashCode());
-    result = prime * result + ((remoteLocators == null) ? 0 : remoteLocators.hashCode());
-    result = prime * result + (removeUnresponsiveClient ? 1231 : 1237);
-    result = prime * result + ((roles == null) ? 0 : roles.hashCode());
-    result = prime * result + ((security == null) ? 0 : security.hashCode());
-    result = prime * result + ((securityClientAccessor == null) ? 0 : securityClientAccessor.hashCode());
-    result = prime * result + ((securityClientAccessorPP == null) ? 0 : securityClientAccessorPP.hashCode());
-    result = prime * result + ((securityClientAuthInit == null) ? 0 : securityClientAuthInit.hashCode());
-    result = prime * result + ((securityClientAuthenticator == null) ? 0 : securityClientAuthenticator.hashCode());
-    result = prime * result + ((securityManager == null) ? 0 : securityManager.hashCode());
-    result = prime * result + ((postProcessor == null) ? 0 : postProcessor.hashCode());
-    result = prime * result + ((shiroInit == null) ? 0 : shiroInit.hashCode());
-    result = prime * result + ((securityClientDHAlgo == null) ? 0 : securityClientDHAlgo.hashCode());
-    result = prime * result + ((securityLogFile == null) ? 0 : securityLogFile.hashCode());
-    result = prime * result + securityLogLevel;
-    result = prime * result + ((securityPeerAuthInit == null) ? 0 : securityPeerAuthInit.hashCode());
-    result = prime * result + ((securityPeerAuthenticator == null) ? 0 : securityPeerAuthenticator.hashCode());
-    result = prime * result + securityPeerMembershipTimeout;
-    result = prime * result + ((serverBindAddress == null) ? 0 : serverBindAddress.hashCode());
-    result = prime * result + (serverSSLEnabled ? 1231 : 1237);
-    result = prime * result + ((serverSSLKeyStore == null) ? 0 : serverSSLKeyStore.hashCode());
-    result = prime * result + ((serverSSLKeyStorePassword == null) ? 0 : serverSSLKeyStorePassword.hashCode());
-    result = prime * result + ((serverSSLKeyStoreType == null) ? 0 : serverSSLKeyStoreType.hashCode());
-    result = prime * result + ((serverSSLTrustStore == null) ? 0 : serverSSLTrustStore.hashCode());
-    result = prime * result + ((serverSSLTrustStorePassword == null) ? 0 : serverSSLTrustStorePassword.hashCode());
-    result = prime * result + ((serverSslCiphers == null) ? 0 : serverSslCiphers.hashCode());
-    result = prime * result + ((serverSslProperties == null) ? 0 : serverSslProperties.hashCode());
-    result = prime * result + ((serverSslProtocols == null) ? 0 : serverSslProtocols.hashCode());
-    result = prime * result + (serverSslRequireAuthentication ? 1231 : 1237);
-    result = prime * result + socketBufferSize;
-    result = prime * result + socketLeaseTime;
-    result = prime * result + ((sourceMap == null) ? 0 : sourceMap.hashCode());
-    result = prime * result + ((sslProperties == null) ? 0 : sslProperties.hashCode());
-    result = prime * result + (startDevRestApi ? 1231 : 1237);
-    result = prime * result + ((startLocator == null) ? 0 : startLocator.hashCode());
-    result = prime * result + startLocatorPort;
-    result = prime * result + ((statisticArchiveFile == null) ? 0 : statisticArchiveFile.hashCode());
-    result = prime * result + statisticSampleRate;
-    result = prime * result + (statisticSamplingEnabled ? 1231 : 1237);
-    result = prime * result + tcpPort;
-    result = prime * result + udpFragmentSize;
-    result = prime * result + udpRecvBufferSize;
-    result = prime * result + udpSendBufferSize;
-    result = prime * result + (useSharedConfiguration ? 1231 : 1237);
-    result = prime * result
-        + ((userCommandPackages == null) ? 0 : userCommandPackages.hashCode());
-    result = prime * result
-        + ((userDefinedProps == null) ? 0 : userDefinedProps.hashCode());
-    result = prime * result + ((securityEnabledComponents == null) ? 0 : securityEnabledComponents.hashCode());
-    result = prime * result + ((userCommandPackages == null) ? 0 : userCommandPackages.hashCode());
-    result = prime * result + ((userDefinedProps == null) ? 0 : userDefinedProps.hashCode());
-    result = prime * result + ((clusterSSLAlias == null) ? 0 : clusterSSLAlias.hashCode());
-    result = prime * result + ((serverSSLAlias == null) ? 0 : serverSSLAlias.hashCode());
-    result = prime * result + ((jmxManagerSSLAlias == null) ? 0 : jmxManagerSSLAlias.hashCode());
-    result = prime * result + ((gatewaySSLAlias == null) ? 0 : gatewaySSLAlias.hashCode());
-    result = prime * result + ((httpServiceSSLAlias == null) ? 0 : httpServiceSSLAlias.hashCode());
-    result = prime * result + ((sslEnabledComponents == null) ? 0 : sslEnabledComponents.hashCode());
-    return result;
+  public int hashCode() {
+    return new HashCodeBuilder(17, 37).append(name)
+                                      .append(tcpPort)
+                                      .append(mcastPort)
+                                      .append(mcastTtl)
+                                      .append(socketLeaseTime)
+                                      .append(socketBufferSize)
+                                      .append(conserveSockets)
+                                      .append(roles)
+                                      .append(mcastAddress)
+                                      .append(bindAddress)
+                                      .append(serverBindAddress)
+                                      .append(locators)
+                                      .append(locatorWaitTime)
+                                      .append(logFile)
+                                      .append(deployWorkingDir)
+                                      .append(logLevel)
+                                      .append(startLocator)
+                                      .append(startLocatorPort)
+                                      .append(statisticSamplingEnabled)
+                                      .append(statisticSampleRate)
+                                      .append(statisticArchiveFile)
+                                      .append(ackWaitThreshold)
+                                      .append(ackForceDisconnectThreshold)
+                                      .append(cacheXmlFile)
+                                      .append(archiveDiskSpaceLimit)
+                                      .append(archiveFileSizeLimit)
+                                      .append(logDiskSpaceLimit)
+                                      .append(logFileSizeLimit)
+                                      .append(clusterSSLEnabled)
+                                      .append(clusterSSLProtocols)
+                                      .append(clusterSSLCiphers)
+                                      .append(clusterSSLRequireAuthentication)
+                                      .append(clusterSSLKeyStore)
+                                      .append(clusterSSLKeyStoreType)
+                                      .append(clusterSSLKeyStorePassword)
+                                      .append(clusterSSLTrustStore)
+                                      .append(clusterSSLTrustStorePassword)
+                                      .append(clusterSSLAlias)
+                                      .append(mcastSendBufferSize)
+                                      .append(mcastRecvBufferSize)
+                                      .append(mcastFlowControl)
+                                      .append(udpSendBufferSize)
+                                      .append(udpRecvBufferSize)
+                                      .append(udpFragmentSize)
+                                      .append(disableTcp)
+                                      .append(enableTimeStatistics)
+                                      .append(memberTimeout)
+                                      .append(membershipPortRange)
+                                      .append(maxWaitTimeForReconnect)
+                                      .append(maxNumReconnectTries)
+                                      .append(asyncDistributionTimeout)
+                                      .append(asyncQueueTimeout)
+                                      .append(asyncMaxQueueSize)
+                                      .append(clientConflation)
+                                      .append(durableClientId)
+                                      .append(durableClientTimeout)
+                                      .append(securityClientAuthInit)
+                                      .append(securityClientAuthenticator)
+                                      .append(securityManager)
+                                      .append(postProcessor)
+                                      .append(securityClientDHAlgo)
+                                      .append(securityPeerAuthInit)
+                                      .append(securityPeerAuthenticator)
+                                      .append(securityClientAccessor)
+                                      .append(securityClientAccessorPP)
+                                      .append(securityLogLevel)
+                                      .append(enableNetworkPartitionDetection)
+                                      .append(disableAutoReconnect)
+                                      .append(securityLogFile)
+                                      .append(securityPeerMembershipTimeout)
+                                      .append(security)
+                                      .append(userDefinedProps)
+                                      .append(removeUnresponsiveClient)
+                                      .append(deltaPropagation)
+                                      .append(props)
+                                      .append(distributedSystemId)
+                                      .append(remoteLocators)
+                                      .append(enforceUniqueHost)
+                                      .append(redundancyZone)
+                                      .append(sslProperties)
+                                      .append(clusterSSLProperties)
+                                      .append(groups)
+                                      .append(enableSharedConfiguration)
+                                      .append(useSharedConfiguration)
+                                      .append(loadSharedConfigurationFromDir)
+                                      .append(clusterConfigDir)
+                                      .append(httpServicePort)
+                                      .append(httpServiceBindAddress)
+                                      .append(startDevRestApi)
+                                      .append(memcachedPort)
+                                      .append(memcachedProtocol)
+                                      .append(memcachedBindAddress)
+                                      .append(distributedTransactions)
+                                      .append(redisPort)
+                                      .append(redisBindAddress)
+                                      .append(redisPassword)
+                                      .append(jmxManager)
+                                      .append(jmxManagerStart)
+                                      .append(jmxManagerPort)
+                                      .append(jmxManagerBindAddress)
+                                      .append(jmxManagerHostnameForClients)
+                                      .append(jmxManagerPasswordFile)
+                                      .append(jmxManagerAccessFile)
+                                      .append(jmxManagerHttpPort)
+                                      .append(jmxManagerUpdateRate)
+                                      .append(jmxManagerSSLEnabled)
+                                      .append(jmxManagerSslRequireAuthentication)
+                                      .append(jmxManagerSslProtocols)
+                                      .append(jmxManagerSslCiphers)
+                                      .append(jmxManagerSslProperties)
+                                      .append(jmxManagerSSLKeyStore)
+                                      .append(jmxManagerSSLKeyStoreType)
+                                      .append(jmxManagerSSLKeyStorePassword)
+                                      .append(jmxManagerSSLTrustStore)
+                                      .append(jmxManagerSSLTrustStorePassword)
+                                      .append(jmxManagerSSLAlias)
+                                      .append(serverSSLEnabled)
+                                      .append(serverSslRequireAuthentication)
+                                      .append(serverSslProtocols)
+                                      .append(serverSslCiphers)
+                                      .append(serverSslProperties)
+                                      .append(serverSSLKeyStore)
+                                      .append(serverSSLKeyStoreType)
+                                      .append(serverSSLKeyStorePassword)
+                                      .append(serverSSLTrustStore)
+                                      .append(serverSSLTrustStorePassword)
+                                      .append(serverSSLAlias)
+                                      .append(gatewaySSLEnabled)
+                                      .append(gatewaySslRequireAuthentication)
+                                      .append(gatewaySslProtocols)
+                                      .append(gatewaySslCiphers)
+                                      .append(gatewaySslProperties)
+                                      .append(gatewaySSLKeyStore)
+                                      .append(gatewaySSLKeyStoreType)
+                                      .append(gatewaySSLKeyStorePassword)
+                                      .append(gatewaySSLTrustStore)
+                                      .append(gatewaySSLTrustStorePassword)
+                                      .append(gatewaySSLAlias)
+                                      .append(httpServiceSSLEnabled)
+                                      .append(httpServiceSSLRequireAuthentication)
+                                      .append(httpServiceSSLProtocols)
+                                      .append(httpServiceSSLCiphers)
+                                      .append(httpServiceSSLProperties)
+                                      .append(httpServiceSSLKeyStore)
+                                      .append(httpServiceSSLKeyStoreType)
+                                      .append(httpServiceSSLKeyStorePassword)
+                                      .append(httpServiceSSLTrustStore)
+                                      .append(httpServiceSSLTrustStorePassword)
+                                      .append(httpServiceSSLAlias)
+                                      .append(sslEnabledComponents)
+                                      .append(sslProtocols)
+                                      .append(sslCiphers)
+                                      .append(sslRequireAuthentication)
+                                      .append(sslKeyStore)
+                                      .append(sslKeyStoreType)
+                                      .append(sslKeyStorePassword)
+                                      .append(sslTrustStore)
+                                      .append(sslTrustStorePassword)
+                                      .append(sslHttpServiceRequireAuthentication)
+                                      .append(locatorSSLAlias)
+                                      .append(sslDefaultAlias)
+                                      .append(sourceMap)
+                                      .append(userCommandPackages)
+                                      .append(securityEnabledComponents)
+                                      .append(offHeapMemorySize)
+                                      .append(lockMemory)
+                                      .append(shiroInit)
+                                      .append(modifiable)
+                                      .toHashCode();
   }
 
   /**
    * Used by gemfire build.xml to generate a default gemfire.properties
    * for use by applications. See bug 30995 for the feature request.
-   */
-  public static void main(String args[]) throws IOException {
+   */ public static void main(String args[]) throws IOException {
     DistributionConfigImpl cfg = new DistributionConfigImpl();
     String fileName = DistributionConfig.GEMFIRE_PREFIX + "properties";
     if (args != null && args.length > 0) {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/981f2f0b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/InternalDistributedSystem.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/InternalDistributedSystem.java b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/InternalDistributedSystem.java
index 79de8f1..94d0ede 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/InternalDistributedSystem.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/InternalDistributedSystem.java
@@ -72,16 +72,8 @@ import com.gemstone.gemfire.distributed.internal.membership.gms.mgr.GMSMembershi
 import com.gemstone.gemfire.i18n.LogWriterI18n;
 import com.gemstone.gemfire.internal.Assert;
 import com.gemstone.gemfire.internal.DSFIDFactory;
-import com.gemstone.gemfire.internal.DummyStatisticsImpl;
-import com.gemstone.gemfire.internal.GemFireStatSampler;
 import com.gemstone.gemfire.internal.InternalDataSerializer;
 import com.gemstone.gemfire.internal.InternalInstantiator;
-import com.gemstone.gemfire.internal.LinuxProcFsStatistics;
-import com.gemstone.gemfire.internal.LocalStatisticsImpl;
-import com.gemstone.gemfire.internal.OsStatisticsFactory;
-import com.gemstone.gemfire.internal.StatisticsImpl;
-import com.gemstone.gemfire.internal.StatisticsManager;
-import com.gemstone.gemfire.internal.StatisticsTypeFactoryImpl;
 import com.gemstone.gemfire.internal.SystemTimer;
 import com.gemstone.gemfire.internal.admin.remote.DistributionLocatorId;
 import com.gemstone.gemfire.internal.cache.CacheConfig;
@@ -101,7 +93,6 @@ import com.gemstone.gemfire.internal.logging.log4j.AlertAppender;
 import com.gemstone.gemfire.internal.logging.log4j.LocalizedMessage;
 import com.gemstone.gemfire.internal.logging.log4j.LogWriterAppender;
 import com.gemstone.gemfire.internal.logging.log4j.LogWriterAppenders;
-import com.gemstone.gemfire.internal.net.SSLConfigurationFactory;
 import com.gemstone.gemfire.internal.net.SocketCreatorFactory;
 import com.gemstone.gemfire.internal.offheap.MemoryAllocator;
 import com.gemstone.gemfire.internal.offheap.OffHeapStorage;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/981f2f0b/geode-core/src/main/java/com/gemstone/gemfire/internal/SystemAdmin.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/SystemAdmin.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/SystemAdmin.java
index 81d9ec8..555683f 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/SystemAdmin.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/SystemAdmin.java
@@ -27,8 +27,6 @@ import com.gemstone.gemfire.distributed.DistributedMember;
 import com.gemstone.gemfire.distributed.internal.*;
 import com.gemstone.gemfire.distributed.internal.membership.InternalDistributedMember;
 import com.gemstone.gemfire.distributed.internal.tcpserver.*;
-import com.gemstone.gemfire.internal.StatArchiveReader.ResourceInst;
-import com.gemstone.gemfire.internal.StatArchiveReader.StatValue;
 import com.gemstone.gemfire.internal.statistics.StatArchiveReader;
 import com.gemstone.gemfire.internal.statistics.StatArchiveReader.ResourceInst;
 import com.gemstone.gemfire.internal.statistics.StatArchiveReader.StatValue;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/981f2f0b/geode-core/src/main/java/com/gemstone/gemfire/internal/statistics/HostStatHelper.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/statistics/HostStatHelper.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/statistics/HostStatHelper.java
index d965d92..5aacf01 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/statistics/HostStatHelper.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/statistics/HostStatHelper.java
@@ -17,11 +17,9 @@
 package com.gemstone.gemfire.internal.statistics;
 
 import com.gemstone.gemfire.*;
-//import com.gemstone.gemfire.util.*;
 import com.gemstone.gemfire.internal.PureJavaMode;
-import com.gemstone.gemfire.internal.SocketCreator;
-import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
 import com.gemstone.gemfire.internal.net.SocketCreator;
+import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
 
 import com.gemstone.gemfire.internal.statistics.platform.LinuxProcFsStatistics;
 import com.gemstone.gemfire.internal.statistics.platform.LinuxProcessStats;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/981f2f0b/geode-core/src/main/java/com/gemstone/gemfire/internal/statistics/HostStatSampler.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/statistics/HostStatSampler.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/statistics/HostStatSampler.java
index d7c3419..fc3f4ec 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/statistics/HostStatSampler.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/statistics/HostStatSampler.java
@@ -22,17 +22,12 @@ import com.gemstone.gemfire.Statistics;
 import com.gemstone.gemfire.SystemFailure;
 import com.gemstone.gemfire.distributed.internal.DistributionConfig;
 import com.gemstone.gemfire.internal.NanoTimer;
-import com.gemstone.gemfire.internal.SocketCreator;
+import com.gemstone.gemfire.internal.net.SocketCreator;
 import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
 import com.gemstone.gemfire.internal.logging.LogService;
 import com.gemstone.gemfire.internal.logging.LoggingThreadGroup;
 import com.gemstone.gemfire.internal.logging.log4j.LocalizedMessage;
 import com.gemstone.gemfire.internal.logging.log4j.LogMarker;
-import com.gemstone.gemfire.internal.net.SocketCreator;
-import com.gemstone.gemfire.internal.statistics.CallbackSampler;
-import com.gemstone.gemfire.internal.statistics.SampleCollector;
-import com.gemstone.gemfire.internal.statistics.StatArchiveHandlerConfig;
-import com.gemstone.gemfire.internal.statistics.StatisticsSampler;
 import com.gemstone.gemfire.internal.statistics.platform.OsStatisticsFactory;
 import com.gemstone.gemfire.internal.util.concurrent.StoppableCountDownLatch;
 import org.apache.logging.log4j.Logger;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/981f2f0b/geode-core/src/main/java/com/gemstone/gemfire/internal/statistics/StatArchiveWriter.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/statistics/StatArchiveWriter.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/statistics/StatArchiveWriter.java
index ef3a91a..c94935b 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/statistics/StatArchiveWriter.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/statistics/StatArchiveWriter.java
@@ -21,15 +21,10 @@ import com.gemstone.gemfire.InternalGemFireException;
 import com.gemstone.gemfire.StatisticDescriptor;
 import com.gemstone.gemfire.distributed.internal.DistributionConfig;
 import com.gemstone.gemfire.internal.NanoTimer;
-import com.gemstone.gemfire.internal.SocketCreator;
+import com.gemstone.gemfire.internal.net.SocketCreator;
 import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
 import com.gemstone.gemfire.internal.logging.LogService;
 import com.gemstone.gemfire.internal.logging.log4j.LogMarker;
-import com.gemstone.gemfire.internal.net.SocketCreator;
-import com.gemstone.gemfire.internal.statistics.ResourceInstance;
-import com.gemstone.gemfire.internal.statistics.ResourceType;
-import com.gemstone.gemfire.internal.statistics.SampleHandler;
-import com.gemstone.gemfire.internal.statistics.StatArchiveDescriptor;
 
 import org.apache.logging.log4j.Logger;
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/981f2f0b/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/DistributionConfigJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/DistributionConfigJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/DistributionConfigJUnitTest.java
index 47cc08c..3680a39 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/DistributionConfigJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/DistributionConfigJUnitTest.java
@@ -116,7 +116,7 @@ public class DistributionConfigJUnitTest {
     //TODO - This makes no sense. One has no idea what the correct expected number of attributes are.
     assertEquals(29, boolList.size());
     assertEquals(33, intList.size());
-    assertEquals(84, stringList.size());
+    assertEquals(85, stringList.size());
     assertEquals(5, fileList.size());
     assertEquals(4, otherList.size());
   }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/981f2f0b/geode-core/src/test/java/com/gemstone/gemfire/internal/statistics/GemFireStatSamplerIntegrationTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/statistics/GemFireStatSamplerIntegrationTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/statistics/GemFireStatSamplerIntegrationTest.java
index 0e87a47..99110f7 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/statistics/GemFireStatSamplerIntegrationTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/statistics/GemFireStatSamplerIntegrationTest.java
@@ -44,13 +44,9 @@ import com.gemstone.gemfire.distributed.DistributedSystem;
 import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem;
 import com.gemstone.gemfire.internal.GemFireVersion;
 import com.gemstone.gemfire.internal.PureJavaMode;
-import com.gemstone.gemfire.internal.SocketCreator;
 import com.gemstone.gemfire.internal.cache.control.HeapMemoryMonitor;
 import com.gemstone.gemfire.internal.logging.LogService;
 import com.gemstone.gemfire.internal.net.SocketCreator;
-import com.gemstone.gemfire.internal.statistics.SampleCollector;
-import com.gemstone.gemfire.internal.statistics.StatArchiveHandler;
-import com.gemstone.gemfire.internal.statistics.StatArchiveHandlerConfig;
 import com.gemstone.gemfire.internal.statistics.GemFireStatSampler.LocalStatListenerImpl;
 import com.gemstone.gemfire.internal.statistics.platform.OsStatisticsFactory;
 import com.gemstone.gemfire.internal.statistics.platform.ProcessStats;


[10/50] [abbrv] incubator-geode git commit: GEODE-1792: Revert: Changed protocols and ciphers to be comma separated Make ssl-ciphers and ssl-protocols comma separated properties. The legacy *-ssl-ciphers and *-ssl-protocols still use space separated.

Posted by ud...@apache.org.
GEODE-1792: Revert:  Changed protocols and ciphers to be comma separated
Make ssl-ciphers and ssl-protocols comma separated properties.
The legacy *-ssl-ciphers and *-ssl-protocols still use space separated.


Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/86df8023
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/86df8023
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/86df8023

Branch: refs/heads/develop
Commit: 86df802349e240d3a42d316722d1a170bdbbf97c
Parents: 6ffa652
Author: Udo Kohlmeyer <uk...@pivotal.io>
Authored: Fri Aug 19 06:33:13 2016 +1000
Committer: Udo Kohlmeyer <uk...@pivotal.io>
Committed: Fri Aug 19 06:33:13 2016 +1000

----------------------------------------------------------------------
 .../gemfire/distributed/internal/tcpserver/TcpServer.java     | 7 -------
 .../com/gemstone/gemfire/distributed/LocatorDUnitTest.java    | 3 +++
 .../distributed/internal/DistributionConfigJUnitTest.java     | 2 +-
 .../com/gemstone/gemfire/codeAnalysis/excludedClasses.txt     | 1 +
 4 files changed, 5 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/86df8023/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/tcpserver/TcpServer.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/tcpserver/TcpServer.java b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/tcpserver/TcpServer.java
index 6508f1b..36d05f0 100755
--- a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/tcpserver/TcpServer.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/tcpserver/TcpServer.java
@@ -205,13 +205,6 @@ public class TcpServer {
   }
 
   private void startServerThread() throws IOException {
-    //TODO Udo: clean this up
-    if(srv_sock != null){
-      throw new RuntimeException("TcpServer.startServerThread + SrvSocket not null");
-    }
-    if(srv_sock != null && !srv_sock.isClosed()){
-      throw new RuntimeException("TcpServer.startServerThread + SrvSocket not closed");
-    }
     if (srv_sock == null || srv_sock.isClosed()) {
       if (bind_address == null) {
         srv_sock = socketCreator.createServerSocket(port, BACKLOG);

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/86df8023/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorDUnitTest.java
index 8bfce23..7d95e4a 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorDUnitTest.java
@@ -498,6 +498,8 @@ public class LocatorDUnitTest extends JUnit4DistributedTestCase {
   @Category(FlakyTest.class)
   public void testStartTwoLocatorsOneWithNonSSLAndTheOtherSSL() throws Exception {
     IgnoredException expectedException = IgnoredException.addIgnoredException("Remote host closed connection during handshake");
+
+    IgnoredException expectedException2 = IgnoredException.addIgnoredException("Unrecognized SSL message, plaintext connection");
     disconnectAllFromDS();
     Host host = Host.getHost(0);
     VM loc1 = host.getVM(1);
@@ -543,6 +545,7 @@ public class LocatorDUnitTest extends JUnit4DistributedTestCase {
       } finally {
         loc1.invoke("stop locator", () -> stopLocator());
         expectedException.remove();
+        expectedException2.remove();
       }
     }
   }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/86df8023/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/DistributionConfigJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/DistributionConfigJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/DistributionConfigJUnitTest.java
index 56b35ea..a843457 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/DistributionConfigJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/DistributionConfigJUnitTest.java
@@ -111,7 +111,7 @@ public class DistributionConfigJUnitTest {
     System.out.println("otherList: " + otherList);
 
     //TODO - This makes no sense. One has no idea what the correct expected number of attributes are.
-    assertEquals(28, boolList.size());
+    assertEquals(29, boolList.size());
     assertEquals(33, intList.size());
     assertEquals(84, stringList.size());
     assertEquals(5, fileList.size());

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/86df8023/geode-core/src/test/resources/com/gemstone/gemfire/codeAnalysis/excludedClasses.txt
----------------------------------------------------------------------
diff --git a/geode-core/src/test/resources/com/gemstone/gemfire/codeAnalysis/excludedClasses.txt b/geode-core/src/test/resources/com/gemstone/gemfire/codeAnalysis/excludedClasses.txt
index ac707b6..87f9374 100644
--- a/geode-core/src/test/resources/com/gemstone/gemfire/codeAnalysis/excludedClasses.txt
+++ b/geode-core/src/test/resources/com/gemstone/gemfire/codeAnalysis/excludedClasses.txt
@@ -151,3 +151,4 @@ com/gemstone/gemfire/internal/cache/operations/ContainsKeyOperationContext
 org/apache/geode/security/ResourcePermission
 org/apache/geode/security/ResourcePermission$Operation
 org/apache/geode/security/ResourcePermission$Resource
+com/gemstone/gemfire/distributed/internal/tcpserver/LocatorCancelException


[02/50] [abbrv] incubator-geode git commit: GEODE-420: fixing tests

Posted by ud...@apache.org.
GEODE-420: fixing tests


Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/31cbd2f2
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/31cbd2f2
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/31cbd2f2

Branch: refs/heads/develop
Commit: 31cbd2f2b7bcf423656e1962df8e58e913f20492
Parents: 887f1df
Author: Udo Kohlmeyer <uk...@pivotal.io>
Authored: Tue Aug 16 15:08:05 2016 +1000
Committer: Udo Kohlmeyer <uk...@pivotal.io>
Committed: Tue Aug 16 15:08:05 2016 +1000

----------------------------------------------------------------------
 .../java/com/gemstone/gemfire/distributed/LocatorDUnitTest.java | 5 +++++
 .../java/com/gemstone/gemfire/management/JMXMBeanDUnitTest.java | 4 +++-
 2 files changed, 8 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/31cbd2f2/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorDUnitTest.java
index 323bc5c..9fe4e8f 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorDUnitTest.java
@@ -26,6 +26,7 @@ import java.util.List;
 import java.util.Properties;
 import java.util.Set;
 
+import com.sun.xml.internal.ws.api.FeatureListValidatorAnnotation;
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
 
@@ -69,6 +70,7 @@ import com.gemstone.gemfire.test.dunit.Wait;
 import com.gemstone.gemfire.test.dunit.WaitCriterion;
 import com.gemstone.gemfire.test.dunit.internal.JUnit4DistributedTestCase;
 import com.gemstone.gemfire.test.junit.categories.DistributedTest;
+import com.gemstone.gemfire.test.junit.categories.FlakyTest;
 import com.gemstone.gemfire.util.test.TestUtil;
 
 /**
@@ -434,6 +436,7 @@ public class LocatorDUnitTest extends JUnit4DistributedTestCase {
   }
 
   @Test
+  @Category(FlakyTest.class)
   public void testStartTwoLocatorsOneWithSSLAndTheOtherNonSSL() throws Exception {
     SocketCreatorFactory.close();
     IgnoredException expectedException = IgnoredException.addIgnoredException("Unrecognized SSL message, plaintext connection");
@@ -493,6 +496,7 @@ public class LocatorDUnitTest extends JUnit4DistributedTestCase {
   }
 
   @Test
+  @Category(FlakyTest.class)
   public void testStartTwoLocatorsOneWithNonSSLAndTheOtherSSL() throws Exception {
     SocketCreatorFactory.close();
     IgnoredException expectedException = IgnoredException.addIgnoredException("Remote host closed connection during handshake");
@@ -546,6 +550,7 @@ public class LocatorDUnitTest extends JUnit4DistributedTestCase {
   }
 
   @Test
+  @Category(FlakyTest.class)
   public void testStartTwoLocatorsWithDifferentSSLCertificates() throws Exception {
     SocketCreatorFactory.close();
     IgnoredException expectedException = IgnoredException.addIgnoredException("Remote host closed connection during handshake");

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/31cbd2f2/geode-core/src/test/java/com/gemstone/gemfire/management/JMXMBeanDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/JMXMBeanDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/JMXMBeanDUnitTest.java
index 1b2115e..786d405 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/JMXMBeanDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/JMXMBeanDUnitTest.java
@@ -38,6 +38,7 @@ import org.junit.Before;
 import org.junit.Ignore;
 import org.junit.Rule;
 import org.junit.Test;
+import org.junit.experimental.categories.Category;
 
 import com.gemstone.gemfire.distributed.AbstractLauncher;
 import com.gemstone.gemfire.distributed.LocatorLauncher;
@@ -51,6 +52,7 @@ import com.gemstone.gemfire.test.dunit.Invoke;
 import com.gemstone.gemfire.test.dunit.NetworkUtils;
 import com.gemstone.gemfire.test.dunit.VM;
 import com.gemstone.gemfire.test.dunit.rules.DistributedRestoreSystemProperties;
+import com.gemstone.gemfire.test.junit.categories.FlakyTest;
 import com.gemstone.gemfire.test.junit.rules.serializable.SerializableTemporaryFolder;
 import com.gemstone.gemfire.util.test.TestUtil;
 
@@ -149,7 +151,7 @@ public class JMXMBeanDUnitTest extends DistributedTestCase {
   }
 
   @Test
-  @Ignore
+  @Category(FlakyTest.class)
   //To be fixed in GEODE-1716
   public void testJMXOverNonSSL() throws Exception {
     locator.invoke("Configure and start Locator", () -> {


[44/50] [abbrv] incubator-geode git commit: GEODE-420: Renaming of SecurableComponents to SecurableCommunicationChannel Renaming of HTTP_SERVICE -> WEB

Posted by ud...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8ff5e7a4/geode-core/src/test/java/com/gemstone/gemfire/internal/net/SocketCreatorFactoryJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/net/SocketCreatorFactoryJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/net/SocketCreatorFactoryJUnitTest.java
index 7c2b729..938d5f6 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/net/SocketCreatorFactoryJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/net/SocketCreatorFactoryJUnitTest.java
@@ -26,7 +26,7 @@ import org.junit.Test;
 import org.junit.experimental.categories.Category;
 
 import com.gemstone.gemfire.distributed.internal.DistributionConfigImpl;
-import com.gemstone.gemfire.internal.security.SecurableComponent;
+import com.gemstone.gemfire.internal.security.SecurableCommunicationChannel;
 import com.gemstone.gemfire.test.dunit.Assert;
 import com.gemstone.gemfire.test.junit.categories.UnitTest;
 import com.gemstone.gemfire.util.test.TestUtil;
@@ -36,144 +36,144 @@ public class SocketCreatorFactoryJUnitTest extends JSSESocketJUnitTest {
 
   @Test
   public void testNewSSLConfigSSLComponentLocator() {
-    Properties properties = configureSSLProperties(SecurableComponent.LOCATOR.getConstant());
+    Properties properties = configureSSLProperties(SecurableCommunicationChannel.LOCATOR.getConstant());
 
     DistributionConfigImpl distributionConfig = new DistributionConfigImpl(properties);
     SocketCreatorFactory.setDistributionConfig(distributionConfig);
 
-    Assert.assertTrue(SocketCreatorFactory.getSocketCreatorForComponent(SecurableComponent.LOCATOR).useSSL());
-    Assert.assertFalse(SocketCreatorFactory.getSocketCreatorForComponent(SecurableComponent.CLUSTER).useSSL());
-    Assert.assertFalse(SocketCreatorFactory.getSocketCreatorForComponent(SecurableComponent.GATEWAY).useSSL());
-    Assert.assertFalse(SocketCreatorFactory.getSocketCreatorForComponent(SecurableComponent.JMX).useSSL());
-    Assert.assertFalse(SocketCreatorFactory.getSocketCreatorForComponent(SecurableComponent.SERVER).useSSL());
-    Assert.assertFalse(SocketCreatorFactory.getSocketCreatorForComponent(SecurableComponent.HTTP_SERVICE).useSSL());
+    Assert.assertTrue(SocketCreatorFactory.getSocketCreatorForComponent(SecurableCommunicationChannel.LOCATOR).useSSL());
+    Assert.assertFalse(SocketCreatorFactory.getSocketCreatorForComponent(SecurableCommunicationChannel.CLUSTER).useSSL());
+    Assert.assertFalse(SocketCreatorFactory.getSocketCreatorForComponent(SecurableCommunicationChannel.GATEWAY).useSSL());
+    Assert.assertFalse(SocketCreatorFactory.getSocketCreatorForComponent(SecurableCommunicationChannel.JMX).useSSL());
+    Assert.assertFalse(SocketCreatorFactory.getSocketCreatorForComponent(SecurableCommunicationChannel.SERVER).useSSL());
+    Assert.assertFalse(SocketCreatorFactory.getSocketCreatorForComponent(SecurableCommunicationChannel.WEB).useSSL());
   }
 
   @Test
   public void testNewSSLConfigSSLComponentALL() {
-    Properties properties = configureSSLProperties(SecurableComponent.ALL.getConstant());
+    Properties properties = configureSSLProperties(SecurableCommunicationChannel.ALL.getConstant());
 
     DistributionConfigImpl distributionConfig = new DistributionConfigImpl(properties);
     SocketCreatorFactory.setDistributionConfig(distributionConfig);
 
-    Assert.assertTrue(SocketCreatorFactory.getSocketCreatorForComponent(SecurableComponent.CLUSTER).useSSL());
-    Assert.assertTrue(SocketCreatorFactory.getSocketCreatorForComponent(SecurableComponent.LOCATOR).useSSL());
-    Assert.assertTrue(SocketCreatorFactory.getSocketCreatorForComponent(SecurableComponent.GATEWAY).useSSL());
-    Assert.assertTrue(SocketCreatorFactory.getSocketCreatorForComponent(SecurableComponent.JMX).useSSL());
-    Assert.assertTrue(SocketCreatorFactory.getSocketCreatorForComponent(SecurableComponent.SERVER).useSSL());
-    Assert.assertTrue(SocketCreatorFactory.getSocketCreatorForComponent(SecurableComponent.HTTP_SERVICE).useSSL());
+    Assert.assertTrue(SocketCreatorFactory.getSocketCreatorForComponent(SecurableCommunicationChannel.CLUSTER).useSSL());
+    Assert.assertTrue(SocketCreatorFactory.getSocketCreatorForComponent(SecurableCommunicationChannel.LOCATOR).useSSL());
+    Assert.assertTrue(SocketCreatorFactory.getSocketCreatorForComponent(SecurableCommunicationChannel.GATEWAY).useSSL());
+    Assert.assertTrue(SocketCreatorFactory.getSocketCreatorForComponent(SecurableCommunicationChannel.JMX).useSSL());
+    Assert.assertTrue(SocketCreatorFactory.getSocketCreatorForComponent(SecurableCommunicationChannel.SERVER).useSSL());
+    Assert.assertTrue(SocketCreatorFactory.getSocketCreatorForComponent(SecurableCommunicationChannel.WEB).useSSL());
   }
 
   @Test
   public void testNewSSLConfigSSLComponentCLUSTER() {
-    Properties properties = configureSSLProperties(SecurableComponent.CLUSTER.getConstant());
+    Properties properties = configureSSLProperties(SecurableCommunicationChannel.CLUSTER.getConstant());
 
     DistributionConfigImpl distributionConfig = new DistributionConfigImpl(properties);
     SocketCreatorFactory.setDistributionConfig(distributionConfig);
 
-    Assert.assertTrue(SocketCreatorFactory.getSocketCreatorForComponent(SecurableComponent.CLUSTER).useSSL());
-    Assert.assertFalse(SocketCreatorFactory.getSocketCreatorForComponent(SecurableComponent.GATEWAY).useSSL());
-    Assert.assertFalse(SocketCreatorFactory.getSocketCreatorForComponent(SecurableComponent.JMX).useSSL());
-    Assert.assertFalse(SocketCreatorFactory.getSocketCreatorForComponent(SecurableComponent.SERVER).useSSL());
-    Assert.assertFalse(SocketCreatorFactory.getSocketCreatorForComponent(SecurableComponent.HTTP_SERVICE).useSSL());
-    Assert.assertFalse(SocketCreatorFactory.getSocketCreatorForComponent(SecurableComponent.LOCATOR).useSSL());
+    Assert.assertTrue(SocketCreatorFactory.getSocketCreatorForComponent(SecurableCommunicationChannel.CLUSTER).useSSL());
+    Assert.assertFalse(SocketCreatorFactory.getSocketCreatorForComponent(SecurableCommunicationChannel.GATEWAY).useSSL());
+    Assert.assertFalse(SocketCreatorFactory.getSocketCreatorForComponent(SecurableCommunicationChannel.JMX).useSSL());
+    Assert.assertFalse(SocketCreatorFactory.getSocketCreatorForComponent(SecurableCommunicationChannel.SERVER).useSSL());
+    Assert.assertFalse(SocketCreatorFactory.getSocketCreatorForComponent(SecurableCommunicationChannel.WEB).useSSL());
+    Assert.assertFalse(SocketCreatorFactory.getSocketCreatorForComponent(SecurableCommunicationChannel.LOCATOR).useSSL());
   }
 
   @Test
   public void testNewSSLConfigSSLComponentGATEWAY() {
-    Properties properties = configureSSLProperties(SecurableComponent.GATEWAY.getConstant());
+    Properties properties = configureSSLProperties(SecurableCommunicationChannel.GATEWAY.getConstant());
 
     DistributionConfigImpl distributionConfig = new DistributionConfigImpl(properties);
     SocketCreatorFactory.setDistributionConfig(distributionConfig);
 
-    Assert.assertFalse(SocketCreatorFactory.getSocketCreatorForComponent(SecurableComponent.CLUSTER).useSSL());
-    Assert.assertTrue(SocketCreatorFactory.getSocketCreatorForComponent(SecurableComponent.GATEWAY).useSSL());
-    Assert.assertFalse(SocketCreatorFactory.getSocketCreatorForComponent(SecurableComponent.JMX).useSSL());
-    Assert.assertFalse(SocketCreatorFactory.getSocketCreatorForComponent(SecurableComponent.SERVER).useSSL());
-    Assert.assertFalse(SocketCreatorFactory.getSocketCreatorForComponent(SecurableComponent.HTTP_SERVICE).useSSL());
-    Assert.assertFalse(SocketCreatorFactory.getSocketCreatorForComponent(SecurableComponent.LOCATOR).useSSL());
+    Assert.assertFalse(SocketCreatorFactory.getSocketCreatorForComponent(SecurableCommunicationChannel.CLUSTER).useSSL());
+    Assert.assertTrue(SocketCreatorFactory.getSocketCreatorForComponent(SecurableCommunicationChannel.GATEWAY).useSSL());
+    Assert.assertFalse(SocketCreatorFactory.getSocketCreatorForComponent(SecurableCommunicationChannel.JMX).useSSL());
+    Assert.assertFalse(SocketCreatorFactory.getSocketCreatorForComponent(SecurableCommunicationChannel.SERVER).useSSL());
+    Assert.assertFalse(SocketCreatorFactory.getSocketCreatorForComponent(SecurableCommunicationChannel.WEB).useSSL());
+    Assert.assertFalse(SocketCreatorFactory.getSocketCreatorForComponent(SecurableCommunicationChannel.LOCATOR).useSSL());
   }
 
   @Test
   public void testNewSSLConfigSSLComponentHTTP_SERVICE() {
-    Properties properties = configureSSLProperties(SecurableComponent.HTTP_SERVICE.getConstant());
+    Properties properties = configureSSLProperties(SecurableCommunicationChannel.WEB.getConstant());
 
     DistributionConfigImpl distributionConfig = new DistributionConfigImpl(properties);
     SocketCreatorFactory.setDistributionConfig(distributionConfig);
 
-    Assert.assertFalse(SocketCreatorFactory.getSocketCreatorForComponent(SecurableComponent.CLUSTER).useSSL());
-    Assert.assertFalse(SocketCreatorFactory.getSocketCreatorForComponent(SecurableComponent.GATEWAY).useSSL());
-    Assert.assertFalse(SocketCreatorFactory.getSocketCreatorForComponent(SecurableComponent.JMX).useSSL());
-    Assert.assertFalse(SocketCreatorFactory.getSocketCreatorForComponent(SecurableComponent.SERVER).useSSL());
-    Assert.assertTrue(SocketCreatorFactory.getSocketCreatorForComponent(SecurableComponent.HTTP_SERVICE).useSSL());
-    Assert.assertFalse(SocketCreatorFactory.getSocketCreatorForComponent(SecurableComponent.LOCATOR).useSSL());
+    Assert.assertFalse(SocketCreatorFactory.getSocketCreatorForComponent(SecurableCommunicationChannel.CLUSTER).useSSL());
+    Assert.assertFalse(SocketCreatorFactory.getSocketCreatorForComponent(SecurableCommunicationChannel.GATEWAY).useSSL());
+    Assert.assertFalse(SocketCreatorFactory.getSocketCreatorForComponent(SecurableCommunicationChannel.JMX).useSSL());
+    Assert.assertFalse(SocketCreatorFactory.getSocketCreatorForComponent(SecurableCommunicationChannel.SERVER).useSSL());
+    Assert.assertTrue(SocketCreatorFactory.getSocketCreatorForComponent(SecurableCommunicationChannel.WEB).useSSL());
+    Assert.assertFalse(SocketCreatorFactory.getSocketCreatorForComponent(SecurableCommunicationChannel.LOCATOR).useSSL());
   }
 
   @Test
   public void testNewSSLConfigSSLComponentJMX() {
-    Properties properties = configureSSLProperties(SecurableComponent.JMX.getConstant());
+    Properties properties = configureSSLProperties(SecurableCommunicationChannel.JMX.getConstant());
 
     DistributionConfigImpl distributionConfig = new DistributionConfigImpl(properties);
     SocketCreatorFactory.setDistributionConfig(distributionConfig);
 
-    Assert.assertFalse(SocketCreatorFactory.getSocketCreatorForComponent(SecurableComponent.CLUSTER).useSSL());
-    Assert.assertFalse(SocketCreatorFactory.getSocketCreatorForComponent(SecurableComponent.GATEWAY).useSSL());
-    Assert.assertTrue(SocketCreatorFactory.getSocketCreatorForComponent(SecurableComponent.JMX).useSSL());
-    Assert.assertFalse(SocketCreatorFactory.getSocketCreatorForComponent(SecurableComponent.SERVER).useSSL());
-    Assert.assertFalse(SocketCreatorFactory.getSocketCreatorForComponent(SecurableComponent.HTTP_SERVICE).useSSL());
-    Assert.assertFalse(SocketCreatorFactory.getSocketCreatorForComponent(SecurableComponent.LOCATOR).useSSL());
+    Assert.assertFalse(SocketCreatorFactory.getSocketCreatorForComponent(SecurableCommunicationChannel.CLUSTER).useSSL());
+    Assert.assertFalse(SocketCreatorFactory.getSocketCreatorForComponent(SecurableCommunicationChannel.GATEWAY).useSSL());
+    Assert.assertTrue(SocketCreatorFactory.getSocketCreatorForComponent(SecurableCommunicationChannel.JMX).useSSL());
+    Assert.assertFalse(SocketCreatorFactory.getSocketCreatorForComponent(SecurableCommunicationChannel.SERVER).useSSL());
+    Assert.assertFalse(SocketCreatorFactory.getSocketCreatorForComponent(SecurableCommunicationChannel.WEB).useSSL());
+    Assert.assertFalse(SocketCreatorFactory.getSocketCreatorForComponent(SecurableCommunicationChannel.LOCATOR).useSSL());
   }
 
   @Test
   public void testNewSSLConfigSSLComponentSERVER() {
-    Properties properties = configureSSLProperties(SecurableComponent.SERVER.getConstant());
+    Properties properties = configureSSLProperties(SecurableCommunicationChannel.SERVER.getConstant());
 
     DistributionConfigImpl distributionConfig = new DistributionConfigImpl(properties);
 
     SocketCreatorFactory.setDistributionConfig(distributionConfig);
 
-    Assert.assertFalse(SocketCreatorFactory.getSocketCreatorForComponent(SecurableComponent.CLUSTER).useSSL());
-    Assert.assertFalse(SocketCreatorFactory.getSocketCreatorForComponent(SecurableComponent.GATEWAY).useSSL());
-    Assert.assertFalse(SocketCreatorFactory.getSocketCreatorForComponent(SecurableComponent.JMX).useSSL());
-    Assert.assertTrue(SocketCreatorFactory.getSocketCreatorForComponent(SecurableComponent.SERVER).useSSL());
-    Assert.assertFalse(SocketCreatorFactory.getSocketCreatorForComponent(SecurableComponent.HTTP_SERVICE).useSSL());
-    Assert.assertFalse(SocketCreatorFactory.getSocketCreatorForComponent(SecurableComponent.LOCATOR).useSSL());
+    Assert.assertFalse(SocketCreatorFactory.getSocketCreatorForComponent(SecurableCommunicationChannel.CLUSTER).useSSL());
+    Assert.assertFalse(SocketCreatorFactory.getSocketCreatorForComponent(SecurableCommunicationChannel.GATEWAY).useSSL());
+    Assert.assertFalse(SocketCreatorFactory.getSocketCreatorForComponent(SecurableCommunicationChannel.JMX).useSSL());
+    Assert.assertTrue(SocketCreatorFactory.getSocketCreatorForComponent(SecurableCommunicationChannel.SERVER).useSSL());
+    Assert.assertFalse(SocketCreatorFactory.getSocketCreatorForComponent(SecurableCommunicationChannel.WEB).useSSL());
+    Assert.assertFalse(SocketCreatorFactory.getSocketCreatorForComponent(SecurableCommunicationChannel.LOCATOR).useSSL());
   }
 
   @Test
   public void testNewSSLConfigSSLComponentCombinations1() {
-    Properties properties = configureSSLProperties(commaDelimitedString(SecurableComponent.CLUSTER.getConstant(), SecurableComponent.SERVER.getConstant()));
+    Properties properties = configureSSLProperties(commaDelimitedString(SecurableCommunicationChannel.CLUSTER.getConstant(), SecurableCommunicationChannel.SERVER.getConstant()));
 
     DistributionConfigImpl distributionConfig = new DistributionConfigImpl(properties);
     SocketCreatorFactory.setDistributionConfig(distributionConfig);
 
-    Assert.assertTrue(SocketCreatorFactory.getSocketCreatorForComponent(SecurableComponent.CLUSTER).useSSL());
-    Assert.assertFalse(SocketCreatorFactory.getSocketCreatorForComponent(SecurableComponent.GATEWAY).useSSL());
-    Assert.assertFalse(SocketCreatorFactory.getSocketCreatorForComponent(SecurableComponent.JMX).useSSL());
-    Assert.assertTrue(SocketCreatorFactory.getSocketCreatorForComponent(SecurableComponent.SERVER).useSSL());
-    Assert.assertFalse(SocketCreatorFactory.getSocketCreatorForComponent(SecurableComponent.HTTP_SERVICE).useSSL());
-    Assert.assertFalse(SocketCreatorFactory.getSocketCreatorForComponent(SecurableComponent.LOCATOR).useSSL());
+    Assert.assertTrue(SocketCreatorFactory.getSocketCreatorForComponent(SecurableCommunicationChannel.CLUSTER).useSSL());
+    Assert.assertFalse(SocketCreatorFactory.getSocketCreatorForComponent(SecurableCommunicationChannel.GATEWAY).useSSL());
+    Assert.assertFalse(SocketCreatorFactory.getSocketCreatorForComponent(SecurableCommunicationChannel.JMX).useSSL());
+    Assert.assertTrue(SocketCreatorFactory.getSocketCreatorForComponent(SecurableCommunicationChannel.SERVER).useSSL());
+    Assert.assertFalse(SocketCreatorFactory.getSocketCreatorForComponent(SecurableCommunicationChannel.WEB).useSSL());
+    Assert.assertFalse(SocketCreatorFactory.getSocketCreatorForComponent(SecurableCommunicationChannel.LOCATOR).useSSL());
   }
 
   @Test
   public void testNewSSLConfigSSLComponentCombinations2() {
-    Properties properties = configureSSLProperties(commaDelimitedString(SecurableComponent.CLUSTER.getConstant(), SecurableComponent.SERVER.getConstant(), SecurableComponent.HTTP_SERVICE
-      .getConstant(), SecurableComponent.JMX.getConstant()));
+    Properties properties = configureSSLProperties(commaDelimitedString(SecurableCommunicationChannel.CLUSTER.getConstant(), SecurableCommunicationChannel.SERVER.getConstant(), SecurableCommunicationChannel.WEB
+      .getConstant(), SecurableCommunicationChannel.JMX.getConstant()));
 
     DistributionConfigImpl distributionConfig = new DistributionConfigImpl(properties);
     SocketCreatorFactory.setDistributionConfig(distributionConfig);
 
-    Assert.assertTrue(SocketCreatorFactory.getSocketCreatorForComponent(SecurableComponent.CLUSTER).useSSL());
-    Assert.assertFalse(SocketCreatorFactory.getSocketCreatorForComponent(SecurableComponent.GATEWAY).useSSL());
-    Assert.assertTrue(SocketCreatorFactory.getSocketCreatorForComponent(SecurableComponent.JMX).useSSL());
-    Assert.assertTrue(SocketCreatorFactory.getSocketCreatorForComponent(SecurableComponent.SERVER).useSSL());
-    Assert.assertTrue(SocketCreatorFactory.getSocketCreatorForComponent(SecurableComponent.HTTP_SERVICE).useSSL());
-    Assert.assertFalse(SocketCreatorFactory.getSocketCreatorForComponent(SecurableComponent.LOCATOR).useSSL());
+    Assert.assertTrue(SocketCreatorFactory.getSocketCreatorForComponent(SecurableCommunicationChannel.CLUSTER).useSSL());
+    Assert.assertFalse(SocketCreatorFactory.getSocketCreatorForComponent(SecurableCommunicationChannel.GATEWAY).useSSL());
+    Assert.assertTrue(SocketCreatorFactory.getSocketCreatorForComponent(SecurableCommunicationChannel.JMX).useSSL());
+    Assert.assertTrue(SocketCreatorFactory.getSocketCreatorForComponent(SecurableCommunicationChannel.SERVER).useSSL());
+    Assert.assertTrue(SocketCreatorFactory.getSocketCreatorForComponent(SecurableCommunicationChannel.WEB).useSSL());
+    Assert.assertFalse(SocketCreatorFactory.getSocketCreatorForComponent(SecurableCommunicationChannel.LOCATOR).useSSL());
   }
 
   @Test
   public void testNewSSLConfigSSLComponentAliasWithMultiKeyStore() {
-    Properties properties = configureSSLProperties(SecurableComponent.ALL.getConstant());
+    Properties properties = configureSSLProperties(SecurableCommunicationChannel.ALL.getConstant());
 
     properties.setProperty(SSL_KEYSTORE, TestUtil.getResourcePath(getClass(), "/com/gemstone/gemfire/internal/net/multiKey.jks"));
     properties.setProperty(SSL_TRUSTSTORE, TestUtil.getResourcePath(getClass(), "/com/gemstone/gemfire/internal/net/multiKeyTrust.jks"));
@@ -184,17 +184,17 @@ public class SocketCreatorFactoryJUnitTest extends JSSESocketJUnitTest {
     DistributionConfigImpl distributionConfig = new DistributionConfigImpl(properties);
     SocketCreatorFactory.setDistributionConfig(distributionConfig);
 
-    Assert.assertTrue(SocketCreatorFactory.getSocketCreatorForComponent(SecurableComponent.CLUSTER).useSSL());
-    Assert.assertTrue(SocketCreatorFactory.getSocketCreatorForComponent(SecurableComponent.GATEWAY).useSSL());
-    Assert.assertTrue(SocketCreatorFactory.getSocketCreatorForComponent(SecurableComponent.JMX).useSSL());
-    Assert.assertTrue(SocketCreatorFactory.getSocketCreatorForComponent(SecurableComponent.SERVER).useSSL());
-    Assert.assertTrue(SocketCreatorFactory.getSocketCreatorForComponent(SecurableComponent.HTTP_SERVICE).useSSL());
-    Assert.assertTrue(SocketCreatorFactory.getSocketCreatorForComponent(SecurableComponent.LOCATOR).useSSL());
+    Assert.assertTrue(SocketCreatorFactory.getSocketCreatorForComponent(SecurableCommunicationChannel.CLUSTER).useSSL());
+    Assert.assertTrue(SocketCreatorFactory.getSocketCreatorForComponent(SecurableCommunicationChannel.GATEWAY).useSSL());
+    Assert.assertTrue(SocketCreatorFactory.getSocketCreatorForComponent(SecurableCommunicationChannel.JMX).useSSL());
+    Assert.assertTrue(SocketCreatorFactory.getSocketCreatorForComponent(SecurableCommunicationChannel.SERVER).useSSL());
+    Assert.assertTrue(SocketCreatorFactory.getSocketCreatorForComponent(SecurableCommunicationChannel.WEB).useSSL());
+    Assert.assertTrue(SocketCreatorFactory.getSocketCreatorForComponent(SecurableCommunicationChannel.LOCATOR).useSSL());
   }
 
   @Test
   public void testNewSSLConfigSSLComponentWithoutAliasWithMultiKeyStore() {
-    Properties properties = configureSSLProperties(SecurableComponent.ALL.getConstant());
+    Properties properties = configureSSLProperties(SecurableCommunicationChannel.ALL.getConstant());
 
     properties.setProperty(SSL_KEYSTORE, TestUtil.getResourcePath(getClass(), "/com/gemstone/gemfire/internal/net/multiKey.jks"));
     properties.setProperty(SSL_TRUSTSTORE, TestUtil.getResourcePath(getClass(), "/com/gemstone/gemfire/internal/net/multiKeyTrust.jks"));
@@ -202,12 +202,12 @@ public class SocketCreatorFactoryJUnitTest extends JSSESocketJUnitTest {
     DistributionConfigImpl distributionConfig = new DistributionConfigImpl(properties);
     SocketCreatorFactory.setDistributionConfig(distributionConfig);
 
-    Assert.assertTrue(SocketCreatorFactory.getSocketCreatorForComponent(SecurableComponent.CLUSTER).useSSL());
-    Assert.assertTrue(SocketCreatorFactory.getSocketCreatorForComponent(SecurableComponent.GATEWAY).useSSL());
-    Assert.assertTrue(SocketCreatorFactory.getSocketCreatorForComponent(SecurableComponent.JMX).useSSL());
-    Assert.assertTrue(SocketCreatorFactory.getSocketCreatorForComponent(SecurableComponent.SERVER).useSSL());
-    Assert.assertTrue(SocketCreatorFactory.getSocketCreatorForComponent(SecurableComponent.HTTP_SERVICE).useSSL());
-    Assert.assertTrue(SocketCreatorFactory.getSocketCreatorForComponent(SecurableComponent.LOCATOR).useSSL());
+    Assert.assertTrue(SocketCreatorFactory.getSocketCreatorForComponent(SecurableCommunicationChannel.CLUSTER).useSSL());
+    Assert.assertTrue(SocketCreatorFactory.getSocketCreatorForComponent(SecurableCommunicationChannel.GATEWAY).useSSL());
+    Assert.assertTrue(SocketCreatorFactory.getSocketCreatorForComponent(SecurableCommunicationChannel.JMX).useSSL());
+    Assert.assertTrue(SocketCreatorFactory.getSocketCreatorForComponent(SecurableCommunicationChannel.SERVER).useSSL());
+    Assert.assertTrue(SocketCreatorFactory.getSocketCreatorForComponent(SecurableCommunicationChannel.WEB).useSSL());
+    Assert.assertTrue(SocketCreatorFactory.getSocketCreatorForComponent(SecurableCommunicationChannel.LOCATOR).useSSL());
   }
 
   private Properties configureSSLProperties(String sslComponents) {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8ff5e7a4/geode-core/src/test/java/com/gemstone/gemfire/management/internal/JettyHelperJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/JettyHelperJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/JettyHelperJUnitTest.java
index 8fca500..a5e345a 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/JettyHelperJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/JettyHelperJUnitTest.java
@@ -30,7 +30,7 @@ import org.junit.experimental.categories.Category;
 import com.gemstone.gemfire.GemFireConfigException;
 import com.gemstone.gemfire.distributed.internal.DistributionConfigImpl;
 import com.gemstone.gemfire.internal.net.SSLConfigurationFactory;
-import com.gemstone.gemfire.internal.security.SecurableComponent;
+import com.gemstone.gemfire.internal.security.SecurableCommunicationChannel;
 import com.gemstone.gemfire.test.junit.categories.UnitTest;
 
 /**
@@ -59,7 +59,7 @@ public class JettyHelperJUnitTest {
 
     final Server jetty;
     try {
-      jetty = JettyHelper.initJetty(null, 8090, SSLConfigurationFactory.getSSLConfigForComponent(SecurableComponent.HTTP_SERVICE));
+      jetty = JettyHelper.initJetty(null, 8090, SSLConfigurationFactory.getSSLConfigForComponent(SecurableCommunicationChannel.WEB));
       assertNotNull(jetty);
       assertNotNull(jetty.getConnectors()[0]);
       assertEquals(8090, ((ServerConnector) jetty.getConnectors()[0]).getPort());
@@ -71,7 +71,7 @@ public class JettyHelperJUnitTest {
   @Test
   public void testSetPortWithBindAddress() throws Exception {
     try {
-      final Server jetty = JettyHelper.initJetty("10.123.50.1", 10480, SSLConfigurationFactory.getSSLConfigForComponent(SecurableComponent.HTTP_SERVICE));
+      final Server jetty = JettyHelper.initJetty("10.123.50.1", 10480, SSLConfigurationFactory.getSSLConfigForComponent(SecurableCommunicationChannel.WEB));
 
       assertNotNull(jetty);
       assertNotNull(jetty.getConnectors()[0]);

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8ff5e7a4/geode-pulse/src/test/java/com/vmware/gemfire/tools/pulse/testbed/driver/PulseUITest.java
----------------------------------------------------------------------
diff --git a/geode-pulse/src/test/java/com/vmware/gemfire/tools/pulse/testbed/driver/PulseUITest.java b/geode-pulse/src/test/java/com/vmware/gemfire/tools/pulse/testbed/driver/PulseUITest.java
index 3ce8855..47001ca 100644
--- a/geode-pulse/src/test/java/com/vmware/gemfire/tools/pulse/testbed/driver/PulseUITest.java
+++ b/geode-pulse/src/test/java/com/vmware/gemfire/tools/pulse/testbed/driver/PulseUITest.java
@@ -36,7 +36,7 @@ import org.openqa.selenium.support.ui.ExpectedCondition;
 import org.openqa.selenium.support.ui.WebDriverWait;
 
 import com.gemstone.gemfire.internal.net.SSLConfigurationFactory;
-import com.gemstone.gemfire.internal.security.SecurableComponent;
+import com.gemstone.gemfire.internal.security.SecurableCommunicationChannel;
 import com.gemstone.gemfire.management.internal.JettyHelper;
 import com.gemstone.gemfire.test.junit.categories.UITest;
 import com.vmware.gemfire.tools.pulse.testbed.GemFireDistributedSystem.Locator;
@@ -72,7 +72,7 @@ public class PulseUITest {
     path = getPulseWarPath();
     //System.setProperty("pulse.propMockDataUpdaterClass", "com.vmware.gemfire.tools.pulse.testbed.PropMockDataUpdater");
 
-    jetty = JettyHelper.initJetty(host, port, SSLConfigurationFactory.getSSLConfigForComponent(SecurableComponent.HTTP_SERVICE));
+    jetty = JettyHelper.initJetty(host, port, SSLConfigurationFactory.getSSLConfigForComponent(SecurableCommunicationChannel.WEB));
     JettyHelper.addWebApplication(jetty, context, getPulseWarPath());
     jetty.start();
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8ff5e7a4/geode-pulse/src/test/java/com/vmware/gemfire/tools/pulse/tests/PulseAbstractTest.java
----------------------------------------------------------------------
diff --git a/geode-pulse/src/test/java/com/vmware/gemfire/tools/pulse/tests/PulseAbstractTest.java b/geode-pulse/src/test/java/com/vmware/gemfire/tools/pulse/tests/PulseAbstractTest.java
index b11cf2c..cf860aa 100644
--- a/geode-pulse/src/test/java/com/vmware/gemfire/tools/pulse/tests/PulseAbstractTest.java
+++ b/geode-pulse/src/test/java/com/vmware/gemfire/tools/pulse/tests/PulseAbstractTest.java
@@ -45,7 +45,7 @@ import org.openqa.selenium.support.ui.ExpectedConditions;
 import org.openqa.selenium.support.ui.WebDriverWait;
 
 import com.gemstone.gemfire.internal.net.SSLConfigurationFactory;
-import com.gemstone.gemfire.internal.security.SecurableComponent;
+import com.gemstone.gemfire.internal.security.SecurableCommunicationChannel;
 import com.gemstone.gemfire.management.internal.JettyHelper;
 import com.vmware.gemfire.tools.pulse.internal.data.PulseConstants;
 
@@ -148,7 +148,7 @@ public abstract class PulseAbstractTest extends PulseBaseTest {
     int port = 8080;
     String context = "/pulse";
 
-    jetty = JettyHelper.initJetty(host, port, SSLConfigurationFactory.getSSLConfigForComponent(SecurableComponent.HTTP_SERVICE));
+    jetty = JettyHelper.initJetty(host, port, SSLConfigurationFactory.getSSLConfigForComponent(SecurableCommunicationChannel.WEB));
     JettyHelper.addWebApplication(jetty, context, getPulseWarPath());
     jetty.start();
 


[47/50] [abbrv] incubator-geode git commit: GEODE-420: Renaming of SecurableComponents to SecurableCommunicationChannel Renaming of HTTP_SERVICE -> WEB

Posted by ud...@apache.org.
GEODE-420: Renaming of SecurableComponents to SecurableCommunicationChannel
Renaming of HTTP_SERVICE -> WEB


Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/0b579cfe
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/0b579cfe
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/0b579cfe

Branch: refs/heads/develop
Commit: 0b579cfea136aa1849fe39d22fce745b15bf44a6
Parents: 9df6715
Author: Udo Kohlmeyer <uk...@pivotal.io>
Authored: Tue Sep 13 08:42:01 2016 +1000
Committer: Udo Kohlmeyer <uk...@pivotal.io>
Committed: Tue Sep 13 08:42:01 2016 +1000

----------------------------------------------------------------------
 .../controllers/RestAPIsWithSSLDUnitTest.java   | 25 ++++++++++----------
 .../internal/AbstractDistributionConfig.java    | 21 ++++++++--------
 .../internal/DistributionConfig.java            |  2 +-
 .../internal/DistributionConfigImpl.java        | 22 ++++++++---------
 .../gemfire/internal/AbstractConfig.java        | 12 +++++-----
 .../internal/net/SSLConfigurationFactory.java   |  5 ++--
 .../gemfire/internal/net/SocketCreator.java     |  3 ++-
 .../internal/security/SecurableComponent.java   |  2 --
 .../CacheServerSSLConnectionDUnitTest.java      |  3 ++-
 .../gemfire/distributed/LocatorDUnitTest.java   | 12 +++++-----
 .../ConnectToLocatorSSLDUnitTest.java           |  3 ++-
 .../gemfire/management/JMXMBeanDUnitTest.java   |  3 ++-
 12 files changed, 58 insertions(+), 55 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/0b579cfe/geode-assembly/src/test/java/com/gemstone/gemfire/rest/internal/web/controllers/RestAPIsWithSSLDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-assembly/src/test/java/com/gemstone/gemfire/rest/internal/web/controllers/RestAPIsWithSSLDUnitTest.java b/geode-assembly/src/test/java/com/gemstone/gemfire/rest/internal/web/controllers/RestAPIsWithSSLDUnitTest.java
index e6abfa1..93efb7a 100644
--- a/geode-assembly/src/test/java/com/gemstone/gemfire/rest/internal/web/controllers/RestAPIsWithSSLDUnitTest.java
+++ b/geode-assembly/src/test/java/com/gemstone/gemfire/rest/internal/web/controllers/RestAPIsWithSSLDUnitTest.java
@@ -69,6 +69,7 @@ import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem;
 import com.gemstone.gemfire.internal.AvailablePort;
 import com.gemstone.gemfire.internal.AvailablePortHelper;
 import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
+import com.gemstone.gemfire.internal.security.SecurableCommunicationChannel;
 import com.gemstone.gemfire.internal.security.SecurableComponent;
 import com.gemstone.gemfire.management.ManagementException;
 import com.gemstone.gemfire.test.dunit.Host;
@@ -481,7 +482,7 @@ public class RestAPIsWithSSLDUnitTest extends LocatorTestBase {
     props.setProperty(SSL_KEYSTORE_PASSWORD, "password");
     props.setProperty(SSL_TRUSTSTORE_PASSWORD, "password");
     props.setProperty(SSL_KEYSTORE_TYPE, "JKS");
-    props.setProperty(SSL_ENABLED_COMPONENTS, SecurableComponent.HTTP_SERVICE.getConstant());
+    props.setProperty(SSL_ENABLED_COMPONENTS, SecurableCommunicationChannel.WEB.getConstant());
     String restEndpoint = startInfraWithSSL(props, false);
     validateConnection(restEndpoint, "SSL", props);
   }
@@ -495,7 +496,7 @@ public class RestAPIsWithSSLDUnitTest extends LocatorTestBase {
     props.setProperty(SSL_KEYSTORE_PASSWORD, "password");
     props.setProperty(SSL_TRUSTSTORE_PASSWORD, "password");
     props.setProperty(SSL_KEYSTORE_TYPE, "JKS");
-    props.setProperty(SSL_ENABLED_COMPONENTS, SecurableComponent.HTTP_SERVICE.getConstant());
+    props.setProperty(SSL_ENABLED_COMPONENTS, SecurableCommunicationChannel.WEB.getConstant());
     props.setProperty(SSL_HTTP_SERVICE_ALIAS, "httpservicekey");
     props.setProperty(SSL_HTTP_SERVICE_REQUIRE_AUTHENTICATION, "true");
     String restEndpoint = startInfraWithSSL(props, false);
@@ -511,7 +512,7 @@ public class RestAPIsWithSSLDUnitTest extends LocatorTestBase {
     props.setProperty(SSL_KEYSTORE_PASSWORD, "password");
     props.setProperty(SSL_TRUSTSTORE_PASSWORD, "password");
     props.setProperty(SSL_KEYSTORE_TYPE, "JKS");
-    props.setProperty(SSL_ENABLED_COMPONENTS, SecurableComponent.HTTP_SERVICE.getConstant());
+    props.setProperty(SSL_ENABLED_COMPONENTS, SecurableCommunicationChannel.WEB.getConstant());
     props.setProperty(SSL_HTTP_SERVICE_REQUIRE_AUTHENTICATION, "true");
     props.setProperty(SSL_HTTP_SERVICE_ALIAS, "httpservicekey");
     props.setProperty(INVALID_CLIENT_ALIAS, "someAlias");
@@ -526,7 +527,7 @@ public class RestAPIsWithSSLDUnitTest extends LocatorTestBase {
     props.setProperty(SSL_TRUSTSTORE, findTrustedJKSWithSingleEntry().getCanonicalPath());
     props.setProperty(SSL_KEYSTORE_PASSWORD, "password");
     props.setProperty(SSL_TRUSTSTORE_PASSWORD, "password");
-    props.setProperty(SSL_ENABLED_COMPONENTS, SecurableComponent.HTTP_SERVICE.getConstant());
+    props.setProperty(SSL_ENABLED_COMPONENTS, SecurableCommunicationChannel.WEB.getConstant());
 
     String restEndpoint = startInfraWithSSL(props, false);
     validateConnection(restEndpoint, "SSL", props);
@@ -541,7 +542,7 @@ public class RestAPIsWithSSLDUnitTest extends LocatorTestBase {
     props.setProperty(SSL_TRUSTSTORE_PASSWORD, "password");
     props.setProperty(SSL_KEYSTORE_TYPE, "JKS");
     props.setProperty(SSL_PROTOCOLS, "SSL");
-    props.setProperty(SSL_ENABLED_COMPONENTS, SecurableComponent.HTTP_SERVICE.getConstant());
+    props.setProperty(SSL_ENABLED_COMPONENTS, SecurableCommunicationChannel.WEB.getConstant());
 
     String restEndpoint = startInfraWithSSL(props, false);
     validateConnection(restEndpoint, "SSL", props);
@@ -556,7 +557,7 @@ public class RestAPIsWithSSLDUnitTest extends LocatorTestBase {
     props.setProperty(SSL_TRUSTSTORE_PASSWORD, "password");
     props.setProperty(SSL_KEYSTORE_TYPE, "JKS");
     props.setProperty(SSL_PROTOCOLS, "TLS");
-    props.setProperty(SSL_ENABLED_COMPONENTS, SecurableComponent.HTTP_SERVICE.getConstant());
+    props.setProperty(SSL_ENABLED_COMPONENTS, SecurableCommunicationChannel.WEB.getConstant());
 
     String restEndpoint = startInfraWithSSL(props, false);
     validateConnection(restEndpoint, "TLS", props);
@@ -571,7 +572,7 @@ public class RestAPIsWithSSLDUnitTest extends LocatorTestBase {
     props.setProperty(SSL_TRUSTSTORE_PASSWORD, "password");
     props.setProperty(SSL_KEYSTORE_TYPE, "JKS");
     props.setProperty(SSL_PROTOCOLS, "TLSv1.1");
-    props.setProperty(SSL_ENABLED_COMPONENTS, SecurableComponent.HTTP_SERVICE.getConstant());
+    props.setProperty(SSL_ENABLED_COMPONENTS, SecurableCommunicationChannel.WEB.getConstant());
 
     String restEndpoint = startInfraWithSSL(props, false);
     validateConnection(restEndpoint, "TLSv1.1", props);
@@ -586,7 +587,7 @@ public class RestAPIsWithSSLDUnitTest extends LocatorTestBase {
     props.setProperty(SSL_TRUSTSTORE_PASSWORD, "password");
     props.setProperty(SSL_KEYSTORE_TYPE, "JKS");
     props.setProperty(SSL_PROTOCOLS, "TLSv1.2");
-    props.setProperty(SSL_ENABLED_COMPONENTS, SecurableComponent.HTTP_SERVICE.getConstant());
+    props.setProperty(SSL_ENABLED_COMPONENTS, SecurableCommunicationChannel.WEB.getConstant());
 
     String restEndpoint = startInfraWithSSL(props, false);
     validateConnection(restEndpoint, "TLSv1.2", props);
@@ -601,7 +602,7 @@ public class RestAPIsWithSSLDUnitTest extends LocatorTestBase {
     props.setProperty(SSL_TRUSTSTORE_PASSWORD, "password");
     props.setProperty(SSL_KEYSTORE_TYPE, "JKS");
     props.setProperty(SSL_PROTOCOLS, "SSL,TLSv1.2");
-    props.setProperty(SSL_ENABLED_COMPONENTS, SecurableComponent.HTTP_SERVICE.getConstant());
+    props.setProperty(SSL_ENABLED_COMPONENTS, SecurableCommunicationChannel.WEB.getConstant());
 
     String restEndpoint = startInfraWithSSL(props, false);
     validateConnection(restEndpoint, "TLSv1.2", props);
@@ -617,7 +618,7 @@ public class RestAPIsWithSSLDUnitTest extends LocatorTestBase {
     props.setProperty(SSL_TRUSTSTORE_PASSWORD, "password");
     props.setProperty(SSL_KEYSTORE_TYPE, "JKS");
     props.setProperty(SSL_PROTOCOLS, "TLSv1.2");
-    props.setProperty(SSL_ENABLED_COMPONENTS, SecurableComponent.HTTP_SERVICE.getConstant());
+    props.setProperty(SSL_ENABLED_COMPONENTS, SecurableCommunicationChannel.WEB.getConstant());
 
     SSLContext ssl = SSLContext.getInstance("TLSv1.2");
 
@@ -639,7 +640,7 @@ public class RestAPIsWithSSLDUnitTest extends LocatorTestBase {
     props.setProperty(SSL_TRUSTSTORE_PASSWORD, "password");
     props.setProperty(SSL_KEYSTORE_TYPE, "JKS");
     props.setProperty(SSL_PROTOCOLS, "TLSv1.2");
-    props.setProperty(SSL_ENABLED_COMPONENTS, SecurableComponent.HTTP_SERVICE.getConstant());
+    props.setProperty(SSL_ENABLED_COMPONENTS, SecurableCommunicationChannel.WEB.getConstant());
 
     SSLContext ssl = SSLContext.getInstance("TLSv1.2");
 
@@ -664,7 +665,7 @@ public class RestAPIsWithSSLDUnitTest extends LocatorTestBase {
     props.setProperty(SSL_PROTOCOLS, "SSL");
     props.setProperty(SSL_REQUIRE_AUTHENTICATION, "true");
     props.setProperty(SSL_HTTP_SERVICE_REQUIRE_AUTHENTICATION, "true");
-    props.setProperty(SSL_ENABLED_COMPONENTS, SecurableComponent.HTTP_SERVICE.getConstant());
+    props.setProperty(SSL_ENABLED_COMPONENTS, SecurableCommunicationChannel.WEB.getConstant());
 
     String restEndpoint = startInfraWithSSL(props, false);
     validateConnection(restEndpoint, "SSL", props);

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/0b579cfe/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/AbstractDistributionConfig.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/AbstractDistributionConfig.java b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/AbstractDistributionConfig.java
index ce77c5e..2a55a17 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/AbstractDistributionConfig.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/AbstractDistributionConfig.java
@@ -41,6 +41,7 @@ import com.gemstone.gemfire.internal.admin.remote.DistributionLocatorId;
 import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
 import com.gemstone.gemfire.internal.logging.LogWriterImpl;
 import com.gemstone.gemfire.internal.net.SocketCreator;
+import com.gemstone.gemfire.internal.security.SecurableCommunicationChannel;
 import com.gemstone.gemfire.internal.security.SecurableComponent;
 import com.gemstone.gemfire.memcached.GemFireMemcachedServer;
 
@@ -462,27 +463,27 @@ public abstract class AbstractDistributionConfig extends AbstractConfig implemen
    * This would mean one is mixing the "old" with the "new"
    */
   @ConfigAttributeChecker(name = SSL_ENABLED_COMPONENTS)
-  protected SecurableComponent[] checkLegacySSLWhenSSLEnabledComponentsSet(SecurableComponent[] value) {
-    for (SecurableComponent component : value) {
+  protected SecurableCommunicationChannel[] checkLegacySSLWhenSSLEnabledComponentsSet(SecurableCommunicationChannel[] value) {
+    for (SecurableCommunicationChannel component : value) {
       switch (component) {
         case ALL:
         case CLUSTER:
         case SERVER:
         case GATEWAY:
         case JMX:
-        case HTTP_SERVICE:
+        case WEB:
         case LOCATOR:
           continue;
         default:
           throw new IllegalArgumentException(LocalizedStrings.AbstractDistributionConfig_SSL_ENABLED_COMPONENTS_0_INVALID_TRY_1.toLocalizedString(new Object[] {
             value, StringUtils.join(new String[] {
-            SecurableComponent.ALL.getConstant(),
-            SecurableComponent.CLUSTER.getConstant(),
-            SecurableComponent.SERVER.getConstant(),
-            SecurableComponent.GATEWAY.getConstant(),
-            SecurableComponent.JMX.getConstant(),
-            SecurableComponent.HTTP_SERVICE.getConstant(),
-            SecurableComponent.LOCATOR.getConstant()
+            SecurableCommunicationChannel.ALL.getConstant(),
+            SecurableCommunicationChannel.CLUSTER.getConstant(),
+            SecurableCommunicationChannel.SERVER.getConstant(),
+            SecurableCommunicationChannel.GATEWAY.getConstant(),
+            SecurableCommunicationChannel.JMX.getConstant(),
+            SecurableCommunicationChannel.WEB.getConstant(),
+            SecurableCommunicationChannel.LOCATOR.getConstant()
           }, ",")
           }));
       }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/0b579cfe/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionConfig.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionConfig.java b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionConfig.java
index 2a14bf7..e90ac3e 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionConfig.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionConfig.java
@@ -4382,7 +4382,7 @@ public interface DistributionConfig extends Config, LogConfig {
    * The name of the {@link ConfigurationProperties#SSL_ENABLED_COMPONENTS} property
    * @since Geode 1.0
    */
-  @ConfigAttribute(type = SecurableComponent[].class)
+  @ConfigAttribute(type = SecurableCommunicationChannel[].class)
   String SSL_ENABLED_COMPONENTS_NAME = SSL_ENABLED_COMPONENTS;
 
   /**

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/0b579cfe/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionConfigImpl.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionConfigImpl.java b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionConfigImpl.java
index 35e8a9d..c5df689 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionConfigImpl.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionConfigImpl.java
@@ -960,27 +960,27 @@ public class DistributionConfigImpl extends AbstractDistributionConfig implement
         throw new InternalGemFireException("error invoking getter for property" + ConfigurationProperties.SSL_ENABLED_COMPONENTS);
       }
     }
-    SecurableComponent[] sslEnabledComponents = (SecurableComponent[]) value;
-    for (SecurableComponent sslEnabledComponent : sslEnabledComponents) {
-      if (!isAliasCorrectlyConfiguredForComponents(sslEnabledComponent)) {
+    SecurableCommunicationChannel[] sslEnabledComponents = (SecurableCommunicationChannel[]) value;
+    for (SecurableCommunicationChannel securableCommunicationChannel : sslEnabledComponents) {
+      if (!isAliasCorrectlyConfiguredForComponents(securableCommunicationChannel)) {
         throw new IllegalArgumentException(LocalizedStrings.AbstractDistributionConfig_SSL_ENABLED_COMPONENTS_INVALID_ALIAS_OPTIONS.toLocalizedString());
       }
     }
 
   }
 
-  private boolean isAliasCorrectlyConfiguredForComponents(final SecurableComponent component) {
+  private boolean isAliasCorrectlyConfiguredForComponents(final SecurableCommunicationChannel component) {
     switch (component) {
       case ALL: {
         //If the default alias is not set, then check that all the other component aliases are set
         if (StringUtils.isEmpty(getSSLDefaultAlias())) {
           boolean correctAlias = true;
-          correctAlias &= isAliasCorrectlyConfiguredForComponents(SecurableComponent.CLUSTER);
-          correctAlias &= isAliasCorrectlyConfiguredForComponents(SecurableComponent.GATEWAY);
-          correctAlias &= isAliasCorrectlyConfiguredForComponents(SecurableComponent.HTTP_SERVICE);
-          correctAlias &= isAliasCorrectlyConfiguredForComponents(SecurableComponent.JMX);
-          correctAlias &= isAliasCorrectlyConfiguredForComponents(SecurableComponent.LOCATOR);
-          correctAlias &= isAliasCorrectlyConfiguredForComponents(SecurableComponent.SERVER);
+          correctAlias &= isAliasCorrectlyConfiguredForComponents(SecurableCommunicationChannel.CLUSTER);
+          correctAlias &= isAliasCorrectlyConfiguredForComponents(SecurableCommunicationChannel.GATEWAY);
+          correctAlias &= isAliasCorrectlyConfiguredForComponents(SecurableCommunicationChannel.WEB);
+          correctAlias &= isAliasCorrectlyConfiguredForComponents(SecurableCommunicationChannel.JMX);
+          correctAlias &= isAliasCorrectlyConfiguredForComponents(SecurableCommunicationChannel.LOCATOR);
+          correctAlias &= isAliasCorrectlyConfiguredForComponents(SecurableCommunicationChannel.SERVER);
           return correctAlias;
         }
       }
@@ -990,7 +990,7 @@ public class DistributionConfigImpl extends AbstractDistributionConfig implement
       case GATEWAY: {
         return StringUtils.isEmpty(getGatewaySSLAlias()) ? true : (getSecurableCommunicationChannels().length > 1 ? !StringUtils.isEmpty(getSSLDefaultAlias()) : true);
       }
-      case HTTP_SERVICE: {
+      case WEB: {
         return StringUtils.isEmpty(getHTTPServiceSSLAlias()) ? true : (getSecurableCommunicationChannels().length > 1 ? !StringUtils.isEmpty(getSSLDefaultAlias()) : true);
       }
       case JMX: {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/0b579cfe/geode-core/src/main/java/com/gemstone/gemfire/internal/AbstractConfig.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/AbstractConfig.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/AbstractConfig.java
index 28b0cac..497c12d 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/AbstractConfig.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/AbstractConfig.java
@@ -44,7 +44,7 @@ import com.gemstone.gemfire.distributed.internal.DistributionConfig;
 import com.gemstone.gemfire.distributed.internal.FlowControlParams;
 import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
 import com.gemstone.gemfire.internal.net.SocketCreator;
-import com.gemstone.gemfire.internal.security.SecurableComponent;
+import com.gemstone.gemfire.internal.security.SecurableCommunicationChannel;
 
 /**
  * Provides an implementation of the {@link Config} interface
@@ -410,8 +410,8 @@ public abstract class AbstractConfig implements Config {
           }));
         }
         attObjectValue = new FlowControlParams(credits, thresh, waittime);
-      } else if (valueType.isArray() && SecurableComponent.class.equals(valueType.getComponentType())) {
-        attObjectValue = commaDelimitedStringToSecurableComponents(attValue);
+      } else if (valueType.isArray() && SecurableCommunicationChannel.class.equals(valueType.getComponentType())) {
+        attObjectValue = commaDelimitedStringToSecurableCommunicationChannels(attValue);
       }else {
         throw new InternalGemFireException(LocalizedStrings.AbstractConfig_UNHANDLED_ATTRIBUTE_TYPE_0_FOR_1.toLocalizedString(new Object[] {
           valueType, attName
@@ -436,13 +436,13 @@ public abstract class AbstractConfig implements Config {
     return strings;
   }
 
-  private SecurableComponent[] commaDelimitedStringToSecurableComponents(final String tokenizeString) {
+  private SecurableCommunicationChannel[] commaDelimitedStringToSecurableCommunicationChannels(final String tokenizeString) {
     StringTokenizer stringTokenizer = new StringTokenizer(tokenizeString, ",");
-    SecurableComponent[] returnArray = new SecurableComponent[stringTokenizer.countTokens()];
+    SecurableCommunicationChannel[] returnArray = new SecurableCommunicationChannel[stringTokenizer.countTokens()];
     for (int i = 0; i < returnArray.length; i++) {
       String name = stringTokenizer.nextToken();
       try {
-        returnArray[i] = SecurableComponent.getEnum(name);
+        returnArray[i] = SecurableCommunicationChannel.getEnum(name);
       } catch (Exception e) {
         throw new IllegalArgumentException(e);
       }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/0b579cfe/geode-core/src/main/java/com/gemstone/gemfire/internal/net/SSLConfigurationFactory.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/net/SSLConfigurationFactory.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/net/SSLConfigurationFactory.java
index 03b1a47..2b1a22e 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/net/SSLConfigurationFactory.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/net/SSLConfigurationFactory.java
@@ -28,7 +28,6 @@ import com.gemstone.gemfire.GemFireConfigException;
 import com.gemstone.gemfire.distributed.internal.DistributionConfig;
 import com.gemstone.gemfire.internal.admin.SSLConfig;
 import com.gemstone.gemfire.internal.security.SecurableCommunicationChannel;
-import com.gemstone.gemfire.internal.security.SecurableComponent;
 
 public class SSLConfigurationFactory {
 
@@ -163,10 +162,10 @@ public class SSLConfigurationFactory {
   }
 
   private boolean determineIfSSLEnabledForSSLComponent(final SecurableCommunicationChannel sslEnabledComponent) {
-    if (ArrayUtils.contains(getDistributionConfig().getSecurableCommunicationChannels(), SecurableComponent.NONE)) {
+    if (ArrayUtils.contains(getDistributionConfig().getSecurableCommunicationChannels(), SecurableCommunicationChannel.NONE)) {
       return false;
     }
-    if (ArrayUtils.contains(getDistributionConfig().getSecurableCommunicationChannels(), SecurableComponent.ALL)) {
+    if (ArrayUtils.contains(getDistributionConfig().getSecurableCommunicationChannels(), SecurableCommunicationChannel.ALL)) {
       return true;
     }
     return ArrayUtils.contains(getDistributionConfig().getSecurableCommunicationChannels(), sslEnabledComponent) ? true : false;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/0b579cfe/geode-core/src/main/java/com/gemstone/gemfire/internal/net/SocketCreator.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/net/SocketCreator.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/net/SocketCreator.java
index 5136f19..9d118b8 100755
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/net/SocketCreator.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/net/SocketCreator.java
@@ -96,6 +96,7 @@ import com.gemstone.gemfire.internal.cache.wan.TransportFilterSocketFactory;
 import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
 import com.gemstone.gemfire.internal.logging.LogService;
 import com.gemstone.gemfire.internal.logging.log4j.LocalizedMessage;
+import com.gemstone.gemfire.internal.security.SecurableCommunicationChannel;
 import com.gemstone.gemfire.internal.security.SecurableComponent;
 import com.gemstone.gemfire.internal.util.PasswordUtil;
 
@@ -331,7 +332,7 @@ public class SocketCreator {
   private void initialize() {
     try {
       // set p2p values...
-      if (SecurableComponent.CLUSTER.equals(sslConfig.getSecuredCommunicationChannel())) {
+      if (SecurableCommunicationChannel.CLUSTER.equals(sslConfig.getSecuredCommunicationChannel())) {
         if (this.sslConfig.isEnabled()) {
           System.setProperty("p2p.useSSL", "true");
           System.setProperty("p2p.oldIO", "true");

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/0b579cfe/geode-core/src/main/java/com/gemstone/gemfire/internal/security/SecurableComponent.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/security/SecurableComponent.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/security/SecurableComponent.java
index 439cde5..b572a23 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/security/SecurableComponent.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/security/SecurableComponent.java
@@ -16,8 +16,6 @@
  */
 package com.gemstone.gemfire.internal.security;
 
-import org.springframework.util.StringUtils;
-
 import com.gemstone.gemfire.GemFireConfigException;
 import org.apache.geode.security.SecurableComponents;
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/0b579cfe/geode-core/src/test/java/com/gemstone/gemfire/cache/client/internal/CacheServerSSLConnectionDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache/client/internal/CacheServerSSLConnectionDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache/client/internal/CacheServerSSLConnectionDUnitTest.java
index 5884c1f..d97249b 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache/client/internal/CacheServerSSLConnectionDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache/client/internal/CacheServerSSLConnectionDUnitTest.java
@@ -38,6 +38,7 @@ import com.gemstone.gemfire.cache.client.ClientRegionFactory;
 import com.gemstone.gemfire.cache.client.ClientRegionShortcut;
 import com.gemstone.gemfire.cache.server.CacheServer;
 import com.gemstone.gemfire.internal.net.SocketCreatorFactory;
+import com.gemstone.gemfire.internal.security.SecurableCommunicationChannel;
 import com.gemstone.gemfire.internal.security.SecurableComponent;
 import com.gemstone.gemfire.security.AuthenticationRequiredException;
 import com.gemstone.gemfire.test.dunit.Host;
@@ -111,7 +112,7 @@ public class CacheServerSSLConnectionDUnitTest extends JUnit4DistributedTestCase
     String cacheServerSslciphers = "any";
     boolean cacheServerSslRequireAuth = true;
     if (!legacy) {
-      gemFireProps.put(SSL_ENABLED_COMPONENTS, SecurableComponent.CLUSTER + "," + SecurableComponent.SERVER);
+      gemFireProps.put(SSL_ENABLED_COMPONENTS, SecurableCommunicationChannel.CLUSTER + "," + SecurableCommunicationChannel.SERVER);
       gemFireProps.put(SSL_PROTOCOLS, cacheServerSslprotocols);
       gemFireProps.put(SSL_CIPHERS, cacheServerSslciphers);
       gemFireProps.put(SSL_REQUIRE_AUTHENTICATION, String.valueOf(cacheServerSslRequireAuth));

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/0b579cfe/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorDUnitTest.java
index a373e82..2cee5bf 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorDUnitTest.java
@@ -55,7 +55,7 @@ import com.gemstone.gemfire.internal.AvailablePortHelper;
 import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
 import com.gemstone.gemfire.internal.logging.InternalLogWriter;
 import com.gemstone.gemfire.internal.logging.LocalLogWriter;
-import com.gemstone.gemfire.internal.security.SecurableComponent;
+import com.gemstone.gemfire.internal.security.SecurableCommunicationChannel;
 import com.gemstone.gemfire.internal.tcp.Connection;
 import com.gemstone.gemfire.test.dunit.DistributedTestUtils;
 import com.gemstone.gemfire.test.dunit.Host;
@@ -371,7 +371,7 @@ public class LocatorDUnitTest extends JUnit4DistributedTestCase {
     properties.put(SSL_KEYSTORE_TYPE, "JKS");
     properties.put(SSL_TRUSTSTORE, getSingleKeyKeystore());
     properties.put(SSL_TRUSTSTORE_PASSWORD, "password");
-    properties.put(SSL_ENABLED_COMPONENTS, SecurableComponent.LOCATOR.getConstant());
+    properties.put(SSL_ENABLED_COMPONENTS, SecurableCommunicationChannel.LOCATOR.getConstant());
 
     try {
       loc2.invoke("startLocator2", () -> startLocatorWithPortAndProperties(port2, properties));
@@ -420,7 +420,7 @@ public class LocatorDUnitTest extends JUnit4DistributedTestCase {
     properties.put(SSL_TRUSTSTORE, getMultiKeyTruststore());
     properties.put(SSL_TRUSTSTORE_PASSWORD, "password");
     properties.put(SSL_LOCATOR_ALIAS, "locatorkey");
-    properties.put(SSL_ENABLED_COMPONENTS, SecurableComponent.LOCATOR.getConstant());
+    properties.put(SSL_ENABLED_COMPONENTS, SecurableCommunicationChannel.LOCATOR.getConstant());
 
 
     try {
@@ -471,7 +471,7 @@ public class LocatorDUnitTest extends JUnit4DistributedTestCase {
     properties.put(SSL_TRUSTSTORE, getSingleKeyKeystore());
     properties.put(SSL_TRUSTSTORE_PASSWORD, "password");
     properties.put(SSL_REQUIRE_AUTHENTICATION, "true");
-    properties.put(SSL_ENABLED_COMPONENTS, SecurableComponent.LOCATOR.getConstant());
+    properties.put(SSL_ENABLED_COMPONENTS, SecurableCommunicationChannel.LOCATOR.getConstant());
 
     try {
       loc1.invoke("start Locator1", () -> startLocator(port1, properties));
@@ -537,7 +537,7 @@ public class LocatorDUnitTest extends JUnit4DistributedTestCase {
       properties.put(SSL_TRUSTSTORE, getSingleKeyKeystore());
       properties.put(SSL_TRUSTSTORE_PASSWORD, "password");
       properties.put(SSL_REQUIRE_AUTHENTICATION, "true");
-      properties.put(SSL_ENABLED_COMPONENTS, SecurableComponent.LOCATOR.getConstant());
+      properties.put(SSL_ENABLED_COMPONENTS, SecurableCommunicationChannel.LOCATOR.getConstant());
 
       loc2.invoke("start Locator2", () -> startLocator(port2, properties));
     } finally {
@@ -588,7 +588,7 @@ public class LocatorDUnitTest extends JUnit4DistributedTestCase {
     properties.put(SSL_TRUSTSTORE, getSingleKeyKeystore());
     properties.put(SSL_TRUSTSTORE_PASSWORD, "password");
     properties.put(SSL_REQUIRE_AUTHENTICATION, "true");
-    properties.put(SSL_ENABLED_COMPONENTS, SecurableComponent.LOCATOR.getConstant());
+    properties.put(SSL_ENABLED_COMPONENTS, SecurableCommunicationChannel.LOCATOR.getConstant());
 
     try {
       loc1.invoke("start Locator1", () -> startLocator(port1, properties));

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/0b579cfe/geode-core/src/test/java/com/gemstone/gemfire/management/ConnectToLocatorSSLDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/ConnectToLocatorSSLDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/ConnectToLocatorSSLDUnitTest.java
index 048e304..5a83b13 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/ConnectToLocatorSSLDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/ConnectToLocatorSSLDUnitTest.java
@@ -36,6 +36,7 @@ import org.junit.rules.TemporaryFolder;
 
 import com.gemstone.gemfire.distributed.Locator;
 import com.gemstone.gemfire.internal.AvailablePortHelper;
+import com.gemstone.gemfire.internal.security.SecurableCommunicationChannel;
 import com.gemstone.gemfire.internal.security.SecurableComponent;
 import com.gemstone.gemfire.management.cli.Result.Status;
 import com.gemstone.gemfire.management.internal.cli.CliUtil;
@@ -75,7 +76,7 @@ public class ConnectToLocatorSSLDUnitTest extends JUnit4DistributedTestCase {
   @Test
   public void testConnectToLocatorWithSSL() throws Exception{
     Properties securityProps = new Properties();
-    securityProps.setProperty(SSL_ENABLED_COMPONENTS, SecurableComponent.LOCATOR.getConstant());
+    securityProps.setProperty(SSL_ENABLED_COMPONENTS, SecurableCommunicationChannel.LOCATOR.getConstant());
     securityProps.setProperty(SSL_KEYSTORE, jks.getCanonicalPath());
     securityProps.setProperty(SSL_KEYSTORE_PASSWORD, "password");
     securityProps.setProperty(SSL_KEYSTORE_TYPE, "JKS");

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/0b579cfe/geode-core/src/test/java/com/gemstone/gemfire/management/JMXMBeanDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/JMXMBeanDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/JMXMBeanDUnitTest.java
index 3c1f944..a84e6cb 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/JMXMBeanDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/JMXMBeanDUnitTest.java
@@ -40,6 +40,7 @@ import org.junit.experimental.categories.Category;
 
 import com.gemstone.gemfire.distributed.LocatorLauncher;
 import com.gemstone.gemfire.internal.AvailablePortHelper;
+import com.gemstone.gemfire.internal.security.SecurableCommunicationChannel;
 import com.gemstone.gemfire.internal.security.SecurableComponent;
 import com.gemstone.gemfire.test.dunit.DistributedTestCase;
 import com.gemstone.gemfire.test.dunit.DistributedTestUtils;
@@ -237,7 +238,7 @@ public class JMXMBeanDUnitTest extends DistributedTestCase {
         properties.setProperty(SSL_TRUSTSTORE_PASSWORD, "password");
         properties.setProperty(SSL_KEYSTORE, getSimpleSingleKeyKeystore());
         properties.setProperty(SSL_TRUSTSTORE, getSimpleSingleKeyKeystore());
-        properties.setProperty(SSL_ENABLED_COMPONENTS, SecurableComponent.JMX.getConstant());
+        properties.setProperty(SSL_ENABLED_COMPONENTS, SecurableCommunicationChannel.JMX.getConstant());
 
         if (useMultiKey) {
           properties.setProperty(SSL_KEYSTORE, getMultiKeyKeystore());


[07/50] [abbrv] incubator-geode git commit: GEODE-1792: Changed protocols and ciphers to be comma separated Make ssl-ciphers and ssl-protocols comma separated properties. The legacy *-ssl-ciphers and *-ssl-protocols still use space separated.

Posted by ud...@apache.org.
GEODE-1792: Changed protocols and ciphers to be comma separated
Make ssl-ciphers and ssl-protocols comma separated properties. The legacy *-ssl-ciphers and
*-ssl-protocols still use space separated.


Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/80731e54
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/80731e54
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/80731e54

Branch: refs/heads/develop
Commit: 80731e5404b32d84f630c46f5cf76f7c2684718f
Parents: daf025c
Author: Udo Kohlmeyer <uk...@pivotal.io>
Authored: Thu Aug 18 12:04:54 2016 +1000
Committer: Udo Kohlmeyer <uk...@pivotal.io>
Committed: Thu Aug 18 12:04:54 2016 +1000

----------------------------------------------------------------------
 .../gemfire/admin/DistributedSystemConfig.java  |   8 +-
 .../internal/DistributedSystemConfigImpl.java   | 211 +++++++---------
 .../EnabledManagedEntityController.java         | 247 +++++++++----------
 .../ManagedEntityConfigXmlGenerator.java        | 149 +++++------
 .../internal/ManagedEntityConfigXmlParser.java  | 174 ++++++-------
 .../internal/AdminDistributedSystemJmxImpl.java |   8 +-
 .../admin/jmx/internal/AgentConfigImpl.java     |  21 +-
 .../gemfire/admin/jmx/internal/AgentImpl.java   |   8 +-
 .../distributed/ConfigurationProperties.java    |   2 +-
 .../internal/DistributionConfig.java            |  84 +++----
 .../internal/DistributionConfigImpl.java        | 103 ++++----
 .../gemfire/internal/admin/SSLConfig.java       |  25 +-
 .../internal/net/SSLConfigurationFactory.java   |   5 +-
 .../gemfire/internal/net/SocketCreator.java     |  10 +-
 .../gemfire/management/GemFireProperties.java   |  80 +++---
 .../management/internal/JettyHelper.java        |   7 +-
 .../gemfire/management/internal/SSLUtil.java    |  37 ++-
 .../internal/cli/commands/ShellCommands.java    |   2 +-
 .../internal/DistributionConfigJUnitTest.java   |  65 ++++-
 .../net/SSLConfigurationFactoryTest.java        |   5 +-
 gradle/java.gradle                              |  42 ++--
 21 files changed, 655 insertions(+), 638 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/80731e54/geode-core/src/main/java/com/gemstone/gemfire/admin/DistributedSystemConfig.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/admin/DistributedSystemConfig.java b/geode-core/src/main/java/com/gemstone/gemfire/admin/DistributedSystemConfig.java
index 17600bc..89ef390 100755
--- a/geode-core/src/main/java/com/gemstone/gemfire/admin/DistributedSystemConfig.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/admin/DistributedSystemConfig.java
@@ -450,16 +450,16 @@ public interface DistributedSystemConfig extends Cloneable {
   public void setSSLEnabled(boolean enabled);
 
   /** Returns the value of the "ssl-protocols" property. */
-  public String getSSLProtocols();
+  public String[] getSSLProtocols();
 
   /** Sets the value of the "ssl-protocols" property. */
-  public void setSSLProtocols(String protocols);
+  public void setSSLProtocols(String[] protocols);
 
   /** Returns the value of the "ssl-ciphers" property. */
-  public String getSSLCiphers();
+  public String[] getSSLCiphers();
 
   /** Sets the value of the "ssl-ciphers" property. */
-  public void setSSLCiphers(String ciphers);
+  public void setSSLCiphers(String[] ciphers);
 
   /** Returns the value of the "ssl-require-authentication" property. */
   public boolean isSSLAuthenticationRequired();

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/80731e54/geode-core/src/main/java/com/gemstone/gemfire/admin/internal/DistributedSystemConfigImpl.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/admin/internal/DistributedSystemConfigImpl.java b/geode-core/src/main/java/com/gemstone/gemfire/admin/internal/DistributedSystemConfigImpl.java
index 37cd139..2198e69 100755
--- a/geode-core/src/main/java/com/gemstone/gemfire/admin/internal/DistributedSystemConfigImpl.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/admin/internal/DistributedSystemConfigImpl.java
@@ -16,7 +16,28 @@
  */
 package com.gemstone.gemfire.admin.internal;
 
-import com.gemstone.gemfire.admin.*;
+import static com.gemstone.gemfire.distributed.ConfigurationProperties.*;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.ArrayList;
+import java.util.Enumeration;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.Properties;
+import java.util.Set;
+import java.util.StringTokenizer;
+
+import org.apache.logging.log4j.Logger;
+
+import com.gemstone.gemfire.admin.AdminXmlException;
+import com.gemstone.gemfire.admin.CacheServerConfig;
+import com.gemstone.gemfire.admin.CacheVmConfig;
+import com.gemstone.gemfire.admin.DistributedSystemConfig;
+import com.gemstone.gemfire.admin.DistributionLocator;
+import com.gemstone.gemfire.admin.DistributionLocatorConfig;
 import com.gemstone.gemfire.distributed.internal.DistributionConfig;
 import com.gemstone.gemfire.distributed.internal.DistributionConfigImpl;
 import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
@@ -24,15 +45,6 @@ import com.gemstone.gemfire.internal.logging.InternalLogWriter;
 import com.gemstone.gemfire.internal.logging.LogConfig;
 import com.gemstone.gemfire.internal.logging.LogService;
 import com.gemstone.gemfire.internal.logging.LogWriterImpl;
-import org.apache.logging.log4j.Logger;
-
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.*;
-
-import static com.gemstone.gemfire.distributed.ConfigurationProperties.*;
 
 /**
  * An implementation of the configuration object for an
@@ -43,11 +55,9 @@ import static com.gemstone.gemfire.distributed.ConfigurationProperties.*;
  * distribution locators) are "passed through" to the
  * <code>AdminDistributedSystem</code> associated with this
  * configuration object.
- *
  * @since GemFire 3.5
  */
-public class DistributedSystemConfigImpl
-    implements DistributedSystemConfig {
+public class DistributedSystemConfigImpl implements DistributedSystemConfig {
 
   private static final Logger logger = LogService.getLogger();
 
@@ -99,8 +109,8 @@ public class DistributedSystemConfigImpl
   /**
    * The admin distributed system object that is configured by this
    * config object.
-   *
-   * @since GemFire 4.0 */
+   * @since GemFire 4.0
+   */
   private AdminDistributedSystemImpl system;
 
   /**
@@ -114,21 +124,14 @@ public class DistributedSystemConfigImpl
    * Filters out all properties that are unique to the admin
    * <code>DistributedSystemConfig</code> that are not present in the
    * internal <code>DistributionConfig</code>.
-   *
    * @since GemFire 4.0
    */
-  private static Properties
-  filterOutAdminProperties(Properties props) {
+  private static Properties filterOutAdminProperties(Properties props) {
 
     Properties props2 = new Properties();
-    for (Enumeration names = props.propertyNames();
-         names.hasMoreElements(); ) {
+    for (Enumeration names = props.propertyNames(); names.hasMoreElements(); ) {
       String name = (String) names.nextElement();
-      if (!(ENTITY_CONFIG_XML_FILE_NAME.equals(name) ||
-          REFRESH_INTERVAL_NAME.equals(name) ||
-          REMOTE_COMMAND_NAME.equals(name)
-      )
-          ) {
+      if (!(ENTITY_CONFIG_XML_FILE_NAME.equals(name) || REFRESH_INTERVAL_NAME.equals(name) || REMOTE_COMMAND_NAME.equals(name))) {
         String value = props.getProperty(name);
         if ((name != null) && (value != null)) {
           props2.setProperty(name, value);
@@ -146,8 +149,7 @@ public class DistributedSystemConfigImpl
    * the configuration stored in a <code>DistributedSystem</code>'s
    * <code>DistributionConfig</code>.
    */
-  public DistributedSystemConfigImpl(DistributionConfig distConfig,
-      String remoteCommand) {
+  public DistributedSystemConfigImpl(DistributionConfig distConfig, String remoteCommand) {
     if (distConfig == null) {
       throw new IllegalArgumentException(LocalizedStrings.DistributedSystemConfigImpl_DISTRIBUTIONCONFIG_MUST_NOT_BE_NULL.toLocalizedString());
     }
@@ -155,8 +157,7 @@ public class DistributedSystemConfigImpl
     this.mcastAddress = InetAddressUtil.toString(distConfig.getMcastAddress());
     this.mcastPort = distConfig.getMcastPort();
     this.locators = distConfig.getLocators();
-    this.membershipPortRange =
-        getMembershipPortRangeString(distConfig.getMembershipPortRange());
+    this.membershipPortRange = getMembershipPortRangeString(distConfig.getMembershipPortRange());
 
     this.systemName = distConfig.getName();
 
@@ -166,8 +167,7 @@ public class DistributedSystemConfigImpl
     this.sslAuthenticationRequired = distConfig.getClusterSSLRequireAuthentication();
 
     this.logFile = distConfig.getLogFile().getPath();
-    this.logLevel =
-        LogWriterImpl.levelToString(distConfig.getLogLevel());
+    this.logLevel = LogWriterImpl.levelToString(distConfig.getLogLevel());
     this.logDiskSpaceLimit = distConfig.getLogDiskSpaceLimit();
     this.logFileSizeLimit = distConfig.getLogFileSizeLimit();
 
@@ -186,7 +186,6 @@ public class DistributedSystemConfigImpl
 
   /**
    * Zero-argument constructor to be used only by subclasses.
-   *
    * @since GemFire 4.0
    */
   protected DistributedSystemConfigImpl() {
@@ -205,39 +204,32 @@ public class DistributedSystemConfigImpl
   /**
    * Creates a new <code>DistributedSystemConifgImpl</code> whose configuration
    * is specified by the given <code>Properties</code> object.
-   * 
-   * @param props
-   *          The configuration properties specified by the caller
-   * @param ignoreGemFirePropsFile
-   *          whether to skip loading distributed system properties from
-   *          gemfire.properties file
-   *          
+   * @param props The configuration properties specified by the caller
+   * @param ignoreGemFirePropsFile whether to skip loading distributed system properties from
+   * gemfire.properties file
+   *
    * @since GemFire 6.5
    */
-  protected DistributedSystemConfigImpl(Properties props,
-      boolean ignoreGemFirePropsFile) {
-    this(new DistributionConfigImpl(
-            filterOutAdminProperties(props), ignoreGemFirePropsFile),
-        DEFAULT_REMOTE_COMMAND);
+  protected DistributedSystemConfigImpl(Properties props, boolean ignoreGemFirePropsFile) {
+    this(new DistributionConfigImpl(filterOutAdminProperties(props), ignoreGemFirePropsFile), DEFAULT_REMOTE_COMMAND);
     String remoteCommand = props.getProperty(REMOTE_COMMAND_NAME);
     if (remoteCommand != null) {
       this.remoteCommand = remoteCommand;
     }
 
-    String entityConfigXMLFile =
-        props.getProperty(ENTITY_CONFIG_XML_FILE_NAME);
+    String entityConfigXMLFile = props.getProperty(ENTITY_CONFIG_XML_FILE_NAME);
     if (entityConfigXMLFile != null) {
       this.entityConfigXMLFile = entityConfigXMLFile;
     }
 
-    String refreshInterval =
-        props.getProperty(REFRESH_INTERVAL_NAME);
+    String refreshInterval = props.getProperty(REFRESH_INTERVAL_NAME);
     if (refreshInterval != null) {
       try {
         this.refreshInterval = Integer.parseInt(refreshInterval);
       } catch (NumberFormatException nfEx) {
-        throw new IllegalArgumentException(
-            LocalizedStrings.DistributedSystemConfigImpl_0_IS_NOT_A_VALID_INTEGER_1.toLocalizedString(new Object[] { refreshInterval, REFRESH_INTERVAL_NAME }));
+        throw new IllegalArgumentException(LocalizedStrings.DistributedSystemConfigImpl_0_IS_NOT_A_VALID_INTEGER_1.toLocalizedString(new Object[] {
+          refreshInterval, REFRESH_INTERVAL_NAME
+        }));
       }
     }
   }
@@ -248,7 +240,6 @@ public class DistributedSystemConfigImpl
    * Returns the <code>LogWriterI18n</code> to be used when administering
    * the distributed system. Returns null if nothing has been provided via
    * <code>setInternalLogWriter</code>.
-   *
    * @since GemFire 4.0
    */
   public InternalLogWriter getInternalLogWriter() {
@@ -307,7 +298,6 @@ public class DistributedSystemConfigImpl
    * Marks this config object as "read only".  Attempts to modify a
    * config object will result in a {@link IllegalStateException}
    * being thrown.
-   *
    * @since GemFire 4.0
    */
   void setDistributedSystem(AdminDistributedSystemImpl system) {
@@ -317,14 +307,12 @@ public class DistributedSystemConfigImpl
   /**
    * Checks to see if this config object is "read only".  If it is,
    * then an {@link IllegalStateException} is thrown.
-   *
    * @since GemFire 4.0
    */
   protected void checkReadOnly() {
     if (this.system != null) {
-      throw new IllegalStateException(
-          LocalizedStrings.DistributedSystemConfigImpl_A_DISTRIBUTEDSYSTEMCONFIG_OBJECT_CANNOT_BE_MODIFIED_AFTER_IT_HAS_BEEN_USED_TO_CREATE_AN_ADMINDISTRIBUTEDSYSTEM
-              .toLocalizedString());
+      throw new IllegalStateException(LocalizedStrings.DistributedSystemConfigImpl_A_DISTRIBUTEDSYSTEMCONFIG_OBJECT_CANNOT_BE_MODIFIED_AFTER_IT_HAS_BEEN_USED_TO_CREATE_AN_ADMINDISTRIBUTEDSYSTEM
+        .toLocalizedString());
     }
   }
 
@@ -341,7 +329,6 @@ public class DistributedSystemConfigImpl
   /**
    * Parses the XML configuration file that describes managed
    * entities.
-   *
    * @throws AdminXmlException If a problem is encountered while parsing the XML file.
    */
   private void parseEntityConfigXMLFile() {
@@ -443,7 +430,6 @@ public class DistributedSystemConfigImpl
 
   /**
    * Returns the value for membership-port-range
-   *
    * @return the value for the Distributed System property membership-port-range
    */
   public String getMembershipPortRange() {
@@ -452,9 +438,8 @@ public class DistributedSystemConfigImpl
 
   /**
    * Sets the Distributed System property membership-port-range
-   *
    * @param membershipPortRangeStr the value for membership-port-range given as two numbers separated
-   *                               by a minus sign.
+   * by a minus sign.
    */
   public void setMembershipPortRange(String membershipPortRangeStr) {
     /*
@@ -472,10 +457,9 @@ public class DistributedSystemConfigImpl
         if (validateMembershipRange(membershipPortRangeStr)) {
           this.membershipPortRange = membershipPortRangeStr;
         } else {
-          throw new IllegalArgumentException(
-              LocalizedStrings.DistributedSystemConfigImpl_INVALID_VALUE_FOR_MEMBERSHIP_PORT_RANGE
-                  .toLocalizedString(new Object[] { membershipPortRangeStr,
-                      MEMBERSHIP_PORT_RANGE_NAME }));
+          throw new IllegalArgumentException(LocalizedStrings.DistributedSystemConfigImpl_INVALID_VALUE_FOR_MEMBERSHIP_PORT_RANGE.toLocalizedString(new Object[] {
+            membershipPortRangeStr, MEMBERSHIP_PORT_RANGE_NAME
+          }));
         }
       } catch (Exception e) {
         if (logger.isDebugEnabled()) {
@@ -499,9 +483,9 @@ public class DistributedSystemConfigImpl
    * Validates the given string - which is expected in the format as two numbers
    * separated by a minus sign - in to an integer array of length 2 with first
    * element as lower end & second element as upper end of the range.
-   *
    * @param membershipPortRange membership-port-range given as two numbers separated by a minus
-   *                            sign.
+   * sign.
+   *
    * @return true if the membership-port-range string is valid, false otherwise
    */
   private boolean validateMembershipRange(String membershipPortRange) {
@@ -513,8 +497,7 @@ public class DistributedSystemConfigImpl
       range[1] = Integer.parseInt(splitted[1].trim());
       //NumberFormatException if any could be thrown
 
-      if (range[0] < 0 || range[0] >= range[1] ||
-          range[1] < 0 || range[1] > 65535) {
+      if (range[0] < 0 || range[0] >= range[1] || range[1] < 0 || range[1] > 65535) {
         range = null;
       }
     }
@@ -527,10 +510,8 @@ public class DistributedSystemConfigImpl
    */
   private static String getMembershipPortRangeString(int[] membershipPortRange) {
     String membershipPortRangeString = "";
-    if (membershipPortRange != null &&
-        membershipPortRange.length == 2) {
-      membershipPortRangeString = membershipPortRange[0] + "-" +
-          membershipPortRange[1];
+    if (membershipPortRange != null && membershipPortRange.length == 2) {
+      membershipPortRangeString = membershipPortRange[0] + "-" + membershipPortRange[1];
     }
 
     return membershipPortRangeString;
@@ -694,12 +675,10 @@ public class DistributedSystemConfigImpl
   /**
    * Returns an array of configurations for statically known
    * CacheServers
-   *
    * @since GemFire 4.0
-   */ 
+   */
   public CacheServerConfig[] getCacheServerConfigs() {
-    return (CacheServerConfig[]) this.cacheServerConfigs.toArray(
-        new CacheServerConfig[this.cacheServerConfigs.size()]);
+    return (CacheServerConfig[]) this.cacheServerConfigs.toArray(new CacheServerConfig[this.cacheServerConfigs.size()]);
   }
 
   public CacheVmConfig[] getCacheVmConfigs() {
@@ -708,7 +687,6 @@ public class DistributedSystemConfigImpl
 
   /**
    * Creates the configuration for a CacheServer
-   *
    * @since GemFire 4.0
    */
   public CacheServerConfig createCacheServerConfig() {
@@ -723,14 +701,14 @@ public class DistributedSystemConfigImpl
 
   /**
    * Adds the configuration for a CacheServer
-   *
    * @since GemFire 4.0
    */
   private void addCacheServerConfig(CacheServerConfig managerConfig) {
     checkReadOnly();
 
-    if (managerConfig == null)
+    if (managerConfig == null) {
       return;
+    }
     for (Iterator iter = this.cacheServerConfigs.iterator(); iter.hasNext(); ) {
       CacheServerConfigImpl impl = (CacheServerConfigImpl) iter.next();
       if (impl.equals(managerConfig)) {
@@ -743,7 +721,6 @@ public class DistributedSystemConfigImpl
 
   /**
    * Removes the configuration for a CacheServer
-   *
    * @since GemFire 4.0
    */
   public void removeCacheServerConfig(CacheServerConfig managerConfig) {
@@ -761,18 +738,15 @@ public class DistributedSystemConfigImpl
    */
   public DistributionLocatorConfig[] getDistributionLocatorConfigs() {
     if (this.system != null) {
-      DistributionLocator[] locators =
-          this.system.getDistributionLocators();
-      DistributionLocatorConfig[] configs =
-          new DistributionLocatorConfig[locators.length];
+      DistributionLocator[] locators = this.system.getDistributionLocators();
+      DistributionLocatorConfig[] configs = new DistributionLocatorConfig[locators.length];
       for (int i = 0; i < locators.length; i++) {
         configs[i] = locators[i].getConfig();
       }
       return configs;
 
     } else {
-      Object[] array =
-          new DistributionLocatorConfig[this.locatorConfigs.size()];
+      Object[] array = new DistributionLocatorConfig[this.locatorConfigs.size()];
       return (DistributionLocatorConfig[]) this.locatorConfigs.toArray(array);
     }
   }
@@ -809,22 +783,22 @@ public class DistributedSystemConfigImpl
    * Validates the bind address.  The address may be a host name or IP address,
    * but it must not be empty and must be usable for creating an InetAddress.
    * Cannot have a leading '/' (which InetAddress.toString() produces).
-   *
    * @param bindAddress host name or IP address to validate
    */
   public static boolean validateBindAddress(String bindAddress) {
-    if (bindAddress == null || bindAddress.length() == 0)
+    if (bindAddress == null || bindAddress.length() == 0) {
       return true;
-    if (InetAddressUtil.validateHost(bindAddress) == null)
+    }
+    if (InetAddressUtil.validateHost(bindAddress) == null) {
       return false;
+    }
     return true;
   }
 
   public synchronized void configChanged() {
     ConfigListener[] clients = null;
     synchronized (this.listeners) {
-      clients = (ConfigListener[])
-          listeners.toArray(new ConfigListener[this.listeners.size()]);
+      clients = (ConfigListener[]) listeners.toArray(new ConfigListener[this.listeners.size()]);
     }
     for (int i = 0; i < clients.length; i++) {
       try {
@@ -856,14 +830,10 @@ public class DistributedSystemConfigImpl
   // -------------------------------------------------------------------------
   //   SSL support...
   // -------------------------------------------------------------------------
-  private boolean sslEnabled =
-      DistributionConfig.DEFAULT_SSL_ENABLED;
-  private String sslProtocols =
-      DistributionConfig.DEFAULT_SSL_PROTOCOLS;
-  private String sslCiphers =
-      DistributionConfig.DEFAULT_SSL_CIPHERS;
-  private boolean sslAuthenticationRequired =
-      DistributionConfig.DEFAULT_SSL_REQUIRE_AUTHENTICATION;
+  private boolean sslEnabled = DistributionConfig.DEFAULT_SSL_ENABLED;
+  private String[] sslProtocols = new String[] { DistributionConfig.DEFAULT_SSL_PROTOCOLS };
+  private String[] sslCiphers = new String[] { DistributionConfig.DEFAULT_SSL_CIPHERS };
+  private boolean sslAuthenticationRequired = DistributionConfig.DEFAULT_SSL_REQUIRE_AUTHENTICATION;
   private Properties sslProperties = new Properties();
 
   public boolean isSSLEnabled() {
@@ -876,21 +846,21 @@ public class DistributedSystemConfigImpl
     configChanged();
   }
 
-  public String getSSLProtocols() {
+  public String[] getSSLProtocols() {
     return this.sslProtocols;
   }
 
-  public void setSSLProtocols(String protocols) {
+  public void setSSLProtocols(final String[] protocols) {
     checkReadOnly();
     this.sslProtocols = protocols;
     configChanged();
   }
 
-  public String getSSLCiphers() {
+  public String[] getSSLCiphers() {
     return this.sslCiphers;
   }
 
-  public void setSSLCiphers(String ciphers) {
+  public void setSSLCiphers(String[] ciphers) {
     checkReadOnly();
     this.sslCiphers = ciphers;
     configChanged();
@@ -933,6 +903,7 @@ public class DistributedSystemConfigImpl
 
   /**
    * @return the gfSecurityProperties
+   *
    * @since GemFire 6.6.3
    */
   public Properties getGfSecurityProperties() {
@@ -998,14 +969,13 @@ public class DistributedSystemConfigImpl
   /**
    * Makes sure that the mcast port and locators are correct and
    * consistent.
-   *
    * @throws IllegalArgumentException If configuration is not valid
    */
   public void validate() {
-    if (this.getMcastPort() < MIN_MCAST_PORT ||
-        this.getMcastPort() > MAX_MCAST_PORT) {
-      throw new IllegalArgumentException(LocalizedStrings.DistributedSystemConfigImpl_MCASTPORT_MUST_BE_AN_INTEGER_INCLUSIVELY_BETWEEN_0_AND_1
-          .toLocalizedString(new Object[] { Integer.valueOf(MIN_MCAST_PORT), Integer.valueOf(MAX_MCAST_PORT) }));
+    if (this.getMcastPort() < MIN_MCAST_PORT || this.getMcastPort() > MAX_MCAST_PORT) {
+      throw new IllegalArgumentException(LocalizedStrings.DistributedSystemConfigImpl_MCASTPORT_MUST_BE_AN_INTEGER_INCLUSIVELY_BETWEEN_0_AND_1.toLocalizedString(new Object[] {
+        Integer.valueOf(MIN_MCAST_PORT), Integer.valueOf(MAX_MCAST_PORT)
+      }));
     }
 
     // disabled in 5.1 - multicast and locators can be used together
@@ -1017,16 +987,16 @@ public class DistributedSystemConfigImpl
 
     LogWriterImpl.levelNameToCode(this.logLevel);
 
-    if (this.logFileSizeLimit < MIN_LOG_FILE_SIZE_LIMIT ||
-        this.logFileSizeLimit > MAX_LOG_FILE_SIZE_LIMIT) {
-      throw new IllegalArgumentException(LocalizedStrings.DistributedSystemConfigImpl_LOGFILESIZELIMIT_MUST_BE_AN_INTEGER_BETWEEN_0_AND_1
-          .toLocalizedString(new Object[] { Integer.valueOf(MIN_LOG_FILE_SIZE_LIMIT), Integer.valueOf(MAX_LOG_FILE_SIZE_LIMIT) }));
+    if (this.logFileSizeLimit < MIN_LOG_FILE_SIZE_LIMIT || this.logFileSizeLimit > MAX_LOG_FILE_SIZE_LIMIT) {
+      throw new IllegalArgumentException(LocalizedStrings.DistributedSystemConfigImpl_LOGFILESIZELIMIT_MUST_BE_AN_INTEGER_BETWEEN_0_AND_1.toLocalizedString(new Object[] {
+        Integer.valueOf(MIN_LOG_FILE_SIZE_LIMIT), Integer.valueOf(MAX_LOG_FILE_SIZE_LIMIT)
+      }));
     }
 
-    if (this.logDiskSpaceLimit < MIN_LOG_DISK_SPACE_LIMIT ||
-        this.logDiskSpaceLimit > MAX_LOG_DISK_SPACE_LIMIT) {
-      throw new IllegalArgumentException(LocalizedStrings.DistributedSystemConfigImpl_LOGDISKSPACELIMIT_MUST_BE_AN_INTEGER_BETWEEN_0_AND_1
-          .toLocalizedString(new Object[] { Integer.valueOf(MIN_LOG_DISK_SPACE_LIMIT), Integer.valueOf(MAX_LOG_DISK_SPACE_LIMIT) }));
+    if (this.logDiskSpaceLimit < MIN_LOG_DISK_SPACE_LIMIT || this.logDiskSpaceLimit > MAX_LOG_DISK_SPACE_LIMIT) {
+      throw new IllegalArgumentException(LocalizedStrings.DistributedSystemConfigImpl_LOGDISKSPACELIMIT_MUST_BE_AN_INTEGER_BETWEEN_0_AND_1.toLocalizedString(new Object[] {
+        Integer.valueOf(MIN_LOG_DISK_SPACE_LIMIT), Integer.valueOf(MAX_LOG_DISK_SPACE_LIMIT)
+      }));
     }
 
     parseEntityConfigXMLFile();
@@ -1037,14 +1007,12 @@ public class DistributedSystemConfigImpl
    */
   @Override
   public Object clone() throws CloneNotSupportedException {
-    DistributedSystemConfigImpl other =
-        (DistributedSystemConfigImpl) super.clone();
+    DistributedSystemConfigImpl other = (DistributedSystemConfigImpl) super.clone();
     other.system = null;
     other.cacheServerConfigs = new HashSet();
     other.locatorConfigs = new HashSet();
 
-    DistributionLocatorConfig[] myLocators =
-        this.getDistributionLocatorConfigs();
+    DistributionLocatorConfig[] myLocators = this.getDistributionLocatorConfigs();
     for (int i = 0; i < myLocators.length; i++) {
       DistributionLocatorConfig locator = myLocators[i];
       other.addDistributionLocatorConfig((DistributionLocatorConfig) locator.clone());
@@ -1063,8 +1031,9 @@ public class DistributedSystemConfigImpl
   public String toString() {
     StringBuffer buf = new StringBuffer(1000);
     String lf = System.getProperty("line.separator");
-    if (lf == null)
+    if (lf == null) {
       lf = ",";
+    }
 
     buf.append("DistributedSystemConfig(");
     buf.append(lf);

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/80731e54/geode-core/src/main/java/com/gemstone/gemfire/admin/internal/EnabledManagedEntityController.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/admin/internal/EnabledManagedEntityController.java b/geode-core/src/main/java/com/gemstone/gemfire/admin/internal/EnabledManagedEntityController.java
index 465d7ae..8fee07e 100755
--- a/geode-core/src/main/java/com/gemstone/gemfire/admin/internal/EnabledManagedEntityController.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/admin/internal/EnabledManagedEntityController.java
@@ -16,6 +16,14 @@
  */
 package com.gemstone.gemfire.admin.internal;
 
+import static com.gemstone.gemfire.distributed.ConfigurationProperties.*;
+
+import java.io.File;
+import java.util.Iterator;
+import java.util.Properties;
+
+import org.apache.logging.log4j.Logger;
+
 import com.gemstone.gemfire.admin.AdminDistributedSystem;
 import com.gemstone.gemfire.admin.DistributedSystemConfig;
 import com.gemstone.gemfire.admin.ManagedEntity;
@@ -26,13 +34,7 @@ import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
 import com.gemstone.gemfire.internal.logging.LogService;
 import com.gemstone.gemfire.internal.logging.LoggingThreadGroup;
 import com.gemstone.gemfire.internal.logging.log4j.LocalizedMessage;
-import org.apache.logging.log4j.Logger;
-
-import java.io.File;
-import java.util.Iterator;
-import java.util.Properties;
-
-import static com.gemstone.gemfire.distributed.ConfigurationProperties.*;
+import com.gemstone.gemfire.management.internal.SSLUtil;
 
 /**
  * Implements the actual administration (starting, stopping, etc.) of
@@ -41,43 +43,49 @@ import static com.gemstone.gemfire.distributed.ConfigurationProperties.*;
  * by the {@link InternalManagedEntity} object.  Note that it does not
  * use <code>SystemAdmin</code> to manage "local" entities; it always
  * execs the scripts.
- *
- * <P>
- *
+ * <p>
+ * <p>
+ * <p>
  * This class is a refactoring of <code>Systemcontroller</code>,
  * <code>RemoteCommand</code>, and <code>LocatorRemoteCommand</code>.
- *
  * @since GemFire 4.0
  */
 class EnabledManagedEntityController implements ManagedEntityController {
+
   private static final Logger logger = LogService.getLogger();
 
-//  /** A lock to ensure that only entity is managed at a time.  See bug
-//   * 31374. */
-//  private static Object startStopLock = new Object();
+  //  /** A lock to ensure that only entity is managed at a time.  See bug
+  //   * 31374. */
+  //  private static Object startStopLock = new Object();
 
-  /** Known strings found in output indicating error. */
+  /**
+   * Known strings found in output indicating error.
+   */
   private static final String[] ERROR_OUTPUTS = new String[] {
-    "No such file or directory",
-    "The system cannot find the file specified.",
-    "Access is denied.",
-    "cannot open",
-    "ERROR"
+    "No such file or directory", "The system cannot find the file specified.", "Access is denied.", "cannot open", "ERROR"
   };
 
-  /** Token in command prefix to be replaced with actual HOST */
+  /**
+   * Token in command prefix to be replaced with actual HOST
+   */
   private static final String HOST = "{HOST}";
 
-  /** Token in command prefix to be replaced with actual execution CMD */
+  /**
+   * Token in command prefix to be replaced with actual execution CMD
+   */
   private static final String CMD = "{CMD}";
 
   //////////////////////  Instance Fields  //////////////////////
 
-  /** The thread group in which threads launched by this system
-   * controller reside. */
+  /**
+   * The thread group in which threads launched by this system
+   * controller reside.
+   */
   private final ThreadGroup threadGroup;
 
-  /** System to which the managed entities belong */
+  /**
+   * System to which the managed entities belong
+   */
   private final AdminDistributedSystem system;
 
   ///////////////////////  Constructors  ///////////////////////
@@ -88,8 +96,7 @@ class EnabledManagedEntityController implements ManagedEntityController {
    */
   EnabledManagedEntityController(AdminDistributedSystem system) {
     this.system = system;
-    this.threadGroup =
-      LoggingThreadGroup.createThreadGroup("ManagedEntityController threads", logger);
+    this.threadGroup = LoggingThreadGroup.createThreadGroup("ManagedEntityController threads", logger);
   }
 
   /////////////////////  Instance Methods  /////////////////////
@@ -99,39 +106,41 @@ class EnabledManagedEntityController implements ManagedEntityController {
    * contains a known error message.
    */
   private boolean outputIsError(String output) {
-    if (output == null) return false;
+    if (output == null) {
+      return false;
+    }
     boolean error = false;
     for (int i = 0; i < ERROR_OUTPUTS.length; i++) {
       error = output.indexOf(ERROR_OUTPUTS[i]) > -1;
-      if (error) return error;
+      if (error) {
+        return error;
+      }
     }
     return error;
   }
 
   /**
    * Executes a command using {@link Runtime#exec(java.lang.String)}.
-   *
-   * @param command
-   *        The full command to remotely execute
+   * @param command The full command to remotely execute
    *
    * @return Output from the command that was executed or
-   *         <code>null</code> if the executing the command failed.
+   * <code>null</code> if the executing the command failed.
    */
-  protected String execute(String command,
-                         InternalManagedEntity entity) {
+  protected String execute(String command, InternalManagedEntity entity) {
     /* TODO: this is getting ugly... clients of this method really need to
        have the ability to do their own parsing/checking of 'output' */
     if (command == null || command.length() == 0) {
       throw new IllegalArgumentException(LocalizedStrings.ManagedEntityController_EXECUTION_COMMAND_IS_EMPTY.toLocalizedString());
     }
 
-    File workingDir =
-      new File(entity.getEntityConfig().getWorkingDirectory());
-    logger.info(LocalizedMessage.create(LocalizedStrings.ManagedEntityController_EXECUTING_REMOTE_COMMAND_0_IN_DIRECTORY_1, new Object[] {command, workingDir}));
+    File workingDir = new File(entity.getEntityConfig().getWorkingDirectory());
+    logger.info(LocalizedMessage.create(LocalizedStrings.ManagedEntityController_EXECUTING_REMOTE_COMMAND_0_IN_DIRECTORY_1, new Object[] {
+      command,
+      workingDir
+    }));
     Process p = null;
     try {
-      p = Runtime.getRuntime().exec(command, null /* env */,
-                                    workingDir);
+      p = Runtime.getRuntime().exec(command, null /* env */, workingDir);
 
     } catch (java.io.IOException e) {
       logger.fatal(LocalizedMessage.create(LocalizedStrings.ManagedEntityController_WHILE_EXECUTING_0, command), e);
@@ -141,8 +150,11 @@ class EnabledManagedEntityController implements ManagedEntityController {
     final ProcessOutputReader pos = new ProcessOutputReader(p);
     int retCode = pos.getExitCode();
     final String output = pos.getOutput();
-    logger.info(LocalizedMessage.create(LocalizedStrings.ManagedEntityController_RESULT_OF_EXECUTING_0_IS_1, new Object[] {command, Integer.valueOf(retCode)}));
-    logger.info(LocalizedMessage.create(LocalizedStrings.ManagedEntityController_OUTPUT_OF_0_IS_1, new Object[] {command, output}));
+    logger.info(LocalizedMessage.create(LocalizedStrings.ManagedEntityController_RESULT_OF_EXECUTING_0_IS_1, new Object[] {
+      command,
+      Integer.valueOf(retCode)
+    }));
+    logger.info(LocalizedMessage.create(LocalizedStrings.ManagedEntityController_OUTPUT_OF_0_IS_1, new Object[] { command, output }));
 
     if (retCode != 0 || outputIsError(output)) {
       logger.warn(LocalizedMessage.create(LocalizedStrings.ManagedEntityController_REMOTE_EXECUTION_OF_0_FAILED, command));
@@ -152,12 +164,16 @@ class EnabledManagedEntityController implements ManagedEntityController {
     return output;
   }
 
-  /** Returns true if the path ends with a path separator. */
+  /**
+   * Returns true if the path ends with a path separator.
+   */
   private boolean endsWithSeparator(String path) {
     return path.endsWith("/") || path.endsWith("\\");
   }
 
-  /** Translates the path between Windows and UNIX. */
+  /**
+   * Translates the path between Windows and UNIX.
+   */
   private String getOSPath(String path) {
     if (pathIsWindows(path)) {
       return path.replace('/', '\\');
@@ -166,16 +182,17 @@ class EnabledManagedEntityController implements ManagedEntityController {
     }
   }
 
-//  /** Returns true if the path is on Windows. */
-//  private boolean pathIsWindows(File path) {
-//    return pathIsWindows(path.toString());
-//  }
+  //  /** Returns true if the path is on Windows. */
+  //  private boolean pathIsWindows(File path) {
+  //    return pathIsWindows(path.toString());
+  //  }
 
-  /** Returns true if the path is on Windows. */
+  /**
+   * Returns true if the path is on Windows.
+   */
   private boolean pathIsWindows(String path) {
     if (path != null && path.length() > 1) {
-      return (Character.isLetter(path.charAt(0)) && path.charAt(1) == ':') ||
-        (path.startsWith("//") || path.startsWith("\\\\"));
+      return (Character.isLetter(path.charAt(0)) && path.charAt(1) == ':') || (path.startsWith("//") || path.startsWith("\\\\"));
     }
     return false;
   }
@@ -183,13 +200,10 @@ class EnabledManagedEntityController implements ManagedEntityController {
   /**
    * If the managed entity resides on a remote host, then
    * <code>command</code> is munged to take the remote command into account.
-   *
-   * @throws IllegalStateException
-   *        If a remote command is required, but one has not been
-   *        specified.
+   * @throws IllegalStateException If a remote command is required, but one has not been
+   * specified.
    */
-  private String arrangeRemoteCommand(InternalManagedEntity entity,
-                                      String cmd) {
+  private String arrangeRemoteCommand(InternalManagedEntity entity, String cmd) {
 
     String host = entity.getEntityConfig().getHost();
     if (InetAddressUtil.isLocalHost(host)) {
@@ -203,8 +217,7 @@ class EnabledManagedEntityController implements ManagedEntityController {
     }
 
     if (prefix == null || prefix.length() <= 0) {
-      throw new IllegalStateException(LocalizedStrings.ManagedEntityController_A_REMOTE_COMMAND_MUST_BE_SPECIFIED_TO_OPERATE_ON_A_MANAGED_ENTITY_ON_HOST_0
-          .toLocalizedString(host));
+      throw new IllegalStateException(LocalizedStrings.ManagedEntityController_A_REMOTE_COMMAND_MUST_BE_SPECIFIED_TO_OPERATE_ON_A_MANAGED_ENTITY_ON_HOST_0.toLocalizedString(host));
     }
 
     int hostIdx = prefix.indexOf(HOST);
@@ -243,23 +256,19 @@ class EnabledManagedEntityController implements ManagedEntityController {
    * <code>$GEMFIRE/bin</code> taking into account the {@linkplain
    * ManagedEntityConfig#getProductDirectory product directory} and the
    * platform's file separator.
-   *
-   * <P>
-   *
+   * <p>
+   * <p>
+   * <p>
    * Note: we should probably do a better job of determine whether or
    * not the machine on which the entity runs is Windows or Linux.
-   *
-   * @param executable
-   *        The name of the executable that resides in
-   *        <code>$GEMFIRE/bin</code>.
+   * @param executable The name of the executable that resides in
+   * <code>$GEMFIRE/bin</code>.
    */
-  public String getProductExecutable(InternalManagedEntity entity,
-                                     String executable) {
-    String productDirectory =
-      entity.getEntityConfig().getProductDirectory();
+  public String getProductExecutable(InternalManagedEntity entity, String executable) {
+    String productDirectory = entity.getEntityConfig().getProductDirectory();
     String path = null;
     File productDir = new File(productDirectory);
-//    if (productDir != null) (cannot be null)
+    //    if (productDir != null) (cannot be null)
     {
       path = productDir.getPath();
       if (!endsWithSeparator(path)) {
@@ -267,9 +276,9 @@ class EnabledManagedEntityController implements ManagedEntityController {
       }
       path += "bin" + File.separator;
     }
-//    else {
-//      path = "";
-//    }
+    //    else {
+    //      path = "";
+    //    }
 
     String bat = "";
     if (pathIsWindows(path)) {
@@ -284,10 +293,12 @@ class EnabledManagedEntityController implements ManagedEntityController {
    */
   public String buildSSLArguments(DistributedSystemConfig config) {
     Properties sslProps = buildSSLProperties(config, true);
-    if (sslProps == null) return null;
+    if (sslProps == null) {
+      return null;
+    }
 
     StringBuffer sb = new StringBuffer();
-    for (Iterator iter = sslProps.keySet().iterator(); iter.hasNext();) {
+    for (Iterator iter = sslProps.keySet().iterator(); iter.hasNext(); ) {
       String key = (String) iter.next();
       String value = sslProps.getProperty(key);
       sb.append(" -J-D" + key + "=" + value);
@@ -299,36 +310,27 @@ class EnabledManagedEntityController implements ManagedEntityController {
   /**
    * Builds optional SSL properties for DistributionLocator. Returns null if SSL
    * is not enabled for the distributed system.
-   *
-   * @param forCommandLine
-   *                true indicates that
-   *                {@link DistributionConfig#GEMFIRE_PREFIX} should be
-   *                prepended so the argument will become -Dgemfire.xxxx
+   * @param forCommandLine true indicates that
+   * {@link DistributionConfig#GEMFIRE_PREFIX} should be
+   * prepended so the argument will become -Dgemfire.xxxx
    */
-  private Properties buildSSLProperties(DistributedSystemConfig config,
-                                        boolean forCommandLine) {
-    if (!config.isSSLEnabled()) return null;
+  private Properties buildSSLProperties(DistributedSystemConfig config, boolean forCommandLine) {
+    if (!config.isSSLEnabled()) {
+      return null;
+    }
 
     String prefix = "";
-    if (forCommandLine) prefix = DistributionConfig.GEMFIRE_PREFIX;
+    if (forCommandLine) {
+      prefix = DistributionConfig.GEMFIRE_PREFIX;
+    }
 
     Properties sslProps = (Properties) config.getSSLProperties().clone();
     // add ssl-enabled, etc...
-    sslProps.setProperty(prefix +
-            MCAST_PORT,
-                         "0");
-    sslProps.setProperty(prefix +
-                         CLUSTER_SSL_ENABLED,
-                         String.valueOf(config.isSSLEnabled()));
-    sslProps.setProperty(prefix +
-                         CLUSTER_SSL_CIPHERS,
-                         config.getSSLCiphers());
-    sslProps.setProperty(prefix +
-                         CLUSTER_SSL_PROTOCOLS,
-                         config.getSSLProtocols());
-    sslProps.setProperty(prefix +
-                         CLUSTER_SSL_REQUIRE_AUTHENTICATION,
-                         String.valueOf(config.isSSLAuthenticationRequired()));
+    sslProps.setProperty(prefix + MCAST_PORT, "0");
+    sslProps.setProperty(prefix + CLUSTER_SSL_ENABLED, String.valueOf(config.isSSLEnabled()));
+    sslProps.setProperty(prefix + CLUSTER_SSL_CIPHERS, SSLUtil.arrayToSpaceDelimitedString(config.getSSLCiphers()));
+    sslProps.setProperty(prefix + CLUSTER_SSL_PROTOCOLS, SSLUtil.arrayToSpaceDelimitedString(config.getSSLProtocols()));
+    sslProps.setProperty(prefix + CLUSTER_SSL_REQUIRE_AUTHENTICATION, String.valueOf(config.isSSLAuthenticationRequired()));
     return sslProps;
   }
 
@@ -337,13 +339,12 @@ class EnabledManagedEntityController implements ManagedEntityController {
    * Starts a managed entity.
    */
   public void start(final InternalManagedEntity entity) {
-    final String command =
-      arrangeRemoteCommand(entity, entity.getStartCommand());
+    final String command = arrangeRemoteCommand(entity, entity.getStartCommand());
     Thread start = new Thread(this.threadGroup, new Runnable() {
-        public void run() {
-          execute(command, entity);
-        }
-      }, "Start " + entity.getEntityType());
+      public void run() {
+        execute(command, entity);
+      }
+    }, "Start " + entity.getEntityType());
     start.start();
   }
 
@@ -351,13 +352,12 @@ class EnabledManagedEntityController implements ManagedEntityController {
    * Stops a managed entity.
    */
   public void stop(final InternalManagedEntity entity) {
-    final String command =
-      arrangeRemoteCommand(entity, entity.getStopCommand());
+    final String command = arrangeRemoteCommand(entity, entity.getStopCommand());
     Thread stop = new Thread(this.threadGroup, new Runnable() {
-        public void run() {
-          execute(command, entity);
-        }
-      }, "Stop " + entity.getEntityType());
+      public void run() {
+        execute(command, entity);
+      }
+    }, "Stop " + entity.getEntityType());
     stop.start();
   }
 
@@ -365,22 +365,17 @@ class EnabledManagedEntityController implements ManagedEntityController {
    * Returns whether or not a managed entity is running
    */
   public boolean isRunning(InternalManagedEntity entity) {
-    final String command =
-      arrangeRemoteCommand(entity, entity.getIsRunningCommand());
+    final String command = arrangeRemoteCommand(entity, entity.getIsRunningCommand());
     String output = execute(command, entity);
 
-    if (output == null ||
-        (output.indexOf("stop" /* "ing" "ped" */) != -1) ||
-        (output.indexOf("killed") != -1) ||
-        (output.indexOf("starting") != -1)) {
+    if (output == null || (output.indexOf("stop" /* "ing" "ped" */) != -1) || (output.indexOf("killed") != -1) || (output.indexOf("starting") != -1)) {
       return false;
 
     } else if (output.indexOf("running") != -1) {
       return true;
 
     } else {
-      throw new IllegalStateException(LocalizedStrings.ManagedEntityController_COULD_NOT_DETERMINE_IF_MANAGED_ENTITY_WAS_RUNNING_0
-          .toLocalizedString(output));
+      throw new IllegalStateException(LocalizedStrings.ManagedEntityController_COULD_NOT_DETERMINE_IF_MANAGED_ENTITY_WAS_RUNNING_0.toLocalizedString(output));
     }
   }
 
@@ -390,8 +385,7 @@ class EnabledManagedEntityController implements ManagedEntityController {
    * members.
    */
   public String getLog(DistributionLocatorImpl locator) {
-    String command =
-      arrangeRemoteCommand(locator, locator.getLogCommand());
+    String command = arrangeRemoteCommand(locator, locator.getLogCommand());
     return execute(command, locator);
   }
 
@@ -399,13 +393,10 @@ class EnabledManagedEntityController implements ManagedEntityController {
    * Returns the contents of the given directory using the given
    * managed entity to determine the host and remote command.
    */
-  private String listDirectory(InternalManagedEntity entity,
-                               String dir) {
+  private String listDirectory(InternalManagedEntity entity, String dir) {
     ManagedEntityConfig config = entity.getEntityConfig();
-    String listFile =
-        pathIsWindows(config.getProductDirectory()) ? "dir " : "ls ";
-    String command =
-      arrangeRemoteCommand(entity, listFile + dir);
+    String listFile = pathIsWindows(config.getProductDirectory()) ? "dir " : "ls ";
+    String command = arrangeRemoteCommand(entity, listFile + dir);
     return execute(command, entity);
   }
 }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/80731e54/geode-core/src/main/java/com/gemstone/gemfire/admin/internal/ManagedEntityConfigXmlGenerator.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/admin/internal/ManagedEntityConfigXmlGenerator.java b/geode-core/src/main/java/com/gemstone/gemfire/admin/internal/ManagedEntityConfigXmlGenerator.java
index e406ba3..a2d23a6 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/admin/internal/ManagedEntityConfigXmlGenerator.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/admin/internal/ManagedEntityConfigXmlGenerator.java
@@ -16,40 +16,70 @@
  */
 package com.gemstone.gemfire.admin.internal;
 
-import com.gemstone.gemfire.admin.*;
+import java.io.IOException;
+import java.io.PrintWriter;
+import java.util.Iterator;
+import java.util.Map;
+import java.util.Properties;
+import javax.xml.transform.OutputKeys;
+import javax.xml.transform.Result;
+import javax.xml.transform.Source;
+import javax.xml.transform.Transformer;
+import javax.xml.transform.TransformerFactory;
+import javax.xml.transform.sax.SAXSource;
+import javax.xml.transform.stream.StreamResult;
+
+import org.xml.sax.Attributes;
+import org.xml.sax.ContentHandler;
+import org.xml.sax.DTDHandler;
+import org.xml.sax.EntityResolver;
+import org.xml.sax.ErrorHandler;
+import org.xml.sax.InputSource;
+import org.xml.sax.SAXException;
+import org.xml.sax.SAXNotRecognizedException;
+import org.xml.sax.SAXNotSupportedException;
+import org.xml.sax.XMLReader;
+import org.xml.sax.helpers.AttributesImpl;
+
+import com.gemstone.gemfire.admin.AdminDistributedSystem;
+import com.gemstone.gemfire.admin.AdminException;
+import com.gemstone.gemfire.admin.CacheServer;
+import com.gemstone.gemfire.admin.CacheServerConfig;
+import com.gemstone.gemfire.admin.DistributedSystemConfig;
+import com.gemstone.gemfire.admin.DistributionLocator;
+import com.gemstone.gemfire.admin.DistributionLocatorConfig;
+import com.gemstone.gemfire.admin.ManagedEntityConfig;
 import com.gemstone.gemfire.internal.Assert;
 import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
+import com.gemstone.gemfire.management.internal.SSLUtil;
 
-import javax.xml.transform.*; 
-//import javax.xml.transform.dom.DOMSource; 
-import javax.xml.transform.sax.SAXSource; 
-import javax.xml.transform.stream.StreamResult;  
-import org.xml.sax.*;
+//import javax.xml.transform.dom.DOMSource;
 //import org.xml.sax.ext.*;
-import org.xml.sax.helpers.AttributesImpl; 
-import java.io.*;
-import java.util.*;
 
 /**
  * Generates XML data that represents the managed entities in an
  * <code>AdminDistributedSystem</code>.  This class is used mainly for
  * testing.
- *
  * @since GemFire 4.0
  */
-public class ManagedEntityConfigXmlGenerator
-  extends ManagedEntityConfigXml implements XMLReader {
+public class ManagedEntityConfigXmlGenerator extends ManagedEntityConfigXml implements XMLReader {
 
-  /** An empty <code>Attributes</code> */
+  /**
+   * An empty <code>Attributes</code>
+   */
   private static Attributes EMPTY = new AttributesImpl();
 
   /////////////////////////  Instance Fields  ////////////////////////
 
-  /** The <code>AdminDistributedSystem</code> for which we are
-   * generating XML */
+  /**
+   * The <code>AdminDistributedSystem</code> for which we are
+   * generating XML
+   */
   private AdminDistributedSystem system;
 
-  /** The content handler to which SAX events are generated */
+  /**
+   * The content handler to which SAX events are generated
+   */
   private ContentHandler handler;
 
   /////////////////////////  Static Methods  ////////////////////////
@@ -58,8 +88,7 @@ public class ManagedEntityConfigXmlGenerator
    * Generates an XML representation of all of the managed entities in
    * the given <code>AdminDistributedSystem</code>.
    */
-  public static void generate(AdminDistributedSystem system,
-                              PrintWriter pw) {
+  public static void generate(AdminDistributedSystem system, PrintWriter pw) {
     (new ManagedEntityConfigXmlGenerator(system)).generate(pw);
   }
 
@@ -67,10 +96,9 @@ public class ManagedEntityConfigXmlGenerator
 
   /**
    * Creates a new generator for the given
-   * <code>AdminDistributedSystem</code>. 
+   * <code>AdminDistributedSystem</code>.
    */
-  private ManagedEntityConfigXmlGenerator(AdminDistributedSystem
-                                          system) {
+  private ManagedEntityConfigXmlGenerator(AdminDistributedSystem system) {
     this.system = system;
   }
 
@@ -115,8 +143,7 @@ public class ManagedEntityConfigXmlGenerator
 
     AttributesImpl atts = new AttributesImpl();
 
-    atts.addAttribute("", "", ID, "",
-                      String.valueOf(this.system.getConfig().getSystemId()));
+    atts.addAttribute("", "", ID, "", String.valueOf(this.system.getConfig().getSystemId()));
 
     handler.startElement("", DISTRIBUTED_SYSTEM, DISTRIBUTED_SYSTEM, atts);
 
@@ -143,8 +170,7 @@ public class ManagedEntityConfigXmlGenerator
 
     handler.startElement("", REMOTE_COMMAND, REMOTE_COMMAND, EMPTY);
 
-    handler.characters(remoteCommand.toCharArray(), 0,
-                       remoteCommand.length());
+    handler.characters(remoteCommand.toCharArray(), 0, remoteCommand.length());
 
     handler.endElement("", REMOTE_COMMAND, REMOTE_COMMAND);
   }
@@ -156,7 +182,7 @@ public class ManagedEntityConfigXmlGenerator
     handler.startElement("", LOCATORS, LOCATORS, EMPTY);
 
     generateLocators();
-    
+
     handler.endElement("", LOCATORS, LOCATORS);
   }
 
@@ -164,8 +190,7 @@ public class ManagedEntityConfigXmlGenerator
    * Generates XML for the distributed system's locators
    */
   private void generateLocators() throws SAXException {
-    DistributionLocator[] locators =
-      this.system.getDistributionLocators();
+    DistributionLocator[] locators = this.system.getDistributionLocators();
     for (int i = 0; i < locators.length; i++) {
       generateLocator(locators[i].getConfig());
     }
@@ -174,12 +199,10 @@ public class ManagedEntityConfigXmlGenerator
   /**
    * Generates XML for a locator
    */
-  private void generateLocator(DistributionLocatorConfig config) 
-    throws SAXException {
-    
+  private void generateLocator(DistributionLocatorConfig config) throws SAXException {
+
     AttributesImpl atts = new AttributesImpl();
-    atts.addAttribute("", "", PORT, "",
-                      String.valueOf(config.getPort()));
+    atts.addAttribute("", "", PORT, "", String.valueOf(config.getPort()));
 
     handler.startElement("", LOCATOR, LOCATOR, atts);
 
@@ -191,8 +214,7 @@ public class ManagedEntityConfigXmlGenerator
   /**
    * Generates XML for attributes common to all managed entities.
    */
-  private void generateEntityConfig(ManagedEntityConfig config) 
-    throws SAXException {
+  private void generateEntityConfig(ManagedEntityConfig config) throws SAXException {
 
     String host = config.getHost();
     if (host != null) {
@@ -204,24 +226,21 @@ public class ManagedEntityConfigXmlGenerator
     String remoteCommand = config.getRemoteCommand();
     if (remoteCommand != null) {
       handler.startElement("", REMOTE_COMMAND, REMOTE_COMMAND, EMPTY);
-      handler.characters(remoteCommand.toCharArray(), 0,
-                         remoteCommand.length());
+      handler.characters(remoteCommand.toCharArray(), 0, remoteCommand.length());
       handler.endElement("", REMOTE_COMMAND, REMOTE_COMMAND);
     }
 
     String workingDirectory = config.getWorkingDirectory();
     if (workingDirectory != null) {
       handler.startElement("", WORKING_DIRECTORY, WORKING_DIRECTORY, EMPTY);
-      handler.characters(workingDirectory.toCharArray(), 0,
-                         workingDirectory.length());
+      handler.characters(workingDirectory.toCharArray(), 0, workingDirectory.length());
       handler.endElement("", WORKING_DIRECTORY, WORKING_DIRECTORY);
     }
 
     String productDirectory = config.getProductDirectory();
     if (productDirectory != null) {
       handler.startElement("", PRODUCT_DIRECTORY, PRODUCT_DIRECTORY, EMPTY);
-      handler.characters(productDirectory.toCharArray(), 0,
-                         productDirectory.length());
+      handler.characters(productDirectory.toCharArray(), 0, productDirectory.length());
       handler.endElement("", PRODUCT_DIRECTORY, PRODUCT_DIRECTORY);
     }
   }
@@ -239,34 +258,30 @@ public class ManagedEntityConfigXmlGenerator
     }
 
     AttributesImpl atts = new AttributesImpl();
-    atts.addAttribute("", "", AUTHENTICATION_REQUIRED, "",
-                      String.valueOf(config.isSSLAuthenticationRequired()));
+    atts.addAttribute("", "", AUTHENTICATION_REQUIRED, "", String.valueOf(config.isSSLAuthenticationRequired()));
 
     handler.startElement("", SSL, SSL, atts);
 
-    String protocols = config.getSSLProtocols();
+    String protocols = SSLUtil.arrayToSpaceDelimitedString(config.getSSLProtocols());
     if (protocols != null) {
       handler.startElement("", PROTOCOLS, PROTOCOLS, EMPTY);
-      handler.characters(protocols.toCharArray(), 0,
-                         protocols.length());
+      handler.characters(protocols.toCharArray(), 0, protocols.length());
       handler.endElement("", PROTOCOLS, PROTOCOLS);
     }
 
-    String ciphers = config.getSSLCiphers();
+    String ciphers = SSLUtil.arrayToSpaceDelimitedString(config.getSSLCiphers());
     if (ciphers != null) {
       handler.startElement("", CIPHERS, CIPHERS, EMPTY);
-      handler.characters(ciphers.toCharArray(), 0,
-                         ciphers.length());
+      handler.characters(ciphers.toCharArray(), 0, ciphers.length());
       handler.endElement("", CIPHERS, CIPHERS);
     }
 
     Properties sslProps = config.getSSLProperties();
-    for (Iterator iter = sslProps.entrySet().iterator();
-         iter.hasNext(); ) {
+    for (Iterator iter = sslProps.entrySet().iterator(); iter.hasNext(); ) {
       Map.Entry entry = (Map.Entry) iter.next();
       String key = (String) entry.getKey();
       String value = (String) entry.getValue();
-      
+
       handler.startElement("", PROPERTY, PROPERTY, EMPTY);
 
       handler.startElement("", KEY, KEY, EMPTY);
@@ -287,8 +302,7 @@ public class ManagedEntityConfigXmlGenerator
    * Generates an XML representation of the
    * <code>CacheServer</code>s in the distributed system.
    */
-  private void generateCacheServers()
-    throws SAXException, AdminException {
+  private void generateCacheServers() throws SAXException, AdminException {
 
     CacheServer[] servers = this.system.getCacheServers();
     for (int i = 0; i < servers.length; i++) {
@@ -300,8 +314,7 @@ public class ManagedEntityConfigXmlGenerator
    * Generates an XML representation of a
    * <code>CacheServerConfig</code>.
    */
-  private void generateCacheServer(CacheServerConfig config) 
-    throws SAXException {
+  private void generateCacheServer(CacheServerConfig config) throws SAXException {
 
     handler.startElement("", CACHE_SERVER, CACHE_SERVER, EMPTY);
 
@@ -310,8 +323,7 @@ public class ManagedEntityConfigXmlGenerator
     String classpath = config.getClassPath();
     if (classpath != null) {
       handler.startElement("", CLASSPATH, CLASSPATH, EMPTY);
-      handler.characters(classpath.toCharArray(), 0,
-                         classpath.length());
+      handler.characters(classpath.toCharArray(), 0, classpath.length());
       handler.endElement("", CLASSPATH, CLASSPATH);
     }
 
@@ -323,11 +335,11 @@ public class ManagedEntityConfigXmlGenerator
    */
   public void setContentHandler(ContentHandler handler) {
     this.handler = handler;
-  }  
+  }
 
   public ContentHandler getContentHandler() {
     return this.handler;
-  }  
+  }
 
   public ErrorHandler getErrorHandler() {
     return this;
@@ -335,24 +347,20 @@ public class ManagedEntityConfigXmlGenerator
 
   //////////  Inherited methods that don't do anything  //////////
 
-  public boolean getFeature(String name)
-    throws SAXNotRecognizedException, SAXNotSupportedException {
+  public boolean getFeature(String name) throws SAXNotRecognizedException, SAXNotSupportedException {
     return false;
   }
 
-  public void setFeature(String name, boolean value)
-    throws SAXNotRecognizedException, SAXNotSupportedException {
+  public void setFeature(String name, boolean value) throws SAXNotRecognizedException, SAXNotSupportedException {
 
   }
 
-  public Object getProperty(String name)
-    throws SAXNotRecognizedException, SAXNotSupportedException {
+  public Object getProperty(String name) throws SAXNotRecognizedException, SAXNotSupportedException {
 
     return null;
   }
 
-  public void setProperty(String name, Object value)
-    throws SAXNotRecognizedException, SAXNotSupportedException {
+  public void setProperty(String name, Object value) throws SAXNotRecognizedException, SAXNotSupportedException {
 
   }
 
@@ -363,7 +371,7 @@ public class ManagedEntityConfigXmlGenerator
   public EntityResolver getEntityResolver() {
     return this;
   }
-  
+
   public void setDTDHandler(DTDHandler handler) {
 
   }
@@ -376,8 +384,7 @@ public class ManagedEntityConfigXmlGenerator
 
   }
 
-  public void parse(String systemId)
-    throws IOException, SAXException {
+  public void parse(String systemId) throws IOException, SAXException {
 
   }
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/80731e54/geode-core/src/main/java/com/gemstone/gemfire/admin/internal/ManagedEntityConfigXmlParser.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/admin/internal/ManagedEntityConfigXmlParser.java b/geode-core/src/main/java/com/gemstone/gemfire/admin/internal/ManagedEntityConfigXmlParser.java
index 58e90e9..9ea26c9 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/admin/internal/ManagedEntityConfigXmlParser.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/admin/internal/ManagedEntityConfigXmlParser.java
@@ -16,30 +16,43 @@
  */
 package com.gemstone.gemfire.admin.internal;
 
-import com.gemstone.gemfire.admin.*;
-import com.gemstone.gemfire.internal.Assert;
-import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
-
+import java.io.InputStream;
+import java.util.Stack;
 import javax.xml.parsers.SAXParser;
 import javax.xml.parsers.SAXParserFactory;
-import org.xml.sax.*;
+
+import org.xml.sax.Attributes;
+import org.xml.sax.ContentHandler;
+import org.xml.sax.InputSource;
+import org.xml.sax.Locator;
+import org.xml.sax.SAXException;
+import org.xml.sax.SAXParseException;
 import org.xml.sax.helpers.DefaultHandler;
-import java.io.*;
-import java.util.*;
+
+import com.gemstone.gemfire.admin.AdminXmlException;
+import com.gemstone.gemfire.admin.CacheServerConfig;
+import com.gemstone.gemfire.admin.DistributedSystemConfig;
+import com.gemstone.gemfire.admin.DistributionLocatorConfig;
+import com.gemstone.gemfire.admin.ManagedEntityConfig;
+import com.gemstone.gemfire.internal.Assert;
+import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
+import com.gemstone.gemfire.management.internal.SSLUtil;
 
 /**
  * Parses an XML file and configures a {@link DistributedSystemConfig}
  * from it.
- *
  * @since GemFire 4.0
  */
-public class ManagedEntityConfigXmlParser
-  extends ManagedEntityConfigXml implements ContentHandler {
+public class ManagedEntityConfigXmlParser extends ManagedEntityConfigXml implements ContentHandler {
 
-  /** The <code>DistributedSystemConfig</code> to be configured */
+  /**
+   * The <code>DistributedSystemConfig</code> to be configured
+   */
   private DistributedSystemConfig config;
 
-  /** The stack of intermediate values used while parsing */
+  /**
+   * The stack of intermediate values used while parsing
+   */
   private Stack stack = new Stack();
 
   //////////////////////  Static Methods  //////////////////////
@@ -47,14 +60,10 @@ public class ManagedEntityConfigXmlParser
   /**
    * Parses XML data and from it configures a
    * <code>DistributedSystemConfig</code>.
-   *
-   * @throws AdminXmlException
-   *         If an error is encountered while parsing the XML
+   * @throws AdminXmlException If an error is encountered while parsing the XML
    */
-  public static void parse(InputStream is,
-                           DistributedSystemConfig config) {
-    ManagedEntityConfigXmlParser handler =
-      new ManagedEntityConfigXmlParser();
+  public static void parse(InputStream is, DistributedSystemConfig config) {
+    ManagedEntityConfigXmlParser handler = new ManagedEntityConfigXmlParser();
     handler.config = config;
 
     try {
@@ -87,9 +96,7 @@ public class ManagedEntityConfigXmlParser
 
   /**
    * Helper method for parsing an integer
-   *
-   * @throws com.gemstone.gemfire.cache.CacheXmlException
-   *         If <code>s</code> is a malformed integer
+   * @throws com.gemstone.gemfire.cache.CacheXmlException If <code>s</code> is a malformed integer
    */
   private static int parseInt(String s) {
     try {
@@ -102,13 +109,11 @@ public class ManagedEntityConfigXmlParser
 
   //////////////////////  Instance Methods  //////////////////////
 
-//    if (this.system.isMcastEnabled()) {
-//      generateMulticast();
-//    }
+  //    if (this.system.isMcastEnabled()) {
+  //      generateMulticast();
+  //    }
 
-  public void startElement(String namespaceURI, String localName,
-                           String qName, Attributes atts)
-    throws SAXException {
+  public void startElement(String namespaceURI, String localName, String qName, Attributes atts) throws SAXException {
 
     if (qName.equals(DISTRIBUTED_SYSTEM)) {
       startDistributedSystem(atts);
@@ -118,7 +123,7 @@ public class ManagedEntityConfigXmlParser
 
     } else if (qName.equals(LOCATORS)) {
       startLocators(atts);
-      
+
     } else if (qName.equals(MULTICAST)) {
       startMulticast(atts);
 
@@ -163,9 +168,7 @@ public class ManagedEntityConfigXmlParser
     }
   }
 
-  public void endElement(String namespaceURI, String localName,
-                         String qName)
-    throws SAXException {
+  public void endElement(String namespaceURI, String localName, String qName) throws SAXException {
 
     if (qName.equals(DISTRIBUTED_SYSTEM)) {
       endDistributedSystem();
@@ -231,7 +234,7 @@ public class ManagedEntityConfigXmlParser
     if (id != null) {
       this.config.setSystemId(id);
     }
-    
+
     String disable_tcp = atts.getValue(DISABLE_TCP);
     if (disable_tcp != null) {
       this.config.setDisableTcp(DISABLE_TCP.equalsIgnoreCase("true"));
@@ -244,7 +247,7 @@ public class ManagedEntityConfigXmlParser
    * When a <code>distributed-system</code> element is finished
    */
   private void endDistributedSystem() {
-    
+
   }
 
   /**
@@ -253,8 +256,7 @@ public class ManagedEntityConfigXmlParser
    * and set its multicast config appropriately.
    */
   private void startMulticast(Attributes atts) {
-    DistributedSystemConfig config =
-      (DistributedSystemConfig) stack.peek();
+    DistributedSystemConfig config = (DistributedSystemConfig) stack.peek();
 
     String port = atts.getValue(PORT);
     config.setMcastPort(parseInt(port));
@@ -296,8 +298,7 @@ public class ManagedEntityConfigXmlParser
       ((ManagedEntityConfig) top).setRemoteCommand(remoteCommand);
 
     } else {
-      String s = "Did not expect a " + top.getClass().getName() +
-        " on top of the stack";
+      String s = "Did not expect a " + top.getClass().getName() + " on top of the stack";
       Assert.assertTrue(false, s);
     }
   }
@@ -313,13 +314,11 @@ public class ManagedEntityConfigXmlParser
   private void startLocator(Attributes atts) {
     String port = atts.getValue(PORT);
 
-    DistributedSystemConfig system =
-      (DistributedSystemConfig) stack.peek();
+    DistributedSystemConfig system = (DistributedSystemConfig) stack.peek();
     system.setMcastPort(0);
 
-    DistributionLocatorConfig config =
-      system.createDistributionLocatorConfig();
-    
+    DistributionLocatorConfig config = system.createDistributionLocatorConfig();
+
     config.setPort(parseInt(port));
 
     stack.push(config);
@@ -365,12 +364,10 @@ public class ManagedEntityConfigXmlParser
   }
 
   private void startSSL(Attributes atts) {
-    DistributedSystemConfig config =
-      (DistributedSystemConfig) stack.peek();
+    DistributedSystemConfig config = (DistributedSystemConfig) stack.peek();
     config.setSSLEnabled(true);
 
-    String authenticationRequired =
-      atts.getValue(AUTHENTICATION_REQUIRED);
+    String authenticationRequired = atts.getValue(AUTHENTICATION_REQUIRED);
     config.setSSLAuthenticationRequired(Boolean.valueOf(authenticationRequired).booleanValue());
   }
 
@@ -384,9 +381,8 @@ public class ManagedEntityConfigXmlParser
 
   private void endProtocols() {
     String protocols = popString();
-    DistributedSystemConfig config =
-      (DistributedSystemConfig) stack.peek();
-    config.setSSLProtocols(protocols);
+    DistributedSystemConfig config = (DistributedSystemConfig) stack.peek();
+    config.setSSLProtocols(SSLUtil.stringToArray(protocols));
   }
 
   private void startCiphers(Attributes atts) {
@@ -395,9 +391,8 @@ public class ManagedEntityConfigXmlParser
 
   private void endCiphers() {
     String ciphers = popString();
-    DistributedSystemConfig config =
-      (DistributedSystemConfig) stack.peek();
-    config.setSSLCiphers(ciphers);
+    DistributedSystemConfig config = (DistributedSystemConfig) stack.peek();
+    config.setSSLCiphers(SSLUtil.stringToArray(ciphers));
   }
 
   private void startProperty(Attributes atts) {
@@ -407,8 +402,7 @@ public class ManagedEntityConfigXmlParser
   private void endProperty() {
     String value = popString();
     String key = popString();
-    DistributedSystemConfig config =
-      (DistributedSystemConfig) stack.peek();
+    DistributedSystemConfig config = (DistributedSystemConfig) stack.peek();
     config.addSSLProperty(key, value);
   }
 
@@ -431,15 +425,14 @@ public class ManagedEntityConfigXmlParser
   }
 
   private void startCacheServer(Attributes atts) {
-    DistributedSystemConfig config =
-      (DistributedSystemConfig) stack.peek();
-    CacheServerConfig server =
-      config.createCacheServerConfig();
+    DistributedSystemConfig config = (DistributedSystemConfig) stack.peek();
+    CacheServerConfig server = config.createCacheServerConfig();
     stack.push(server);
   }
 
   private void endCacheServer() {
-    /* CacheServerConfig server = (CacheServerConfig) */ stack.pop();
+    /* CacheServerConfig server = (CacheServerConfig) */
+    stack.pop();
   }
 
   private void startClassPath(Attributes atts) {
@@ -473,8 +466,7 @@ public class ManagedEntityConfigXmlParser
    * into one big string by using a <code>StringBuffer</code>.  See
    * bug 32122.
    */
-  public void characters(char[] ch, int start, int length)
-    throws SAXException {
+  public void characters(char[] ch, int start, int length) throws SAXException {
 
     Object top = stack.peek();
 
@@ -492,25 +484,29 @@ public class ManagedEntityConfigXmlParser
 
   //////////  Inherited methods that don't do anything  //////////
 
-  public void setDocumentLocator(Locator locator) { }
+  public void setDocumentLocator(Locator locator) {
+  }
 
-  public void startDocument() throws SAXException { }
+  public void startDocument() throws SAXException {
+  }
 
-  public void endDocument() throws SAXException { }
+  public void endDocument() throws SAXException {
+  }
 
-  public void startPrefixMapping(String prefix, String uri) 
-    throws SAXException { }
+  public void startPrefixMapping(String prefix, String uri) throws SAXException {
+  }
 
-  public void endPrefixMapping(String prefix)
-    throws SAXException { }
+  public void endPrefixMapping(String prefix) throws SAXException {
+  }
 
-  public void ignorableWhitespace(char[] ch, int start, int length)
-    throws SAXException { }
+  public void ignorableWhitespace(char[] ch, int start, int length) throws SAXException {
+  }
 
-  public void processingInstruction(String target, String data)
-    throws SAXException { }
+  public void processingInstruction(String target, String data) throws SAXException {
+  }
 
-  public void skippedEntity(String name) throws SAXException { }
+  public void skippedEntity(String name) throws SAXException {
+  }
 
   ///////////////////////  Inner Classes  ///////////////////////
 
@@ -521,8 +517,11 @@ public class ManagedEntityConfigXmlParser
    * <B>is not</B> a <code>DefaultHandler</code>.
    */
   static class DefaultHandlerDelegate extends DefaultHandler {
-    /** The <code>ManagedEntityConfigXmlParser</code> that does the
-     * real work */ 
+
+    /**
+     * The <code>ManagedEntityConfigXmlParser</code> that does the
+     * real work
+     */
     private ManagedEntityConfigXmlParser handler;
 
     /**
@@ -535,9 +534,7 @@ public class ManagedEntityConfigXmlParser
     }
 
     @Override
-    public InputSource resolveEntity(String publicId, 
-                                     String systemId)
-      throws SAXException {
+    public InputSource resolveEntity(String publicId, String systemId) throws SAXException {
       return handler.resolveEntity(publicId, systemId);
     }
 
@@ -557,8 +554,7 @@ public class ManagedEntityConfigXmlParser
     }
 
     @Override
-    public void startPrefixMapping(String prefix, String uri)
-      throws SAXException {
+    public void startPrefixMapping(String prefix, String uri) throws SAXException {
       handler.startPrefixMapping(prefix, uri);
     }
 
@@ -568,33 +564,27 @@ public class ManagedEntityConfigXmlParser
     }
 
     @Override
-    public void startElement(String uri, String localName,
-                             String qName, Attributes attributes)
-      throws SAXException {
+    public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException {
       handler.startElement(uri, localName, qName, attributes);
     }
 
     @Override
-    public void endElement(String uri, String localName, String qName)
-      throws SAXException {
+    public void endElement(String uri, String localName, String qName) throws SAXException {
       handler.endElement(uri, localName, qName);
     }
 
     @Override
-    public void characters(char[] ch, int start, int length)
-      throws SAXException {
+    public void characters(char[] ch, int start, int length) throws SAXException {
       handler.characters(ch, start, length);
     }
 
     @Override
-    public void ignorableWhitespace(char[] ch, int start, int length)
-      throws SAXException {
+    public void ignorableWhitespace(char[] ch, int start, int length) throws SAXException {
       handler.ignorableWhitespace(ch, start, length);
     }
 
     @Override
-    public void processingInstruction(String target, String data)
-      throws SAXException {
+    public void processingInstruction(String target, String data) throws SAXException {
       handler.processingInstruction(target, data);
     }
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/80731e54/geode-core/src/main/java/com/gemstone/gemfire/admin/jmx/internal/AdminDistributedSystemJmxImpl.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/admin/jmx/internal/AdminDistributedSystemJmxImpl.java b/geode-core/src/main/java/com/gemstone/gemfire/admin/jmx/internal/AdminDistributedSystemJmxImpl.java
index fa5a1ea..d920265 100755
--- a/geode-core/src/main/java/com/gemstone/gemfire/admin/jmx/internal/AdminDistributedSystemJmxImpl.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/admin/jmx/internal/AdminDistributedSystemJmxImpl.java
@@ -1191,19 +1191,19 @@ public class AdminDistributedSystemJmxImpl
     this.getConfig().setSSLEnabled(enabled);
   }
 
-  public String getSSLProtocols() {
+  public String[] getSSLProtocols() {
     return this.getConfig().getSSLProtocols();
   }
 
-  public void setSSLProtocols(String protocols) {
+  public void setSSLProtocols(final String[] protocols) {
     this.getConfig().setSSLProtocols(protocols);
   }
 
-  public String getSSLCiphers() {
+  public String[] getSSLCiphers() {
     return this.getConfig().getSSLCiphers();
   }
 
-  public void setSSLCiphers(String ciphers) {
+  public void setSSLCiphers(final String[] ciphers) {
     this.getConfig().setSSLCiphers(ciphers);
   }
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/80731e54/geode-core/src/main/java/com/gemstone/gemfire/admin/jmx/internal/AgentConfigImpl.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/admin/jmx/internal/AgentConfigImpl.java b/geode-core/src/main/java/com/gemstone/gemfire/admin/jmx/internal/AgentConfigImpl.java
index 6aa8944..72dd46e 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/admin/jmx/internal/AgentConfigImpl.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/admin/jmx/internal/AgentConfigImpl.java
@@ -42,6 +42,7 @@ import com.gemstone.gemfire.admin.jmx.AgentConfig;
 import com.gemstone.gemfire.internal.ClassPathLoader;
 import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
 import com.gemstone.gemfire.internal.util.IOUtils;
+import com.gemstone.gemfire.management.internal.SSLUtil;
 
 /**
  * Provides the JMX Agent configuration properties.
@@ -936,8 +937,8 @@ public class AgentConfigImpl extends DistributedSystemConfigImpl implements Agen
     this.httpAuthPassword = validateNonEmptyString(props.getProperty(HTTP_AUTHENTICATION_PASSWORD_NAME), DEFAULT_HTTP_AUTHENTICATION_PASSWORD);
 
     this.sslEnabled = validateBoolean(props.getProperty(CLUSTER_SSL_ENABLED), DEFAULT_SSL_ENABLED);
-    this.sslProtocols = validateNonEmptyString(props.getProperty(CLUSTER_SSL_PROTOCOLS), DEFAULT_SSL_PROTOCOLS);
-    this.sslCiphers = validateNonEmptyString(props.getProperty(CLUSTER_SSL_CIPHERS), DEFAULT_SSL_CIPHERS);
+    this.sslProtocols = validateNonEmptyStringArray(props.getProperty(CLUSTER_SSL_PROTOCOLS), DEFAULT_SSL_PROTOCOLS);
+    this.sslCiphers = validateNonEmptyStringArray(props.getProperty(CLUSTER_SSL_CIPHERS), DEFAULT_SSL_CIPHERS);
     this.sslAuthenticationRequired = validateBoolean(props.getProperty(CLUSTER_SSL_REQUIRE_AUTHENTICATION), DEFAULT_SSL_REQUIRE_AUTHENTICATION);
     this.sslProperties = new Properties();
     for (int i = 0; true; i++) {
@@ -996,6 +997,10 @@ public class AgentConfigImpl extends DistributedSystemConfigImpl implements Agen
     }
   }
 
+  private String[] validateNonEmptyStringArray(final String property, final String defaultSslProtocols) {
+    return isEmpty(property) ? SSLUtil.stringToArray(defaultSslProtocols) : SSLUtil.stringToArray(property);
+  }
+
   /**
    * Filter all agent configuration attributes out of the given <code>Properties</code> object.
    * <p/>
@@ -1676,8 +1681,8 @@ public class AgentConfigImpl extends DistributedSystemConfigImpl implements Agen
   //   SSL support...
   // -------------------------------------------------------------------------
   private boolean sslEnabled = DEFAULT_SSL_ENABLED;
-  private String sslProtocols = DEFAULT_SSL_PROTOCOLS;
-  private String sslCiphers = DEFAULT_SSL_CIPHERS;
+  private String[] sslProtocols = new String[] { DEFAULT_SSL_PROTOCOLS };
+  private String[] sslCiphers = new String[] { DEFAULT_SSL_CIPHERS };
   private boolean sslAuthenticationRequired = DEFAULT_SSL_REQUIRE_AUTHENTICATION;
   private Properties sslProperties = new Properties();
 
@@ -1693,23 +1698,23 @@ public class AgentConfigImpl extends DistributedSystemConfigImpl implements Agen
   }
 
   @Override
-  public String getSSLProtocols() {
+  public String[] getSSLProtocols() {
     return this.sslProtocols;
   }
 
   @Override
-  public void setSSLProtocols(String protocols) {
+  public void setSSLProtocols(String[] protocols) {
     this.sslProtocols = protocols;
     configChanged();
   }
 
   @Override
-  public String getSSLCiphers() {
+  public String[] getSSLCiphers() {
     return this.sslCiphers;
   }
 
   @Override
-  public void setSSLCiphers(String ciphers) {
+  public void setSSLCiphers(String[] ciphers) {
     this.sslCiphers = ciphers;
     configChanged();
   }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/80731e54/geode-core/src/main/java/com/gemstone/gemfire/admin/jmx/internal/AgentImpl.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/admin/jmx/internal/AgentImpl.java b/geode-core/src/main/java/com/gemstone/gemfire/admin/jmx/internal/AgentImpl.java
index 7d880ad..7000aea 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/admin/jmx/internal/AgentImpl.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/admin/jmx/internal/AgentImpl.java
@@ -1422,16 +1422,16 @@ implements com.gemstone.gemfire.admin.jmx.Agent,
   public void setSSLEnabled(boolean enabled) {
     this.agentConfig.setSSLEnabled(enabled);
   }
-  public String getSSLProtocols() {
+  public String[] getSSLProtocols() {
     return this.agentConfig.getSSLProtocols();
   }
-  public void setSSLProtocols(String protocols) {
+  public void setSSLProtocols(String[] protocols) {
     this.agentConfig.setSSLProtocols(protocols);
   }
-  public String getSSLCiphers() {
+  public String[] getSSLCiphers() {
     return this.agentConfig.getSSLCiphers();
   }
-  public void setSSLCiphers(String ciphers) {
+  public void setSSLCiphers(String[] ciphers) {
     this.agentConfig.setSSLCiphers(ciphers);
   }
   public boolean isSSLAuthenticationRequired() {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/80731e54/geode-core/src/main/java/com/gemstone/gemfire/distributed/ConfigurationProperties.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/distributed/ConfigurationProperties.java b/geode-core/src/main/java/com/gemstone/gemfire/distributed/ConfigurationProperties.java
index 34953a0..049cbd2 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/distributed/ConfigurationProperties.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/distributed/ConfigurationProperties.java
@@ -1710,7 +1710,7 @@ public interface ConfigurationProperties {
   /**
    * The static String definition of the <i>"cluster-ssl-protocols"</i> property
    * <a name="ssl-protocols"/a></p>
-   * <U>Description</U>: A space separated list of the SSL protocols to
+   * <U>Description</U>: A comma separated list of the SSL protocols to
    * enable. Those listed must be supported by the available providers.
    * </p>
    * <U>Default</U>: "any"</p>


[46/50] [abbrv] incubator-geode git commit: Merge branch 'develop' into feature/GEODE-420

Posted by ud...@apache.org.
Merge branch 'develop' into feature/GEODE-420


Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/9df6715e
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/9df6715e
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/9df6715e

Branch: refs/heads/develop
Commit: 9df6715ef8c1225ffe091475a132363a0e2f6b2e
Parents: 8ff5e7a 71c863b
Author: Udo Kohlmeyer <uk...@pivotal.io>
Authored: Tue Sep 13 05:30:23 2016 +1000
Committer: Udo Kohlmeyer <uk...@pivotal.io>
Committed: Tue Sep 13 05:30:23 2016 +1000

----------------------------------------------------------------------
 geode-assembly/src/main/dist/bin/gfsh           |  7 --
 .../gemfire/distributed/DistributedSystem.java  |  2 +-
 .../gemfire/internal/GemFireVersion.java        |  2 +-
 .../internal/GemFireVersionJUnitTest.java       | 10 +++
 .../internal/cache/DiskRegionJUnitTest.java     |  4 +-
 ...tentColocatedPartitionedRegionDUnitTest.java | 44 +++++++++---
 .../asyncqueue/AsyncEventListenerDUnitTest.java | 74 +++++++-------------
 .../test/dunit/standalone/ProcessManager.java   |  1 +
 .../project/Dependencies.scala                  |  2 +-
 gradle/ide.gradle                               | 11 +--
 10 files changed, 84 insertions(+), 73 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/9df6715e/geode-core/src/main/java/com/gemstone/gemfire/internal/GemFireVersion.java
----------------------------------------------------------------------


[09/50] [abbrv] incubator-geode git commit: GEODE-1792: Revert: Changed protocols and ciphers to be comma separated Make ssl-ciphers and ssl-protocols comma separated properties. The legacy *-ssl-ciphers and *-ssl-protocols still use space separated.

Posted by ud...@apache.org.
GEODE-1792: Revert:  Changed protocols and ciphers to be comma separated
Make ssl-ciphers and ssl-protocols comma separated properties.
The legacy *-ssl-ciphers and *-ssl-protocols still use space separated.


Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/6ffa6523
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/6ffa6523
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/6ffa6523

Branch: refs/heads/develop
Commit: 6ffa65231a97ef187fdd220f273942f249a0d888
Parents: 80731e5
Author: Udo Kohlmeyer <uk...@pivotal.io>
Authored: Fri Aug 19 04:24:10 2016 +1000
Committer: Udo Kohlmeyer <uk...@pivotal.io>
Committed: Fri Aug 19 04:24:10 2016 +1000

----------------------------------------------------------------------
 .../gemfire/admin/DistributedSystemConfig.java  |   8 +-
 .../internal/DistributedSystemConfigImpl.java   | 211 +++++++++-------
 .../EnabledManagedEntityController.java         | 247 ++++++++++---------
 .../ManagedEntityConfigXmlGenerator.java        | 149 ++++++-----
 .../internal/ManagedEntityConfigXmlParser.java  | 174 +++++++------
 .../internal/AdminDistributedSystemJmxImpl.java |   8 +-
 .../admin/jmx/internal/AgentConfigImpl.java     |  21 +-
 .../gemfire/admin/jmx/internal/AgentImpl.java   |   8 +-
 .../distributed/ConfigurationProperties.java    |   2 +-
 .../internal/DistributionConfig.java            |  84 +++----
 .../internal/DistributionConfigImpl.java        | 103 ++++----
 .../gemfire/internal/admin/SSLConfig.java       |  25 +-
 .../internal/net/SSLConfigurationFactory.java   |   5 +-
 .../gemfire/internal/net/SocketCreator.java     |  10 +-
 .../gemfire/management/GemFireProperties.java   |  80 +++---
 .../management/internal/JettyHelper.java        |   7 +-
 .../gemfire/management/internal/SSLUtil.java    |  37 +--
 .../internal/cli/commands/ShellCommands.java    |   2 +-
 .../internal/DistributionConfigJUnitTest.java   |  65 +----
 .../net/SSLConfigurationFactoryTest.java        |   5 +-
 20 files changed, 617 insertions(+), 634 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/6ffa6523/geode-core/src/main/java/com/gemstone/gemfire/admin/DistributedSystemConfig.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/admin/DistributedSystemConfig.java b/geode-core/src/main/java/com/gemstone/gemfire/admin/DistributedSystemConfig.java
index 89ef390..17600bc 100755
--- a/geode-core/src/main/java/com/gemstone/gemfire/admin/DistributedSystemConfig.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/admin/DistributedSystemConfig.java
@@ -450,16 +450,16 @@ public interface DistributedSystemConfig extends Cloneable {
   public void setSSLEnabled(boolean enabled);
 
   /** Returns the value of the "ssl-protocols" property. */
-  public String[] getSSLProtocols();
+  public String getSSLProtocols();
 
   /** Sets the value of the "ssl-protocols" property. */
-  public void setSSLProtocols(String[] protocols);
+  public void setSSLProtocols(String protocols);
 
   /** Returns the value of the "ssl-ciphers" property. */
-  public String[] getSSLCiphers();
+  public String getSSLCiphers();
 
   /** Sets the value of the "ssl-ciphers" property. */
-  public void setSSLCiphers(String[] ciphers);
+  public void setSSLCiphers(String ciphers);
 
   /** Returns the value of the "ssl-require-authentication" property. */
   public boolean isSSLAuthenticationRequired();

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/6ffa6523/geode-core/src/main/java/com/gemstone/gemfire/admin/internal/DistributedSystemConfigImpl.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/admin/internal/DistributedSystemConfigImpl.java b/geode-core/src/main/java/com/gemstone/gemfire/admin/internal/DistributedSystemConfigImpl.java
index 2198e69..37cd139 100755
--- a/geode-core/src/main/java/com/gemstone/gemfire/admin/internal/DistributedSystemConfigImpl.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/admin/internal/DistributedSystemConfigImpl.java
@@ -16,28 +16,7 @@
  */
 package com.gemstone.gemfire.admin.internal;
 
-import static com.gemstone.gemfire.distributed.ConfigurationProperties.*;
-
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.ArrayList;
-import java.util.Enumeration;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.Properties;
-import java.util.Set;
-import java.util.StringTokenizer;
-
-import org.apache.logging.log4j.Logger;
-
-import com.gemstone.gemfire.admin.AdminXmlException;
-import com.gemstone.gemfire.admin.CacheServerConfig;
-import com.gemstone.gemfire.admin.CacheVmConfig;
-import com.gemstone.gemfire.admin.DistributedSystemConfig;
-import com.gemstone.gemfire.admin.DistributionLocator;
-import com.gemstone.gemfire.admin.DistributionLocatorConfig;
+import com.gemstone.gemfire.admin.*;
 import com.gemstone.gemfire.distributed.internal.DistributionConfig;
 import com.gemstone.gemfire.distributed.internal.DistributionConfigImpl;
 import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
@@ -45,6 +24,15 @@ import com.gemstone.gemfire.internal.logging.InternalLogWriter;
 import com.gemstone.gemfire.internal.logging.LogConfig;
 import com.gemstone.gemfire.internal.logging.LogService;
 import com.gemstone.gemfire.internal.logging.LogWriterImpl;
+import org.apache.logging.log4j.Logger;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.*;
+
+import static com.gemstone.gemfire.distributed.ConfigurationProperties.*;
 
 /**
  * An implementation of the configuration object for an
@@ -55,9 +43,11 @@ import com.gemstone.gemfire.internal.logging.LogWriterImpl;
  * distribution locators) are "passed through" to the
  * <code>AdminDistributedSystem</code> associated with this
  * configuration object.
+ *
  * @since GemFire 3.5
  */
-public class DistributedSystemConfigImpl implements DistributedSystemConfig {
+public class DistributedSystemConfigImpl
+    implements DistributedSystemConfig {
 
   private static final Logger logger = LogService.getLogger();
 
@@ -109,8 +99,8 @@ public class DistributedSystemConfigImpl implements DistributedSystemConfig {
   /**
    * The admin distributed system object that is configured by this
    * config object.
-   * @since GemFire 4.0
-   */
+   *
+   * @since GemFire 4.0 */
   private AdminDistributedSystemImpl system;
 
   /**
@@ -124,14 +114,21 @@ public class DistributedSystemConfigImpl implements DistributedSystemConfig {
    * Filters out all properties that are unique to the admin
    * <code>DistributedSystemConfig</code> that are not present in the
    * internal <code>DistributionConfig</code>.
+   *
    * @since GemFire 4.0
    */
-  private static Properties filterOutAdminProperties(Properties props) {
+  private static Properties
+  filterOutAdminProperties(Properties props) {
 
     Properties props2 = new Properties();
-    for (Enumeration names = props.propertyNames(); names.hasMoreElements(); ) {
+    for (Enumeration names = props.propertyNames();
+         names.hasMoreElements(); ) {
       String name = (String) names.nextElement();
-      if (!(ENTITY_CONFIG_XML_FILE_NAME.equals(name) || REFRESH_INTERVAL_NAME.equals(name) || REMOTE_COMMAND_NAME.equals(name))) {
+      if (!(ENTITY_CONFIG_XML_FILE_NAME.equals(name) ||
+          REFRESH_INTERVAL_NAME.equals(name) ||
+          REMOTE_COMMAND_NAME.equals(name)
+      )
+          ) {
         String value = props.getProperty(name);
         if ((name != null) && (value != null)) {
           props2.setProperty(name, value);
@@ -149,7 +146,8 @@ public class DistributedSystemConfigImpl implements DistributedSystemConfig {
    * the configuration stored in a <code>DistributedSystem</code>'s
    * <code>DistributionConfig</code>.
    */
-  public DistributedSystemConfigImpl(DistributionConfig distConfig, String remoteCommand) {
+  public DistributedSystemConfigImpl(DistributionConfig distConfig,
+      String remoteCommand) {
     if (distConfig == null) {
       throw new IllegalArgumentException(LocalizedStrings.DistributedSystemConfigImpl_DISTRIBUTIONCONFIG_MUST_NOT_BE_NULL.toLocalizedString());
     }
@@ -157,7 +155,8 @@ public class DistributedSystemConfigImpl implements DistributedSystemConfig {
     this.mcastAddress = InetAddressUtil.toString(distConfig.getMcastAddress());
     this.mcastPort = distConfig.getMcastPort();
     this.locators = distConfig.getLocators();
-    this.membershipPortRange = getMembershipPortRangeString(distConfig.getMembershipPortRange());
+    this.membershipPortRange =
+        getMembershipPortRangeString(distConfig.getMembershipPortRange());
 
     this.systemName = distConfig.getName();
 
@@ -167,7 +166,8 @@ public class DistributedSystemConfigImpl implements DistributedSystemConfig {
     this.sslAuthenticationRequired = distConfig.getClusterSSLRequireAuthentication();
 
     this.logFile = distConfig.getLogFile().getPath();
-    this.logLevel = LogWriterImpl.levelToString(distConfig.getLogLevel());
+    this.logLevel =
+        LogWriterImpl.levelToString(distConfig.getLogLevel());
     this.logDiskSpaceLimit = distConfig.getLogDiskSpaceLimit();
     this.logFileSizeLimit = distConfig.getLogFileSizeLimit();
 
@@ -186,6 +186,7 @@ public class DistributedSystemConfigImpl implements DistributedSystemConfig {
 
   /**
    * Zero-argument constructor to be used only by subclasses.
+   *
    * @since GemFire 4.0
    */
   protected DistributedSystemConfigImpl() {
@@ -204,32 +205,39 @@ public class DistributedSystemConfigImpl implements DistributedSystemConfig {
   /**
    * Creates a new <code>DistributedSystemConifgImpl</code> whose configuration
    * is specified by the given <code>Properties</code> object.
-   * @param props The configuration properties specified by the caller
-   * @param ignoreGemFirePropsFile whether to skip loading distributed system properties from
-   * gemfire.properties file
-   *
+   * 
+   * @param props
+   *          The configuration properties specified by the caller
+   * @param ignoreGemFirePropsFile
+   *          whether to skip loading distributed system properties from
+   *          gemfire.properties file
+   *          
    * @since GemFire 6.5
    */
-  protected DistributedSystemConfigImpl(Properties props, boolean ignoreGemFirePropsFile) {
-    this(new DistributionConfigImpl(filterOutAdminProperties(props), ignoreGemFirePropsFile), DEFAULT_REMOTE_COMMAND);
+  protected DistributedSystemConfigImpl(Properties props,
+      boolean ignoreGemFirePropsFile) {
+    this(new DistributionConfigImpl(
+            filterOutAdminProperties(props), ignoreGemFirePropsFile),
+        DEFAULT_REMOTE_COMMAND);
     String remoteCommand = props.getProperty(REMOTE_COMMAND_NAME);
     if (remoteCommand != null) {
       this.remoteCommand = remoteCommand;
     }
 
-    String entityConfigXMLFile = props.getProperty(ENTITY_CONFIG_XML_FILE_NAME);
+    String entityConfigXMLFile =
+        props.getProperty(ENTITY_CONFIG_XML_FILE_NAME);
     if (entityConfigXMLFile != null) {
       this.entityConfigXMLFile = entityConfigXMLFile;
     }
 
-    String refreshInterval = props.getProperty(REFRESH_INTERVAL_NAME);
+    String refreshInterval =
+        props.getProperty(REFRESH_INTERVAL_NAME);
     if (refreshInterval != null) {
       try {
         this.refreshInterval = Integer.parseInt(refreshInterval);
       } catch (NumberFormatException nfEx) {
-        throw new IllegalArgumentException(LocalizedStrings.DistributedSystemConfigImpl_0_IS_NOT_A_VALID_INTEGER_1.toLocalizedString(new Object[] {
-          refreshInterval, REFRESH_INTERVAL_NAME
-        }));
+        throw new IllegalArgumentException(
+            LocalizedStrings.DistributedSystemConfigImpl_0_IS_NOT_A_VALID_INTEGER_1.toLocalizedString(new Object[] { refreshInterval, REFRESH_INTERVAL_NAME }));
       }
     }
   }
@@ -240,6 +248,7 @@ public class DistributedSystemConfigImpl implements DistributedSystemConfig {
    * Returns the <code>LogWriterI18n</code> to be used when administering
    * the distributed system. Returns null if nothing has been provided via
    * <code>setInternalLogWriter</code>.
+   *
    * @since GemFire 4.0
    */
   public InternalLogWriter getInternalLogWriter() {
@@ -298,6 +307,7 @@ public class DistributedSystemConfigImpl implements DistributedSystemConfig {
    * Marks this config object as "read only".  Attempts to modify a
    * config object will result in a {@link IllegalStateException}
    * being thrown.
+   *
    * @since GemFire 4.0
    */
   void setDistributedSystem(AdminDistributedSystemImpl system) {
@@ -307,12 +317,14 @@ public class DistributedSystemConfigImpl implements DistributedSystemConfig {
   /**
    * Checks to see if this config object is "read only".  If it is,
    * then an {@link IllegalStateException} is thrown.
+   *
    * @since GemFire 4.0
    */
   protected void checkReadOnly() {
     if (this.system != null) {
-      throw new IllegalStateException(LocalizedStrings.DistributedSystemConfigImpl_A_DISTRIBUTEDSYSTEMCONFIG_OBJECT_CANNOT_BE_MODIFIED_AFTER_IT_HAS_BEEN_USED_TO_CREATE_AN_ADMINDISTRIBUTEDSYSTEM
-        .toLocalizedString());
+      throw new IllegalStateException(
+          LocalizedStrings.DistributedSystemConfigImpl_A_DISTRIBUTEDSYSTEMCONFIG_OBJECT_CANNOT_BE_MODIFIED_AFTER_IT_HAS_BEEN_USED_TO_CREATE_AN_ADMINDISTRIBUTEDSYSTEM
+              .toLocalizedString());
     }
   }
 
@@ -329,6 +341,7 @@ public class DistributedSystemConfigImpl implements DistributedSystemConfig {
   /**
    * Parses the XML configuration file that describes managed
    * entities.
+   *
    * @throws AdminXmlException If a problem is encountered while parsing the XML file.
    */
   private void parseEntityConfigXMLFile() {
@@ -430,6 +443,7 @@ public class DistributedSystemConfigImpl implements DistributedSystemConfig {
 
   /**
    * Returns the value for membership-port-range
+   *
    * @return the value for the Distributed System property membership-port-range
    */
   public String getMembershipPortRange() {
@@ -438,8 +452,9 @@ public class DistributedSystemConfigImpl implements DistributedSystemConfig {
 
   /**
    * Sets the Distributed System property membership-port-range
+   *
    * @param membershipPortRangeStr the value for membership-port-range given as two numbers separated
-   * by a minus sign.
+   *                               by a minus sign.
    */
   public void setMembershipPortRange(String membershipPortRangeStr) {
     /*
@@ -457,9 +472,10 @@ public class DistributedSystemConfigImpl implements DistributedSystemConfig {
         if (validateMembershipRange(membershipPortRangeStr)) {
           this.membershipPortRange = membershipPortRangeStr;
         } else {
-          throw new IllegalArgumentException(LocalizedStrings.DistributedSystemConfigImpl_INVALID_VALUE_FOR_MEMBERSHIP_PORT_RANGE.toLocalizedString(new Object[] {
-            membershipPortRangeStr, MEMBERSHIP_PORT_RANGE_NAME
-          }));
+          throw new IllegalArgumentException(
+              LocalizedStrings.DistributedSystemConfigImpl_INVALID_VALUE_FOR_MEMBERSHIP_PORT_RANGE
+                  .toLocalizedString(new Object[] { membershipPortRangeStr,
+                      MEMBERSHIP_PORT_RANGE_NAME }));
         }
       } catch (Exception e) {
         if (logger.isDebugEnabled()) {
@@ -483,9 +499,9 @@ public class DistributedSystemConfigImpl implements DistributedSystemConfig {
    * Validates the given string - which is expected in the format as two numbers
    * separated by a minus sign - in to an integer array of length 2 with first
    * element as lower end & second element as upper end of the range.
-   * @param membershipPortRange membership-port-range given as two numbers separated by a minus
-   * sign.
    *
+   * @param membershipPortRange membership-port-range given as two numbers separated by a minus
+   *                            sign.
    * @return true if the membership-port-range string is valid, false otherwise
    */
   private boolean validateMembershipRange(String membershipPortRange) {
@@ -497,7 +513,8 @@ public class DistributedSystemConfigImpl implements DistributedSystemConfig {
       range[1] = Integer.parseInt(splitted[1].trim());
       //NumberFormatException if any could be thrown
 
-      if (range[0] < 0 || range[0] >= range[1] || range[1] < 0 || range[1] > 65535) {
+      if (range[0] < 0 || range[0] >= range[1] ||
+          range[1] < 0 || range[1] > 65535) {
         range = null;
       }
     }
@@ -510,8 +527,10 @@ public class DistributedSystemConfigImpl implements DistributedSystemConfig {
    */
   private static String getMembershipPortRangeString(int[] membershipPortRange) {
     String membershipPortRangeString = "";
-    if (membershipPortRange != null && membershipPortRange.length == 2) {
-      membershipPortRangeString = membershipPortRange[0] + "-" + membershipPortRange[1];
+    if (membershipPortRange != null &&
+        membershipPortRange.length == 2) {
+      membershipPortRangeString = membershipPortRange[0] + "-" +
+          membershipPortRange[1];
     }
 
     return membershipPortRangeString;
@@ -675,10 +694,12 @@ public class DistributedSystemConfigImpl implements DistributedSystemConfig {
   /**
    * Returns an array of configurations for statically known
    * CacheServers
+   *
    * @since GemFire 4.0
-   */
+   */ 
   public CacheServerConfig[] getCacheServerConfigs() {
-    return (CacheServerConfig[]) this.cacheServerConfigs.toArray(new CacheServerConfig[this.cacheServerConfigs.size()]);
+    return (CacheServerConfig[]) this.cacheServerConfigs.toArray(
+        new CacheServerConfig[this.cacheServerConfigs.size()]);
   }
 
   public CacheVmConfig[] getCacheVmConfigs() {
@@ -687,6 +708,7 @@ public class DistributedSystemConfigImpl implements DistributedSystemConfig {
 
   /**
    * Creates the configuration for a CacheServer
+   *
    * @since GemFire 4.0
    */
   public CacheServerConfig createCacheServerConfig() {
@@ -701,14 +723,14 @@ public class DistributedSystemConfigImpl implements DistributedSystemConfig {
 
   /**
    * Adds the configuration for a CacheServer
+   *
    * @since GemFire 4.0
    */
   private void addCacheServerConfig(CacheServerConfig managerConfig) {
     checkReadOnly();
 
-    if (managerConfig == null) {
+    if (managerConfig == null)
       return;
-    }
     for (Iterator iter = this.cacheServerConfigs.iterator(); iter.hasNext(); ) {
       CacheServerConfigImpl impl = (CacheServerConfigImpl) iter.next();
       if (impl.equals(managerConfig)) {
@@ -721,6 +743,7 @@ public class DistributedSystemConfigImpl implements DistributedSystemConfig {
 
   /**
    * Removes the configuration for a CacheServer
+   *
    * @since GemFire 4.0
    */
   public void removeCacheServerConfig(CacheServerConfig managerConfig) {
@@ -738,15 +761,18 @@ public class DistributedSystemConfigImpl implements DistributedSystemConfig {
    */
   public DistributionLocatorConfig[] getDistributionLocatorConfigs() {
     if (this.system != null) {
-      DistributionLocator[] locators = this.system.getDistributionLocators();
-      DistributionLocatorConfig[] configs = new DistributionLocatorConfig[locators.length];
+      DistributionLocator[] locators =
+          this.system.getDistributionLocators();
+      DistributionLocatorConfig[] configs =
+          new DistributionLocatorConfig[locators.length];
       for (int i = 0; i < locators.length; i++) {
         configs[i] = locators[i].getConfig();
       }
       return configs;
 
     } else {
-      Object[] array = new DistributionLocatorConfig[this.locatorConfigs.size()];
+      Object[] array =
+          new DistributionLocatorConfig[this.locatorConfigs.size()];
       return (DistributionLocatorConfig[]) this.locatorConfigs.toArray(array);
     }
   }
@@ -783,22 +809,22 @@ public class DistributedSystemConfigImpl implements DistributedSystemConfig {
    * Validates the bind address.  The address may be a host name or IP address,
    * but it must not be empty and must be usable for creating an InetAddress.
    * Cannot have a leading '/' (which InetAddress.toString() produces).
+   *
    * @param bindAddress host name or IP address to validate
    */
   public static boolean validateBindAddress(String bindAddress) {
-    if (bindAddress == null || bindAddress.length() == 0) {
+    if (bindAddress == null || bindAddress.length() == 0)
       return true;
-    }
-    if (InetAddressUtil.validateHost(bindAddress) == null) {
+    if (InetAddressUtil.validateHost(bindAddress) == null)
       return false;
-    }
     return true;
   }
 
   public synchronized void configChanged() {
     ConfigListener[] clients = null;
     synchronized (this.listeners) {
-      clients = (ConfigListener[]) listeners.toArray(new ConfigListener[this.listeners.size()]);
+      clients = (ConfigListener[])
+          listeners.toArray(new ConfigListener[this.listeners.size()]);
     }
     for (int i = 0; i < clients.length; i++) {
       try {
@@ -830,10 +856,14 @@ public class DistributedSystemConfigImpl implements DistributedSystemConfig {
   // -------------------------------------------------------------------------
   //   SSL support...
   // -------------------------------------------------------------------------
-  private boolean sslEnabled = DistributionConfig.DEFAULT_SSL_ENABLED;
-  private String[] sslProtocols = new String[] { DistributionConfig.DEFAULT_SSL_PROTOCOLS };
-  private String[] sslCiphers = new String[] { DistributionConfig.DEFAULT_SSL_CIPHERS };
-  private boolean sslAuthenticationRequired = DistributionConfig.DEFAULT_SSL_REQUIRE_AUTHENTICATION;
+  private boolean sslEnabled =
+      DistributionConfig.DEFAULT_SSL_ENABLED;
+  private String sslProtocols =
+      DistributionConfig.DEFAULT_SSL_PROTOCOLS;
+  private String sslCiphers =
+      DistributionConfig.DEFAULT_SSL_CIPHERS;
+  private boolean sslAuthenticationRequired =
+      DistributionConfig.DEFAULT_SSL_REQUIRE_AUTHENTICATION;
   private Properties sslProperties = new Properties();
 
   public boolean isSSLEnabled() {
@@ -846,21 +876,21 @@ public class DistributedSystemConfigImpl implements DistributedSystemConfig {
     configChanged();
   }
 
-  public String[] getSSLProtocols() {
+  public String getSSLProtocols() {
     return this.sslProtocols;
   }
 
-  public void setSSLProtocols(final String[] protocols) {
+  public void setSSLProtocols(String protocols) {
     checkReadOnly();
     this.sslProtocols = protocols;
     configChanged();
   }
 
-  public String[] getSSLCiphers() {
+  public String getSSLCiphers() {
     return this.sslCiphers;
   }
 
-  public void setSSLCiphers(String[] ciphers) {
+  public void setSSLCiphers(String ciphers) {
     checkReadOnly();
     this.sslCiphers = ciphers;
     configChanged();
@@ -903,7 +933,6 @@ public class DistributedSystemConfigImpl implements DistributedSystemConfig {
 
   /**
    * @return the gfSecurityProperties
-   *
    * @since GemFire 6.6.3
    */
   public Properties getGfSecurityProperties() {
@@ -969,13 +998,14 @@ public class DistributedSystemConfigImpl implements DistributedSystemConfig {
   /**
    * Makes sure that the mcast port and locators are correct and
    * consistent.
+   *
    * @throws IllegalArgumentException If configuration is not valid
    */
   public void validate() {
-    if (this.getMcastPort() < MIN_MCAST_PORT || this.getMcastPort() > MAX_MCAST_PORT) {
-      throw new IllegalArgumentException(LocalizedStrings.DistributedSystemConfigImpl_MCASTPORT_MUST_BE_AN_INTEGER_INCLUSIVELY_BETWEEN_0_AND_1.toLocalizedString(new Object[] {
-        Integer.valueOf(MIN_MCAST_PORT), Integer.valueOf(MAX_MCAST_PORT)
-      }));
+    if (this.getMcastPort() < MIN_MCAST_PORT ||
+        this.getMcastPort() > MAX_MCAST_PORT) {
+      throw new IllegalArgumentException(LocalizedStrings.DistributedSystemConfigImpl_MCASTPORT_MUST_BE_AN_INTEGER_INCLUSIVELY_BETWEEN_0_AND_1
+          .toLocalizedString(new Object[] { Integer.valueOf(MIN_MCAST_PORT), Integer.valueOf(MAX_MCAST_PORT) }));
     }
 
     // disabled in 5.1 - multicast and locators can be used together
@@ -987,16 +1017,16 @@ public class DistributedSystemConfigImpl implements DistributedSystemConfig {
 
     LogWriterImpl.levelNameToCode(this.logLevel);
 
-    if (this.logFileSizeLimit < MIN_LOG_FILE_SIZE_LIMIT || this.logFileSizeLimit > MAX_LOG_FILE_SIZE_LIMIT) {
-      throw new IllegalArgumentException(LocalizedStrings.DistributedSystemConfigImpl_LOGFILESIZELIMIT_MUST_BE_AN_INTEGER_BETWEEN_0_AND_1.toLocalizedString(new Object[] {
-        Integer.valueOf(MIN_LOG_FILE_SIZE_LIMIT), Integer.valueOf(MAX_LOG_FILE_SIZE_LIMIT)
-      }));
+    if (this.logFileSizeLimit < MIN_LOG_FILE_SIZE_LIMIT ||
+        this.logFileSizeLimit > MAX_LOG_FILE_SIZE_LIMIT) {
+      throw new IllegalArgumentException(LocalizedStrings.DistributedSystemConfigImpl_LOGFILESIZELIMIT_MUST_BE_AN_INTEGER_BETWEEN_0_AND_1
+          .toLocalizedString(new Object[] { Integer.valueOf(MIN_LOG_FILE_SIZE_LIMIT), Integer.valueOf(MAX_LOG_FILE_SIZE_LIMIT) }));
     }
 
-    if (this.logDiskSpaceLimit < MIN_LOG_DISK_SPACE_LIMIT || this.logDiskSpaceLimit > MAX_LOG_DISK_SPACE_LIMIT) {
-      throw new IllegalArgumentException(LocalizedStrings.DistributedSystemConfigImpl_LOGDISKSPACELIMIT_MUST_BE_AN_INTEGER_BETWEEN_0_AND_1.toLocalizedString(new Object[] {
-        Integer.valueOf(MIN_LOG_DISK_SPACE_LIMIT), Integer.valueOf(MAX_LOG_DISK_SPACE_LIMIT)
-      }));
+    if (this.logDiskSpaceLimit < MIN_LOG_DISK_SPACE_LIMIT ||
+        this.logDiskSpaceLimit > MAX_LOG_DISK_SPACE_LIMIT) {
+      throw new IllegalArgumentException(LocalizedStrings.DistributedSystemConfigImpl_LOGDISKSPACELIMIT_MUST_BE_AN_INTEGER_BETWEEN_0_AND_1
+          .toLocalizedString(new Object[] { Integer.valueOf(MIN_LOG_DISK_SPACE_LIMIT), Integer.valueOf(MAX_LOG_DISK_SPACE_LIMIT) }));
     }
 
     parseEntityConfigXMLFile();
@@ -1007,12 +1037,14 @@ public class DistributedSystemConfigImpl implements DistributedSystemConfig {
    */
   @Override
   public Object clone() throws CloneNotSupportedException {
-    DistributedSystemConfigImpl other = (DistributedSystemConfigImpl) super.clone();
+    DistributedSystemConfigImpl other =
+        (DistributedSystemConfigImpl) super.clone();
     other.system = null;
     other.cacheServerConfigs = new HashSet();
     other.locatorConfigs = new HashSet();
 
-    DistributionLocatorConfig[] myLocators = this.getDistributionLocatorConfigs();
+    DistributionLocatorConfig[] myLocators =
+        this.getDistributionLocatorConfigs();
     for (int i = 0; i < myLocators.length; i++) {
       DistributionLocatorConfig locator = myLocators[i];
       other.addDistributionLocatorConfig((DistributionLocatorConfig) locator.clone());
@@ -1031,9 +1063,8 @@ public class DistributedSystemConfigImpl implements DistributedSystemConfig {
   public String toString() {
     StringBuffer buf = new StringBuffer(1000);
     String lf = System.getProperty("line.separator");
-    if (lf == null) {
+    if (lf == null)
       lf = ",";
-    }
 
     buf.append("DistributedSystemConfig(");
     buf.append(lf);

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/6ffa6523/geode-core/src/main/java/com/gemstone/gemfire/admin/internal/EnabledManagedEntityController.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/admin/internal/EnabledManagedEntityController.java b/geode-core/src/main/java/com/gemstone/gemfire/admin/internal/EnabledManagedEntityController.java
index 8fee07e..465d7ae 100755
--- a/geode-core/src/main/java/com/gemstone/gemfire/admin/internal/EnabledManagedEntityController.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/admin/internal/EnabledManagedEntityController.java
@@ -16,14 +16,6 @@
  */
 package com.gemstone.gemfire.admin.internal;
 
-import static com.gemstone.gemfire.distributed.ConfigurationProperties.*;
-
-import java.io.File;
-import java.util.Iterator;
-import java.util.Properties;
-
-import org.apache.logging.log4j.Logger;
-
 import com.gemstone.gemfire.admin.AdminDistributedSystem;
 import com.gemstone.gemfire.admin.DistributedSystemConfig;
 import com.gemstone.gemfire.admin.ManagedEntity;
@@ -34,7 +26,13 @@ import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
 import com.gemstone.gemfire.internal.logging.LogService;
 import com.gemstone.gemfire.internal.logging.LoggingThreadGroup;
 import com.gemstone.gemfire.internal.logging.log4j.LocalizedMessage;
-import com.gemstone.gemfire.management.internal.SSLUtil;
+import org.apache.logging.log4j.Logger;
+
+import java.io.File;
+import java.util.Iterator;
+import java.util.Properties;
+
+import static com.gemstone.gemfire.distributed.ConfigurationProperties.*;
 
 /**
  * Implements the actual administration (starting, stopping, etc.) of
@@ -43,49 +41,43 @@ import com.gemstone.gemfire.management.internal.SSLUtil;
  * by the {@link InternalManagedEntity} object.  Note that it does not
  * use <code>SystemAdmin</code> to manage "local" entities; it always
  * execs the scripts.
- * <p>
- * <p>
- * <p>
+ *
+ * <P>
+ *
  * This class is a refactoring of <code>Systemcontroller</code>,
  * <code>RemoteCommand</code>, and <code>LocatorRemoteCommand</code>.
+ *
  * @since GemFire 4.0
  */
 class EnabledManagedEntityController implements ManagedEntityController {
-
   private static final Logger logger = LogService.getLogger();
 
-  //  /** A lock to ensure that only entity is managed at a time.  See bug
-  //   * 31374. */
-  //  private static Object startStopLock = new Object();
+//  /** A lock to ensure that only entity is managed at a time.  See bug
+//   * 31374. */
+//  private static Object startStopLock = new Object();
 
-  /**
-   * Known strings found in output indicating error.
-   */
+  /** Known strings found in output indicating error. */
   private static final String[] ERROR_OUTPUTS = new String[] {
-    "No such file or directory", "The system cannot find the file specified.", "Access is denied.", "cannot open", "ERROR"
+    "No such file or directory",
+    "The system cannot find the file specified.",
+    "Access is denied.",
+    "cannot open",
+    "ERROR"
   };
 
-  /**
-   * Token in command prefix to be replaced with actual HOST
-   */
+  /** Token in command prefix to be replaced with actual HOST */
   private static final String HOST = "{HOST}";
 
-  /**
-   * Token in command prefix to be replaced with actual execution CMD
-   */
+  /** Token in command prefix to be replaced with actual execution CMD */
   private static final String CMD = "{CMD}";
 
   //////////////////////  Instance Fields  //////////////////////
 
-  /**
-   * The thread group in which threads launched by this system
-   * controller reside.
-   */
+  /** The thread group in which threads launched by this system
+   * controller reside. */
   private final ThreadGroup threadGroup;
 
-  /**
-   * System to which the managed entities belong
-   */
+  /** System to which the managed entities belong */
   private final AdminDistributedSystem system;
 
   ///////////////////////  Constructors  ///////////////////////
@@ -96,7 +88,8 @@ class EnabledManagedEntityController implements ManagedEntityController {
    */
   EnabledManagedEntityController(AdminDistributedSystem system) {
     this.system = system;
-    this.threadGroup = LoggingThreadGroup.createThreadGroup("ManagedEntityController threads", logger);
+    this.threadGroup =
+      LoggingThreadGroup.createThreadGroup("ManagedEntityController threads", logger);
   }
 
   /////////////////////  Instance Methods  /////////////////////
@@ -106,41 +99,39 @@ class EnabledManagedEntityController implements ManagedEntityController {
    * contains a known error message.
    */
   private boolean outputIsError(String output) {
-    if (output == null) {
-      return false;
-    }
+    if (output == null) return false;
     boolean error = false;
     for (int i = 0; i < ERROR_OUTPUTS.length; i++) {
       error = output.indexOf(ERROR_OUTPUTS[i]) > -1;
-      if (error) {
-        return error;
-      }
+      if (error) return error;
     }
     return error;
   }
 
   /**
    * Executes a command using {@link Runtime#exec(java.lang.String)}.
-   * @param command The full command to remotely execute
+   *
+   * @param command
+   *        The full command to remotely execute
    *
    * @return Output from the command that was executed or
-   * <code>null</code> if the executing the command failed.
+   *         <code>null</code> if the executing the command failed.
    */
-  protected String execute(String command, InternalManagedEntity entity) {
+  protected String execute(String command,
+                         InternalManagedEntity entity) {
     /* TODO: this is getting ugly... clients of this method really need to
        have the ability to do their own parsing/checking of 'output' */
     if (command == null || command.length() == 0) {
       throw new IllegalArgumentException(LocalizedStrings.ManagedEntityController_EXECUTION_COMMAND_IS_EMPTY.toLocalizedString());
     }
 
-    File workingDir = new File(entity.getEntityConfig().getWorkingDirectory());
-    logger.info(LocalizedMessage.create(LocalizedStrings.ManagedEntityController_EXECUTING_REMOTE_COMMAND_0_IN_DIRECTORY_1, new Object[] {
-      command,
-      workingDir
-    }));
+    File workingDir =
+      new File(entity.getEntityConfig().getWorkingDirectory());
+    logger.info(LocalizedMessage.create(LocalizedStrings.ManagedEntityController_EXECUTING_REMOTE_COMMAND_0_IN_DIRECTORY_1, new Object[] {command, workingDir}));
     Process p = null;
     try {
-      p = Runtime.getRuntime().exec(command, null /* env */, workingDir);
+      p = Runtime.getRuntime().exec(command, null /* env */,
+                                    workingDir);
 
     } catch (java.io.IOException e) {
       logger.fatal(LocalizedMessage.create(LocalizedStrings.ManagedEntityController_WHILE_EXECUTING_0, command), e);
@@ -150,11 +141,8 @@ class EnabledManagedEntityController implements ManagedEntityController {
     final ProcessOutputReader pos = new ProcessOutputReader(p);
     int retCode = pos.getExitCode();
     final String output = pos.getOutput();
-    logger.info(LocalizedMessage.create(LocalizedStrings.ManagedEntityController_RESULT_OF_EXECUTING_0_IS_1, new Object[] {
-      command,
-      Integer.valueOf(retCode)
-    }));
-    logger.info(LocalizedMessage.create(LocalizedStrings.ManagedEntityController_OUTPUT_OF_0_IS_1, new Object[] { command, output }));
+    logger.info(LocalizedMessage.create(LocalizedStrings.ManagedEntityController_RESULT_OF_EXECUTING_0_IS_1, new Object[] {command, Integer.valueOf(retCode)}));
+    logger.info(LocalizedMessage.create(LocalizedStrings.ManagedEntityController_OUTPUT_OF_0_IS_1, new Object[] {command, output}));
 
     if (retCode != 0 || outputIsError(output)) {
       logger.warn(LocalizedMessage.create(LocalizedStrings.ManagedEntityController_REMOTE_EXECUTION_OF_0_FAILED, command));
@@ -164,16 +152,12 @@ class EnabledManagedEntityController implements ManagedEntityController {
     return output;
   }
 
-  /**
-   * Returns true if the path ends with a path separator.
-   */
+  /** Returns true if the path ends with a path separator. */
   private boolean endsWithSeparator(String path) {
     return path.endsWith("/") || path.endsWith("\\");
   }
 
-  /**
-   * Translates the path between Windows and UNIX.
-   */
+  /** Translates the path between Windows and UNIX. */
   private String getOSPath(String path) {
     if (pathIsWindows(path)) {
       return path.replace('/', '\\');
@@ -182,17 +166,16 @@ class EnabledManagedEntityController implements ManagedEntityController {
     }
   }
 
-  //  /** Returns true if the path is on Windows. */
-  //  private boolean pathIsWindows(File path) {
-  //    return pathIsWindows(path.toString());
-  //  }
+//  /** Returns true if the path is on Windows. */
+//  private boolean pathIsWindows(File path) {
+//    return pathIsWindows(path.toString());
+//  }
 
-  /**
-   * Returns true if the path is on Windows.
-   */
+  /** Returns true if the path is on Windows. */
   private boolean pathIsWindows(String path) {
     if (path != null && path.length() > 1) {
-      return (Character.isLetter(path.charAt(0)) && path.charAt(1) == ':') || (path.startsWith("//") || path.startsWith("\\\\"));
+      return (Character.isLetter(path.charAt(0)) && path.charAt(1) == ':') ||
+        (path.startsWith("//") || path.startsWith("\\\\"));
     }
     return false;
   }
@@ -200,10 +183,13 @@ class EnabledManagedEntityController implements ManagedEntityController {
   /**
    * If the managed entity resides on a remote host, then
    * <code>command</code> is munged to take the remote command into account.
-   * @throws IllegalStateException If a remote command is required, but one has not been
-   * specified.
+   *
+   * @throws IllegalStateException
+   *        If a remote command is required, but one has not been
+   *        specified.
    */
-  private String arrangeRemoteCommand(InternalManagedEntity entity, String cmd) {
+  private String arrangeRemoteCommand(InternalManagedEntity entity,
+                                      String cmd) {
 
     String host = entity.getEntityConfig().getHost();
     if (InetAddressUtil.isLocalHost(host)) {
@@ -217,7 +203,8 @@ class EnabledManagedEntityController implements ManagedEntityController {
     }
 
     if (prefix == null || prefix.length() <= 0) {
-      throw new IllegalStateException(LocalizedStrings.ManagedEntityController_A_REMOTE_COMMAND_MUST_BE_SPECIFIED_TO_OPERATE_ON_A_MANAGED_ENTITY_ON_HOST_0.toLocalizedString(host));
+      throw new IllegalStateException(LocalizedStrings.ManagedEntityController_A_REMOTE_COMMAND_MUST_BE_SPECIFIED_TO_OPERATE_ON_A_MANAGED_ENTITY_ON_HOST_0
+          .toLocalizedString(host));
     }
 
     int hostIdx = prefix.indexOf(HOST);
@@ -256,19 +243,23 @@ class EnabledManagedEntityController implements ManagedEntityController {
    * <code>$GEMFIRE/bin</code> taking into account the {@linkplain
    * ManagedEntityConfig#getProductDirectory product directory} and the
    * platform's file separator.
-   * <p>
-   * <p>
-   * <p>
+   *
+   * <P>
+   *
    * Note: we should probably do a better job of determine whether or
    * not the machine on which the entity runs is Windows or Linux.
-   * @param executable The name of the executable that resides in
-   * <code>$GEMFIRE/bin</code>.
+   *
+   * @param executable
+   *        The name of the executable that resides in
+   *        <code>$GEMFIRE/bin</code>.
    */
-  public String getProductExecutable(InternalManagedEntity entity, String executable) {
-    String productDirectory = entity.getEntityConfig().getProductDirectory();
+  public String getProductExecutable(InternalManagedEntity entity,
+                                     String executable) {
+    String productDirectory =
+      entity.getEntityConfig().getProductDirectory();
     String path = null;
     File productDir = new File(productDirectory);
-    //    if (productDir != null) (cannot be null)
+//    if (productDir != null) (cannot be null)
     {
       path = productDir.getPath();
       if (!endsWithSeparator(path)) {
@@ -276,9 +267,9 @@ class EnabledManagedEntityController implements ManagedEntityController {
       }
       path += "bin" + File.separator;
     }
-    //    else {
-    //      path = "";
-    //    }
+//    else {
+//      path = "";
+//    }
 
     String bat = "";
     if (pathIsWindows(path)) {
@@ -293,12 +284,10 @@ class EnabledManagedEntityController implements ManagedEntityController {
    */
   public String buildSSLArguments(DistributedSystemConfig config) {
     Properties sslProps = buildSSLProperties(config, true);
-    if (sslProps == null) {
-      return null;
-    }
+    if (sslProps == null) return null;
 
     StringBuffer sb = new StringBuffer();
-    for (Iterator iter = sslProps.keySet().iterator(); iter.hasNext(); ) {
+    for (Iterator iter = sslProps.keySet().iterator(); iter.hasNext();) {
       String key = (String) iter.next();
       String value = sslProps.getProperty(key);
       sb.append(" -J-D" + key + "=" + value);
@@ -310,27 +299,36 @@ class EnabledManagedEntityController implements ManagedEntityController {
   /**
    * Builds optional SSL properties for DistributionLocator. Returns null if SSL
    * is not enabled for the distributed system.
-   * @param forCommandLine true indicates that
-   * {@link DistributionConfig#GEMFIRE_PREFIX} should be
-   * prepended so the argument will become -Dgemfire.xxxx
+   *
+   * @param forCommandLine
+   *                true indicates that
+   *                {@link DistributionConfig#GEMFIRE_PREFIX} should be
+   *                prepended so the argument will become -Dgemfire.xxxx
    */
-  private Properties buildSSLProperties(DistributedSystemConfig config, boolean forCommandLine) {
-    if (!config.isSSLEnabled()) {
-      return null;
-    }
+  private Properties buildSSLProperties(DistributedSystemConfig config,
+                                        boolean forCommandLine) {
+    if (!config.isSSLEnabled()) return null;
 
     String prefix = "";
-    if (forCommandLine) {
-      prefix = DistributionConfig.GEMFIRE_PREFIX;
-    }
+    if (forCommandLine) prefix = DistributionConfig.GEMFIRE_PREFIX;
 
     Properties sslProps = (Properties) config.getSSLProperties().clone();
     // add ssl-enabled, etc...
-    sslProps.setProperty(prefix + MCAST_PORT, "0");
-    sslProps.setProperty(prefix + CLUSTER_SSL_ENABLED, String.valueOf(config.isSSLEnabled()));
-    sslProps.setProperty(prefix + CLUSTER_SSL_CIPHERS, SSLUtil.arrayToSpaceDelimitedString(config.getSSLCiphers()));
-    sslProps.setProperty(prefix + CLUSTER_SSL_PROTOCOLS, SSLUtil.arrayToSpaceDelimitedString(config.getSSLProtocols()));
-    sslProps.setProperty(prefix + CLUSTER_SSL_REQUIRE_AUTHENTICATION, String.valueOf(config.isSSLAuthenticationRequired()));
+    sslProps.setProperty(prefix +
+            MCAST_PORT,
+                         "0");
+    sslProps.setProperty(prefix +
+                         CLUSTER_SSL_ENABLED,
+                         String.valueOf(config.isSSLEnabled()));
+    sslProps.setProperty(prefix +
+                         CLUSTER_SSL_CIPHERS,
+                         config.getSSLCiphers());
+    sslProps.setProperty(prefix +
+                         CLUSTER_SSL_PROTOCOLS,
+                         config.getSSLProtocols());
+    sslProps.setProperty(prefix +
+                         CLUSTER_SSL_REQUIRE_AUTHENTICATION,
+                         String.valueOf(config.isSSLAuthenticationRequired()));
     return sslProps;
   }
 
@@ -339,12 +337,13 @@ class EnabledManagedEntityController implements ManagedEntityController {
    * Starts a managed entity.
    */
   public void start(final InternalManagedEntity entity) {
-    final String command = arrangeRemoteCommand(entity, entity.getStartCommand());
+    final String command =
+      arrangeRemoteCommand(entity, entity.getStartCommand());
     Thread start = new Thread(this.threadGroup, new Runnable() {
-      public void run() {
-        execute(command, entity);
-      }
-    }, "Start " + entity.getEntityType());
+        public void run() {
+          execute(command, entity);
+        }
+      }, "Start " + entity.getEntityType());
     start.start();
   }
 
@@ -352,12 +351,13 @@ class EnabledManagedEntityController implements ManagedEntityController {
    * Stops a managed entity.
    */
   public void stop(final InternalManagedEntity entity) {
-    final String command = arrangeRemoteCommand(entity, entity.getStopCommand());
+    final String command =
+      arrangeRemoteCommand(entity, entity.getStopCommand());
     Thread stop = new Thread(this.threadGroup, new Runnable() {
-      public void run() {
-        execute(command, entity);
-      }
-    }, "Stop " + entity.getEntityType());
+        public void run() {
+          execute(command, entity);
+        }
+      }, "Stop " + entity.getEntityType());
     stop.start();
   }
 
@@ -365,17 +365,22 @@ class EnabledManagedEntityController implements ManagedEntityController {
    * Returns whether or not a managed entity is running
    */
   public boolean isRunning(InternalManagedEntity entity) {
-    final String command = arrangeRemoteCommand(entity, entity.getIsRunningCommand());
+    final String command =
+      arrangeRemoteCommand(entity, entity.getIsRunningCommand());
     String output = execute(command, entity);
 
-    if (output == null || (output.indexOf("stop" /* "ing" "ped" */) != -1) || (output.indexOf("killed") != -1) || (output.indexOf("starting") != -1)) {
+    if (output == null ||
+        (output.indexOf("stop" /* "ing" "ped" */) != -1) ||
+        (output.indexOf("killed") != -1) ||
+        (output.indexOf("starting") != -1)) {
       return false;
 
     } else if (output.indexOf("running") != -1) {
       return true;
 
     } else {
-      throw new IllegalStateException(LocalizedStrings.ManagedEntityController_COULD_NOT_DETERMINE_IF_MANAGED_ENTITY_WAS_RUNNING_0.toLocalizedString(output));
+      throw new IllegalStateException(LocalizedStrings.ManagedEntityController_COULD_NOT_DETERMINE_IF_MANAGED_ENTITY_WAS_RUNNING_0
+          .toLocalizedString(output));
     }
   }
 
@@ -385,7 +390,8 @@ class EnabledManagedEntityController implements ManagedEntityController {
    * members.
    */
   public String getLog(DistributionLocatorImpl locator) {
-    String command = arrangeRemoteCommand(locator, locator.getLogCommand());
+    String command =
+      arrangeRemoteCommand(locator, locator.getLogCommand());
     return execute(command, locator);
   }
 
@@ -393,10 +399,13 @@ class EnabledManagedEntityController implements ManagedEntityController {
    * Returns the contents of the given directory using the given
    * managed entity to determine the host and remote command.
    */
-  private String listDirectory(InternalManagedEntity entity, String dir) {
+  private String listDirectory(InternalManagedEntity entity,
+                               String dir) {
     ManagedEntityConfig config = entity.getEntityConfig();
-    String listFile = pathIsWindows(config.getProductDirectory()) ? "dir " : "ls ";
-    String command = arrangeRemoteCommand(entity, listFile + dir);
+    String listFile =
+        pathIsWindows(config.getProductDirectory()) ? "dir " : "ls ";
+    String command =
+      arrangeRemoteCommand(entity, listFile + dir);
     return execute(command, entity);
   }
 }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/6ffa6523/geode-core/src/main/java/com/gemstone/gemfire/admin/internal/ManagedEntityConfigXmlGenerator.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/admin/internal/ManagedEntityConfigXmlGenerator.java b/geode-core/src/main/java/com/gemstone/gemfire/admin/internal/ManagedEntityConfigXmlGenerator.java
index a2d23a6..e406ba3 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/admin/internal/ManagedEntityConfigXmlGenerator.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/admin/internal/ManagedEntityConfigXmlGenerator.java
@@ -16,70 +16,40 @@
  */
 package com.gemstone.gemfire.admin.internal;
 
-import java.io.IOException;
-import java.io.PrintWriter;
-import java.util.Iterator;
-import java.util.Map;
-import java.util.Properties;
-import javax.xml.transform.OutputKeys;
-import javax.xml.transform.Result;
-import javax.xml.transform.Source;
-import javax.xml.transform.Transformer;
-import javax.xml.transform.TransformerFactory;
-import javax.xml.transform.sax.SAXSource;
-import javax.xml.transform.stream.StreamResult;
-
-import org.xml.sax.Attributes;
-import org.xml.sax.ContentHandler;
-import org.xml.sax.DTDHandler;
-import org.xml.sax.EntityResolver;
-import org.xml.sax.ErrorHandler;
-import org.xml.sax.InputSource;
-import org.xml.sax.SAXException;
-import org.xml.sax.SAXNotRecognizedException;
-import org.xml.sax.SAXNotSupportedException;
-import org.xml.sax.XMLReader;
-import org.xml.sax.helpers.AttributesImpl;
-
-import com.gemstone.gemfire.admin.AdminDistributedSystem;
-import com.gemstone.gemfire.admin.AdminException;
-import com.gemstone.gemfire.admin.CacheServer;
-import com.gemstone.gemfire.admin.CacheServerConfig;
-import com.gemstone.gemfire.admin.DistributedSystemConfig;
-import com.gemstone.gemfire.admin.DistributionLocator;
-import com.gemstone.gemfire.admin.DistributionLocatorConfig;
-import com.gemstone.gemfire.admin.ManagedEntityConfig;
+import com.gemstone.gemfire.admin.*;
 import com.gemstone.gemfire.internal.Assert;
 import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
-import com.gemstone.gemfire.management.internal.SSLUtil;
 
-//import javax.xml.transform.dom.DOMSource;
+import javax.xml.transform.*; 
+//import javax.xml.transform.dom.DOMSource; 
+import javax.xml.transform.sax.SAXSource; 
+import javax.xml.transform.stream.StreamResult;  
+import org.xml.sax.*;
 //import org.xml.sax.ext.*;
+import org.xml.sax.helpers.AttributesImpl; 
+import java.io.*;
+import java.util.*;
 
 /**
  * Generates XML data that represents the managed entities in an
  * <code>AdminDistributedSystem</code>.  This class is used mainly for
  * testing.
+ *
  * @since GemFire 4.0
  */
-public class ManagedEntityConfigXmlGenerator extends ManagedEntityConfigXml implements XMLReader {
+public class ManagedEntityConfigXmlGenerator
+  extends ManagedEntityConfigXml implements XMLReader {
 
-  /**
-   * An empty <code>Attributes</code>
-   */
+  /** An empty <code>Attributes</code> */
   private static Attributes EMPTY = new AttributesImpl();
 
   /////////////////////////  Instance Fields  ////////////////////////
 
-  /**
-   * The <code>AdminDistributedSystem</code> for which we are
-   * generating XML
-   */
+  /** The <code>AdminDistributedSystem</code> for which we are
+   * generating XML */
   private AdminDistributedSystem system;
 
-  /**
-   * The content handler to which SAX events are generated
-   */
+  /** The content handler to which SAX events are generated */
   private ContentHandler handler;
 
   /////////////////////////  Static Methods  ////////////////////////
@@ -88,7 +58,8 @@ public class ManagedEntityConfigXmlGenerator extends ManagedEntityConfigXml impl
    * Generates an XML representation of all of the managed entities in
    * the given <code>AdminDistributedSystem</code>.
    */
-  public static void generate(AdminDistributedSystem system, PrintWriter pw) {
+  public static void generate(AdminDistributedSystem system,
+                              PrintWriter pw) {
     (new ManagedEntityConfigXmlGenerator(system)).generate(pw);
   }
 
@@ -96,9 +67,10 @@ public class ManagedEntityConfigXmlGenerator extends ManagedEntityConfigXml impl
 
   /**
    * Creates a new generator for the given
-   * <code>AdminDistributedSystem</code>.
+   * <code>AdminDistributedSystem</code>. 
    */
-  private ManagedEntityConfigXmlGenerator(AdminDistributedSystem system) {
+  private ManagedEntityConfigXmlGenerator(AdminDistributedSystem
+                                          system) {
     this.system = system;
   }
 
@@ -143,7 +115,8 @@ public class ManagedEntityConfigXmlGenerator extends ManagedEntityConfigXml impl
 
     AttributesImpl atts = new AttributesImpl();
 
-    atts.addAttribute("", "", ID, "", String.valueOf(this.system.getConfig().getSystemId()));
+    atts.addAttribute("", "", ID, "",
+                      String.valueOf(this.system.getConfig().getSystemId()));
 
     handler.startElement("", DISTRIBUTED_SYSTEM, DISTRIBUTED_SYSTEM, atts);
 
@@ -170,7 +143,8 @@ public class ManagedEntityConfigXmlGenerator extends ManagedEntityConfigXml impl
 
     handler.startElement("", REMOTE_COMMAND, REMOTE_COMMAND, EMPTY);
 
-    handler.characters(remoteCommand.toCharArray(), 0, remoteCommand.length());
+    handler.characters(remoteCommand.toCharArray(), 0,
+                       remoteCommand.length());
 
     handler.endElement("", REMOTE_COMMAND, REMOTE_COMMAND);
   }
@@ -182,7 +156,7 @@ public class ManagedEntityConfigXmlGenerator extends ManagedEntityConfigXml impl
     handler.startElement("", LOCATORS, LOCATORS, EMPTY);
 
     generateLocators();
-
+    
     handler.endElement("", LOCATORS, LOCATORS);
   }
 
@@ -190,7 +164,8 @@ public class ManagedEntityConfigXmlGenerator extends ManagedEntityConfigXml impl
    * Generates XML for the distributed system's locators
    */
   private void generateLocators() throws SAXException {
-    DistributionLocator[] locators = this.system.getDistributionLocators();
+    DistributionLocator[] locators =
+      this.system.getDistributionLocators();
     for (int i = 0; i < locators.length; i++) {
       generateLocator(locators[i].getConfig());
     }
@@ -199,10 +174,12 @@ public class ManagedEntityConfigXmlGenerator extends ManagedEntityConfigXml impl
   /**
    * Generates XML for a locator
    */
-  private void generateLocator(DistributionLocatorConfig config) throws SAXException {
-
+  private void generateLocator(DistributionLocatorConfig config) 
+    throws SAXException {
+    
     AttributesImpl atts = new AttributesImpl();
-    atts.addAttribute("", "", PORT, "", String.valueOf(config.getPort()));
+    atts.addAttribute("", "", PORT, "",
+                      String.valueOf(config.getPort()));
 
     handler.startElement("", LOCATOR, LOCATOR, atts);
 
@@ -214,7 +191,8 @@ public class ManagedEntityConfigXmlGenerator extends ManagedEntityConfigXml impl
   /**
    * Generates XML for attributes common to all managed entities.
    */
-  private void generateEntityConfig(ManagedEntityConfig config) throws SAXException {
+  private void generateEntityConfig(ManagedEntityConfig config) 
+    throws SAXException {
 
     String host = config.getHost();
     if (host != null) {
@@ -226,21 +204,24 @@ public class ManagedEntityConfigXmlGenerator extends ManagedEntityConfigXml impl
     String remoteCommand = config.getRemoteCommand();
     if (remoteCommand != null) {
       handler.startElement("", REMOTE_COMMAND, REMOTE_COMMAND, EMPTY);
-      handler.characters(remoteCommand.toCharArray(), 0, remoteCommand.length());
+      handler.characters(remoteCommand.toCharArray(), 0,
+                         remoteCommand.length());
       handler.endElement("", REMOTE_COMMAND, REMOTE_COMMAND);
     }
 
     String workingDirectory = config.getWorkingDirectory();
     if (workingDirectory != null) {
       handler.startElement("", WORKING_DIRECTORY, WORKING_DIRECTORY, EMPTY);
-      handler.characters(workingDirectory.toCharArray(), 0, workingDirectory.length());
+      handler.characters(workingDirectory.toCharArray(), 0,
+                         workingDirectory.length());
       handler.endElement("", WORKING_DIRECTORY, WORKING_DIRECTORY);
     }
 
     String productDirectory = config.getProductDirectory();
     if (productDirectory != null) {
       handler.startElement("", PRODUCT_DIRECTORY, PRODUCT_DIRECTORY, EMPTY);
-      handler.characters(productDirectory.toCharArray(), 0, productDirectory.length());
+      handler.characters(productDirectory.toCharArray(), 0,
+                         productDirectory.length());
       handler.endElement("", PRODUCT_DIRECTORY, PRODUCT_DIRECTORY);
     }
   }
@@ -258,30 +239,34 @@ public class ManagedEntityConfigXmlGenerator extends ManagedEntityConfigXml impl
     }
 
     AttributesImpl atts = new AttributesImpl();
-    atts.addAttribute("", "", AUTHENTICATION_REQUIRED, "", String.valueOf(config.isSSLAuthenticationRequired()));
+    atts.addAttribute("", "", AUTHENTICATION_REQUIRED, "",
+                      String.valueOf(config.isSSLAuthenticationRequired()));
 
     handler.startElement("", SSL, SSL, atts);
 
-    String protocols = SSLUtil.arrayToSpaceDelimitedString(config.getSSLProtocols());
+    String protocols = config.getSSLProtocols();
     if (protocols != null) {
       handler.startElement("", PROTOCOLS, PROTOCOLS, EMPTY);
-      handler.characters(protocols.toCharArray(), 0, protocols.length());
+      handler.characters(protocols.toCharArray(), 0,
+                         protocols.length());
       handler.endElement("", PROTOCOLS, PROTOCOLS);
     }
 
-    String ciphers = SSLUtil.arrayToSpaceDelimitedString(config.getSSLCiphers());
+    String ciphers = config.getSSLCiphers();
     if (ciphers != null) {
       handler.startElement("", CIPHERS, CIPHERS, EMPTY);
-      handler.characters(ciphers.toCharArray(), 0, ciphers.length());
+      handler.characters(ciphers.toCharArray(), 0,
+                         ciphers.length());
       handler.endElement("", CIPHERS, CIPHERS);
     }
 
     Properties sslProps = config.getSSLProperties();
-    for (Iterator iter = sslProps.entrySet().iterator(); iter.hasNext(); ) {
+    for (Iterator iter = sslProps.entrySet().iterator();
+         iter.hasNext(); ) {
       Map.Entry entry = (Map.Entry) iter.next();
       String key = (String) entry.getKey();
       String value = (String) entry.getValue();
-
+      
       handler.startElement("", PROPERTY, PROPERTY, EMPTY);
 
       handler.startElement("", KEY, KEY, EMPTY);
@@ -302,7 +287,8 @@ public class ManagedEntityConfigXmlGenerator extends ManagedEntityConfigXml impl
    * Generates an XML representation of the
    * <code>CacheServer</code>s in the distributed system.
    */
-  private void generateCacheServers() throws SAXException, AdminException {
+  private void generateCacheServers()
+    throws SAXException, AdminException {
 
     CacheServer[] servers = this.system.getCacheServers();
     for (int i = 0; i < servers.length; i++) {
@@ -314,7 +300,8 @@ public class ManagedEntityConfigXmlGenerator extends ManagedEntityConfigXml impl
    * Generates an XML representation of a
    * <code>CacheServerConfig</code>.
    */
-  private void generateCacheServer(CacheServerConfig config) throws SAXException {
+  private void generateCacheServer(CacheServerConfig config) 
+    throws SAXException {
 
     handler.startElement("", CACHE_SERVER, CACHE_SERVER, EMPTY);
 
@@ -323,7 +310,8 @@ public class ManagedEntityConfigXmlGenerator extends ManagedEntityConfigXml impl
     String classpath = config.getClassPath();
     if (classpath != null) {
       handler.startElement("", CLASSPATH, CLASSPATH, EMPTY);
-      handler.characters(classpath.toCharArray(), 0, classpath.length());
+      handler.characters(classpath.toCharArray(), 0,
+                         classpath.length());
       handler.endElement("", CLASSPATH, CLASSPATH);
     }
 
@@ -335,11 +323,11 @@ public class ManagedEntityConfigXmlGenerator extends ManagedEntityConfigXml impl
    */
   public void setContentHandler(ContentHandler handler) {
     this.handler = handler;
-  }
+  }  
 
   public ContentHandler getContentHandler() {
     return this.handler;
-  }
+  }  
 
   public ErrorHandler getErrorHandler() {
     return this;
@@ -347,20 +335,24 @@ public class ManagedEntityConfigXmlGenerator extends ManagedEntityConfigXml impl
 
   //////////  Inherited methods that don't do anything  //////////
 
-  public boolean getFeature(String name) throws SAXNotRecognizedException, SAXNotSupportedException {
+  public boolean getFeature(String name)
+    throws SAXNotRecognizedException, SAXNotSupportedException {
     return false;
   }
 
-  public void setFeature(String name, boolean value) throws SAXNotRecognizedException, SAXNotSupportedException {
+  public void setFeature(String name, boolean value)
+    throws SAXNotRecognizedException, SAXNotSupportedException {
 
   }
 
-  public Object getProperty(String name) throws SAXNotRecognizedException, SAXNotSupportedException {
+  public Object getProperty(String name)
+    throws SAXNotRecognizedException, SAXNotSupportedException {
 
     return null;
   }
 
-  public void setProperty(String name, Object value) throws SAXNotRecognizedException, SAXNotSupportedException {
+  public void setProperty(String name, Object value)
+    throws SAXNotRecognizedException, SAXNotSupportedException {
 
   }
 
@@ -371,7 +363,7 @@ public class ManagedEntityConfigXmlGenerator extends ManagedEntityConfigXml impl
   public EntityResolver getEntityResolver() {
     return this;
   }
-
+  
   public void setDTDHandler(DTDHandler handler) {
 
   }
@@ -384,7 +376,8 @@ public class ManagedEntityConfigXmlGenerator extends ManagedEntityConfigXml impl
 
   }
 
-  public void parse(String systemId) throws IOException, SAXException {
+  public void parse(String systemId)
+    throws IOException, SAXException {
 
   }
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/6ffa6523/geode-core/src/main/java/com/gemstone/gemfire/admin/internal/ManagedEntityConfigXmlParser.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/admin/internal/ManagedEntityConfigXmlParser.java b/geode-core/src/main/java/com/gemstone/gemfire/admin/internal/ManagedEntityConfigXmlParser.java
index 9ea26c9..58e90e9 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/admin/internal/ManagedEntityConfigXmlParser.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/admin/internal/ManagedEntityConfigXmlParser.java
@@ -16,43 +16,30 @@
  */
 package com.gemstone.gemfire.admin.internal;
 
-import java.io.InputStream;
-import java.util.Stack;
+import com.gemstone.gemfire.admin.*;
+import com.gemstone.gemfire.internal.Assert;
+import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
+
 import javax.xml.parsers.SAXParser;
 import javax.xml.parsers.SAXParserFactory;
-
-import org.xml.sax.Attributes;
-import org.xml.sax.ContentHandler;
-import org.xml.sax.InputSource;
-import org.xml.sax.Locator;
-import org.xml.sax.SAXException;
-import org.xml.sax.SAXParseException;
+import org.xml.sax.*;
 import org.xml.sax.helpers.DefaultHandler;
-
-import com.gemstone.gemfire.admin.AdminXmlException;
-import com.gemstone.gemfire.admin.CacheServerConfig;
-import com.gemstone.gemfire.admin.DistributedSystemConfig;
-import com.gemstone.gemfire.admin.DistributionLocatorConfig;
-import com.gemstone.gemfire.admin.ManagedEntityConfig;
-import com.gemstone.gemfire.internal.Assert;
-import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
-import com.gemstone.gemfire.management.internal.SSLUtil;
+import java.io.*;
+import java.util.*;
 
 /**
  * Parses an XML file and configures a {@link DistributedSystemConfig}
  * from it.
+ *
  * @since GemFire 4.0
  */
-public class ManagedEntityConfigXmlParser extends ManagedEntityConfigXml implements ContentHandler {
+public class ManagedEntityConfigXmlParser
+  extends ManagedEntityConfigXml implements ContentHandler {
 
-  /**
-   * The <code>DistributedSystemConfig</code> to be configured
-   */
+  /** The <code>DistributedSystemConfig</code> to be configured */
   private DistributedSystemConfig config;
 
-  /**
-   * The stack of intermediate values used while parsing
-   */
+  /** The stack of intermediate values used while parsing */
   private Stack stack = new Stack();
 
   //////////////////////  Static Methods  //////////////////////
@@ -60,10 +47,14 @@ public class ManagedEntityConfigXmlParser extends ManagedEntityConfigXml impleme
   /**
    * Parses XML data and from it configures a
    * <code>DistributedSystemConfig</code>.
-   * @throws AdminXmlException If an error is encountered while parsing the XML
+   *
+   * @throws AdminXmlException
+   *         If an error is encountered while parsing the XML
    */
-  public static void parse(InputStream is, DistributedSystemConfig config) {
-    ManagedEntityConfigXmlParser handler = new ManagedEntityConfigXmlParser();
+  public static void parse(InputStream is,
+                           DistributedSystemConfig config) {
+    ManagedEntityConfigXmlParser handler =
+      new ManagedEntityConfigXmlParser();
     handler.config = config;
 
     try {
@@ -96,7 +87,9 @@ public class ManagedEntityConfigXmlParser extends ManagedEntityConfigXml impleme
 
   /**
    * Helper method for parsing an integer
-   * @throws com.gemstone.gemfire.cache.CacheXmlException If <code>s</code> is a malformed integer
+   *
+   * @throws com.gemstone.gemfire.cache.CacheXmlException
+   *         If <code>s</code> is a malformed integer
    */
   private static int parseInt(String s) {
     try {
@@ -109,11 +102,13 @@ public class ManagedEntityConfigXmlParser extends ManagedEntityConfigXml impleme
 
   //////////////////////  Instance Methods  //////////////////////
 
-  //    if (this.system.isMcastEnabled()) {
-  //      generateMulticast();
-  //    }
+//    if (this.system.isMcastEnabled()) {
+//      generateMulticast();
+//    }
 
-  public void startElement(String namespaceURI, String localName, String qName, Attributes atts) throws SAXException {
+  public void startElement(String namespaceURI, String localName,
+                           String qName, Attributes atts)
+    throws SAXException {
 
     if (qName.equals(DISTRIBUTED_SYSTEM)) {
       startDistributedSystem(atts);
@@ -123,7 +118,7 @@ public class ManagedEntityConfigXmlParser extends ManagedEntityConfigXml impleme
 
     } else if (qName.equals(LOCATORS)) {
       startLocators(atts);
-
+      
     } else if (qName.equals(MULTICAST)) {
       startMulticast(atts);
 
@@ -168,7 +163,9 @@ public class ManagedEntityConfigXmlParser extends ManagedEntityConfigXml impleme
     }
   }
 
-  public void endElement(String namespaceURI, String localName, String qName) throws SAXException {
+  public void endElement(String namespaceURI, String localName,
+                         String qName)
+    throws SAXException {
 
     if (qName.equals(DISTRIBUTED_SYSTEM)) {
       endDistributedSystem();
@@ -234,7 +231,7 @@ public class ManagedEntityConfigXmlParser extends ManagedEntityConfigXml impleme
     if (id != null) {
       this.config.setSystemId(id);
     }
-
+    
     String disable_tcp = atts.getValue(DISABLE_TCP);
     if (disable_tcp != null) {
       this.config.setDisableTcp(DISABLE_TCP.equalsIgnoreCase("true"));
@@ -247,7 +244,7 @@ public class ManagedEntityConfigXmlParser extends ManagedEntityConfigXml impleme
    * When a <code>distributed-system</code> element is finished
    */
   private void endDistributedSystem() {
-
+    
   }
 
   /**
@@ -256,7 +253,8 @@ public class ManagedEntityConfigXmlParser extends ManagedEntityConfigXml impleme
    * and set its multicast config appropriately.
    */
   private void startMulticast(Attributes atts) {
-    DistributedSystemConfig config = (DistributedSystemConfig) stack.peek();
+    DistributedSystemConfig config =
+      (DistributedSystemConfig) stack.peek();
 
     String port = atts.getValue(PORT);
     config.setMcastPort(parseInt(port));
@@ -298,7 +296,8 @@ public class ManagedEntityConfigXmlParser extends ManagedEntityConfigXml impleme
       ((ManagedEntityConfig) top).setRemoteCommand(remoteCommand);
 
     } else {
-      String s = "Did not expect a " + top.getClass().getName() + " on top of the stack";
+      String s = "Did not expect a " + top.getClass().getName() +
+        " on top of the stack";
       Assert.assertTrue(false, s);
     }
   }
@@ -314,11 +313,13 @@ public class ManagedEntityConfigXmlParser extends ManagedEntityConfigXml impleme
   private void startLocator(Attributes atts) {
     String port = atts.getValue(PORT);
 
-    DistributedSystemConfig system = (DistributedSystemConfig) stack.peek();
+    DistributedSystemConfig system =
+      (DistributedSystemConfig) stack.peek();
     system.setMcastPort(0);
 
-    DistributionLocatorConfig config = system.createDistributionLocatorConfig();
-
+    DistributionLocatorConfig config =
+      system.createDistributionLocatorConfig();
+    
     config.setPort(parseInt(port));
 
     stack.push(config);
@@ -364,10 +365,12 @@ public class ManagedEntityConfigXmlParser extends ManagedEntityConfigXml impleme
   }
 
   private void startSSL(Attributes atts) {
-    DistributedSystemConfig config = (DistributedSystemConfig) stack.peek();
+    DistributedSystemConfig config =
+      (DistributedSystemConfig) stack.peek();
     config.setSSLEnabled(true);
 
-    String authenticationRequired = atts.getValue(AUTHENTICATION_REQUIRED);
+    String authenticationRequired =
+      atts.getValue(AUTHENTICATION_REQUIRED);
     config.setSSLAuthenticationRequired(Boolean.valueOf(authenticationRequired).booleanValue());
   }
 
@@ -381,8 +384,9 @@ public class ManagedEntityConfigXmlParser extends ManagedEntityConfigXml impleme
 
   private void endProtocols() {
     String protocols = popString();
-    DistributedSystemConfig config = (DistributedSystemConfig) stack.peek();
-    config.setSSLProtocols(SSLUtil.stringToArray(protocols));
+    DistributedSystemConfig config =
+      (DistributedSystemConfig) stack.peek();
+    config.setSSLProtocols(protocols);
   }
 
   private void startCiphers(Attributes atts) {
@@ -391,8 +395,9 @@ public class ManagedEntityConfigXmlParser extends ManagedEntityConfigXml impleme
 
   private void endCiphers() {
     String ciphers = popString();
-    DistributedSystemConfig config = (DistributedSystemConfig) stack.peek();
-    config.setSSLCiphers(SSLUtil.stringToArray(ciphers));
+    DistributedSystemConfig config =
+      (DistributedSystemConfig) stack.peek();
+    config.setSSLCiphers(ciphers);
   }
 
   private void startProperty(Attributes atts) {
@@ -402,7 +407,8 @@ public class ManagedEntityConfigXmlParser extends ManagedEntityConfigXml impleme
   private void endProperty() {
     String value = popString();
     String key = popString();
-    DistributedSystemConfig config = (DistributedSystemConfig) stack.peek();
+    DistributedSystemConfig config =
+      (DistributedSystemConfig) stack.peek();
     config.addSSLProperty(key, value);
   }
 
@@ -425,14 +431,15 @@ public class ManagedEntityConfigXmlParser extends ManagedEntityConfigXml impleme
   }
 
   private void startCacheServer(Attributes atts) {
-    DistributedSystemConfig config = (DistributedSystemConfig) stack.peek();
-    CacheServerConfig server = config.createCacheServerConfig();
+    DistributedSystemConfig config =
+      (DistributedSystemConfig) stack.peek();
+    CacheServerConfig server =
+      config.createCacheServerConfig();
     stack.push(server);
   }
 
   private void endCacheServer() {
-    /* CacheServerConfig server = (CacheServerConfig) */
-    stack.pop();
+    /* CacheServerConfig server = (CacheServerConfig) */ stack.pop();
   }
 
   private void startClassPath(Attributes atts) {
@@ -466,7 +473,8 @@ public class ManagedEntityConfigXmlParser extends ManagedEntityConfigXml impleme
    * into one big string by using a <code>StringBuffer</code>.  See
    * bug 32122.
    */
-  public void characters(char[] ch, int start, int length) throws SAXException {
+  public void characters(char[] ch, int start, int length)
+    throws SAXException {
 
     Object top = stack.peek();
 
@@ -484,29 +492,25 @@ public class ManagedEntityConfigXmlParser extends ManagedEntityConfigXml impleme
 
   //////////  Inherited methods that don't do anything  //////////
 
-  public void setDocumentLocator(Locator locator) {
-  }
+  public void setDocumentLocator(Locator locator) { }
 
-  public void startDocument() throws SAXException {
-  }
+  public void startDocument() throws SAXException { }
 
-  public void endDocument() throws SAXException {
-  }
+  public void endDocument() throws SAXException { }
 
-  public void startPrefixMapping(String prefix, String uri) throws SAXException {
-  }
+  public void startPrefixMapping(String prefix, String uri) 
+    throws SAXException { }
 
-  public void endPrefixMapping(String prefix) throws SAXException {
-  }
+  public void endPrefixMapping(String prefix)
+    throws SAXException { }
 
-  public void ignorableWhitespace(char[] ch, int start, int length) throws SAXException {
-  }
+  public void ignorableWhitespace(char[] ch, int start, int length)
+    throws SAXException { }
 
-  public void processingInstruction(String target, String data) throws SAXException {
-  }
+  public void processingInstruction(String target, String data)
+    throws SAXException { }
 
-  public void skippedEntity(String name) throws SAXException {
-  }
+  public void skippedEntity(String name) throws SAXException { }
 
   ///////////////////////  Inner Classes  ///////////////////////
 
@@ -517,11 +521,8 @@ public class ManagedEntityConfigXmlParser extends ManagedEntityConfigXml impleme
    * <B>is not</B> a <code>DefaultHandler</code>.
    */
   static class DefaultHandlerDelegate extends DefaultHandler {
-
-    /**
-     * The <code>ManagedEntityConfigXmlParser</code> that does the
-     * real work
-     */
+    /** The <code>ManagedEntityConfigXmlParser</code> that does the
+     * real work */ 
     private ManagedEntityConfigXmlParser handler;
 
     /**
@@ -534,7 +535,9 @@ public class ManagedEntityConfigXmlParser extends ManagedEntityConfigXml impleme
     }
 
     @Override
-    public InputSource resolveEntity(String publicId, String systemId) throws SAXException {
+    public InputSource resolveEntity(String publicId, 
+                                     String systemId)
+      throws SAXException {
       return handler.resolveEntity(publicId, systemId);
     }
 
@@ -554,7 +557,8 @@ public class ManagedEntityConfigXmlParser extends ManagedEntityConfigXml impleme
     }
 
     @Override
-    public void startPrefixMapping(String prefix, String uri) throws SAXException {
+    public void startPrefixMapping(String prefix, String uri)
+      throws SAXException {
       handler.startPrefixMapping(prefix, uri);
     }
 
@@ -564,27 +568,33 @@ public class ManagedEntityConfigXmlParser extends ManagedEntityConfigXml impleme
     }
 
     @Override
-    public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException {
+    public void startElement(String uri, String localName,
+                             String qName, Attributes attributes)
+      throws SAXException {
       handler.startElement(uri, localName, qName, attributes);
     }
 
     @Override
-    public void endElement(String uri, String localName, String qName) throws SAXException {
+    public void endElement(String uri, String localName, String qName)
+      throws SAXException {
       handler.endElement(uri, localName, qName);
     }
 
     @Override
-    public void characters(char[] ch, int start, int length) throws SAXException {
+    public void characters(char[] ch, int start, int length)
+      throws SAXException {
       handler.characters(ch, start, length);
     }
 
     @Override
-    public void ignorableWhitespace(char[] ch, int start, int length) throws SAXException {
+    public void ignorableWhitespace(char[] ch, int start, int length)
+      throws SAXException {
       handler.ignorableWhitespace(ch, start, length);
     }
 
     @Override
-    public void processingInstruction(String target, String data) throws SAXException {
+    public void processingInstruction(String target, String data)
+      throws SAXException {
       handler.processingInstruction(target, data);
     }
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/6ffa6523/geode-core/src/main/java/com/gemstone/gemfire/admin/jmx/internal/AdminDistributedSystemJmxImpl.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/admin/jmx/internal/AdminDistributedSystemJmxImpl.java b/geode-core/src/main/java/com/gemstone/gemfire/admin/jmx/internal/AdminDistributedSystemJmxImpl.java
index d920265..fa5a1ea 100755
--- a/geode-core/src/main/java/com/gemstone/gemfire/admin/jmx/internal/AdminDistributedSystemJmxImpl.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/admin/jmx/internal/AdminDistributedSystemJmxImpl.java
@@ -1191,19 +1191,19 @@ public class AdminDistributedSystemJmxImpl
     this.getConfig().setSSLEnabled(enabled);
   }
 
-  public String[] getSSLProtocols() {
+  public String getSSLProtocols() {
     return this.getConfig().getSSLProtocols();
   }
 
-  public void setSSLProtocols(final String[] protocols) {
+  public void setSSLProtocols(String protocols) {
     this.getConfig().setSSLProtocols(protocols);
   }
 
-  public String[] getSSLCiphers() {
+  public String getSSLCiphers() {
     return this.getConfig().getSSLCiphers();
   }
 
-  public void setSSLCiphers(final String[] ciphers) {
+  public void setSSLCiphers(String ciphers) {
     this.getConfig().setSSLCiphers(ciphers);
   }
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/6ffa6523/geode-core/src/main/java/com/gemstone/gemfire/admin/jmx/internal/AgentConfigImpl.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/admin/jmx/internal/AgentConfigImpl.java b/geode-core/src/main/java/com/gemstone/gemfire/admin/jmx/internal/AgentConfigImpl.java
index 72dd46e..6aa8944 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/admin/jmx/internal/AgentConfigImpl.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/admin/jmx/internal/AgentConfigImpl.java
@@ -42,7 +42,6 @@ import com.gemstone.gemfire.admin.jmx.AgentConfig;
 import com.gemstone.gemfire.internal.ClassPathLoader;
 import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
 import com.gemstone.gemfire.internal.util.IOUtils;
-import com.gemstone.gemfire.management.internal.SSLUtil;
 
 /**
  * Provides the JMX Agent configuration properties.
@@ -937,8 +936,8 @@ public class AgentConfigImpl extends DistributedSystemConfigImpl implements Agen
     this.httpAuthPassword = validateNonEmptyString(props.getProperty(HTTP_AUTHENTICATION_PASSWORD_NAME), DEFAULT_HTTP_AUTHENTICATION_PASSWORD);
 
     this.sslEnabled = validateBoolean(props.getProperty(CLUSTER_SSL_ENABLED), DEFAULT_SSL_ENABLED);
-    this.sslProtocols = validateNonEmptyStringArray(props.getProperty(CLUSTER_SSL_PROTOCOLS), DEFAULT_SSL_PROTOCOLS);
-    this.sslCiphers = validateNonEmptyStringArray(props.getProperty(CLUSTER_SSL_CIPHERS), DEFAULT_SSL_CIPHERS);
+    this.sslProtocols = validateNonEmptyString(props.getProperty(CLUSTER_SSL_PROTOCOLS), DEFAULT_SSL_PROTOCOLS);
+    this.sslCiphers = validateNonEmptyString(props.getProperty(CLUSTER_SSL_CIPHERS), DEFAULT_SSL_CIPHERS);
     this.sslAuthenticationRequired = validateBoolean(props.getProperty(CLUSTER_SSL_REQUIRE_AUTHENTICATION), DEFAULT_SSL_REQUIRE_AUTHENTICATION);
     this.sslProperties = new Properties();
     for (int i = 0; true; i++) {
@@ -997,10 +996,6 @@ public class AgentConfigImpl extends DistributedSystemConfigImpl implements Agen
     }
   }
 
-  private String[] validateNonEmptyStringArray(final String property, final String defaultSslProtocols) {
-    return isEmpty(property) ? SSLUtil.stringToArray(defaultSslProtocols) : SSLUtil.stringToArray(property);
-  }
-
   /**
    * Filter all agent configuration attributes out of the given <code>Properties</code> object.
    * <p/>
@@ -1681,8 +1676,8 @@ public class AgentConfigImpl extends DistributedSystemConfigImpl implements Agen
   //   SSL support...
   // -------------------------------------------------------------------------
   private boolean sslEnabled = DEFAULT_SSL_ENABLED;
-  private String[] sslProtocols = new String[] { DEFAULT_SSL_PROTOCOLS };
-  private String[] sslCiphers = new String[] { DEFAULT_SSL_CIPHERS };
+  private String sslProtocols = DEFAULT_SSL_PROTOCOLS;
+  private String sslCiphers = DEFAULT_SSL_CIPHERS;
   private boolean sslAuthenticationRequired = DEFAULT_SSL_REQUIRE_AUTHENTICATION;
   private Properties sslProperties = new Properties();
 
@@ -1698,23 +1693,23 @@ public class AgentConfigImpl extends DistributedSystemConfigImpl implements Agen
   }
 
   @Override
-  public String[] getSSLProtocols() {
+  public String getSSLProtocols() {
     return this.sslProtocols;
   }
 
   @Override
-  public void setSSLProtocols(String[] protocols) {
+  public void setSSLProtocols(String protocols) {
     this.sslProtocols = protocols;
     configChanged();
   }
 
   @Override
-  public String[] getSSLCiphers() {
+  public String getSSLCiphers() {
     return this.sslCiphers;
   }
 
   @Override
-  public void setSSLCiphers(String[] ciphers) {
+  public void setSSLCiphers(String ciphers) {
     this.sslCiphers = ciphers;
     configChanged();
   }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/6ffa6523/geode-core/src/main/java/com/gemstone/gemfire/admin/jmx/internal/AgentImpl.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/admin/jmx/internal/AgentImpl.java b/geode-core/src/main/java/com/gemstone/gemfire/admin/jmx/internal/AgentImpl.java
index 7000aea..7d880ad 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/admin/jmx/internal/AgentImpl.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/admin/jmx/internal/AgentImpl.java
@@ -1422,16 +1422,16 @@ implements com.gemstone.gemfire.admin.jmx.Agent,
   public void setSSLEnabled(boolean enabled) {
     this.agentConfig.setSSLEnabled(enabled);
   }
-  public String[] getSSLProtocols() {
+  public String getSSLProtocols() {
     return this.agentConfig.getSSLProtocols();
   }
-  public void setSSLProtocols(String[] protocols) {
+  public void setSSLProtocols(String protocols) {
     this.agentConfig.setSSLProtocols(protocols);
   }
-  public String[] getSSLCiphers() {
+  public String getSSLCiphers() {
     return this.agentConfig.getSSLCiphers();
   }
-  public void setSSLCiphers(String[] ciphers) {
+  public void setSSLCiphers(String ciphers) {
     this.agentConfig.setSSLCiphers(ciphers);
   }
   public boolean isSSLAuthenticationRequired() {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/6ffa6523/geode-core/src/main/java/com/gemstone/gemfire/distributed/ConfigurationProperties.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/distributed/ConfigurationProperties.java b/geode-core/src/main/java/com/gemstone/gemfire/distributed/ConfigurationProperties.java
index 049cbd2..34953a0 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/distributed/ConfigurationProperties.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/distributed/ConfigurationProperties.java
@@ -1710,7 +1710,7 @@ public interface ConfigurationProperties {
   /**
    * The static String definition of the <i>"cluster-ssl-protocols"</i> property
    * <a name="ssl-protocols"/a></p>
-   * <U>Description</U>: A comma separated list of the SSL protocols to
+   * <U>Description</U>: A space separated list of the SSL protocols to
    * enable. Those listed must be supported by the available providers.
    * </p>
    * <U>Default</U>: "any"</p>


[18/50] [abbrv] incubator-geode git commit: GEODE-420: Rollback some checkAttributes changes

Posted by ud...@apache.org.
GEODE-420: Rollback some checkAttributes changes


Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/d3fbfbdf
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/d3fbfbdf
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/d3fbfbdf

Branch: refs/heads/develop
Commit: d3fbfbdf3222209f62952cd44cde6b4d7a57204c
Parents: d35ec46
Author: Udo Kohlmeyer <uk...@pivotal.io>
Authored: Tue Aug 23 03:41:27 2016 +1000
Committer: Udo Kohlmeyer <uk...@pivotal.io>
Committed: Tue Aug 23 03:41:27 2016 +1000

----------------------------------------------------------------------
 .../internal/AbstractDistributionConfig.java        | 16 +++++++---------
 .../internal/RuntimeDistributionConfigImpl.java     | 14 ++++++++------
 2 files changed, 15 insertions(+), 15 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/d3fbfbdf/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/AbstractDistributionConfig.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/AbstractDistributionConfig.java b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/AbstractDistributionConfig.java
index ad43415..f46aede 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/AbstractDistributionConfig.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/AbstractDistributionConfig.java
@@ -40,9 +40,9 @@ import com.gemstone.gemfire.internal.ConfigSource;
 import com.gemstone.gemfire.internal.admin.remote.DistributionLocatorId;
 import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
 import com.gemstone.gemfire.internal.logging.LogWriterImpl;
-import com.gemstone.gemfire.internal.security.SecurableComponent;
 import com.gemstone.gemfire.internal.net.SSLEnabledComponent;
 import com.gemstone.gemfire.internal.net.SocketCreator;
+import com.gemstone.gemfire.internal.security.SecurableComponent;
 import com.gemstone.gemfire.memcached.GemFireMemcachedServer;
 
 /**
@@ -57,7 +57,7 @@ import com.gemstone.gemfire.memcached.GemFireMemcachedServer;
 @SuppressWarnings("deprecation")
 public abstract class AbstractDistributionConfig extends AbstractConfig implements DistributionConfig {
 
-  protected void checkAttribute(String attName, Object value) {
+  protected Object checkAttribute(String attName, Object value) {
     // first check to see if this attribute is modifiable, this also checks if the attribute is a valid one.
     if (!isAttributeModifiable(attName)) {
       throw new UnmodifiableException(_getUnmodifiableMsg(attName));
@@ -67,7 +67,7 @@ public abstract class AbstractDistributionConfig extends AbstractConfig implemen
     if (attribute == null) {
       // isAttributeModifiable already checks the validity of the attName, if reached here, then they
       // must be those special attributes that starts with ssl_system_props or sys_props, no further checking needed
-      return;
+      return value;
     }
     // for integer attribute, do the range check.
     if (attribute.type().equals(Integer.class)) {
@@ -77,12 +77,12 @@ public abstract class AbstractDistributionConfig extends AbstractConfig implemen
 
     Method checker = checkers.get(attName);
     if (checker == null) {
-      return;
+      return value;
     }
 
     // if specific checker exists for this attribute, call that with the value
     try {
-      checker.invoke(this, value);
+      return checker.invoke(this, value);
     } catch (Exception e) {
       if (e instanceof RuntimeException) {
         throw (RuntimeException) e;
@@ -496,13 +496,11 @@ public abstract class AbstractDistributionConfig extends AbstractConfig implemen
     return value;
   }
 
-
-
   /**
    * First check if sslComponents are in the list of valid components. If so, check that no other *-ssl-* properties other than cluster-ssl-* are set.
    * This would mean one is mixing the "old" with the "new"
    */
-  @ConfigAttributeChecker(name=SECURITY_ENABLED_COMPONENTS)
+  @ConfigAttributeChecker(name = SECURITY_ENABLED_COMPONENTS)
   protected String checkSecurityEnabledComponents(String value) {
     // value with no commas
     // empty value
@@ -515,7 +513,7 @@ public abstract class AbstractDistributionConfig extends AbstractConfig implemen
       return value;
     }
     StringTokenizer stringTokenizer = new StringTokenizer(value, ",");
-    while (stringTokenizer.hasMoreTokens()){
+    while (stringTokenizer.hasMoreTokens()) {
       SecurableComponent.getEnum(stringTokenizer.nextToken());
     }
     return value;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/d3fbfbdf/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/RuntimeDistributionConfigImpl.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/RuntimeDistributionConfigImpl.java b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/RuntimeDistributionConfigImpl.java
index 515e5df..c1384c3 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/RuntimeDistributionConfigImpl.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/RuntimeDistributionConfigImpl.java
@@ -61,7 +61,7 @@ public final class RuntimeDistributionConfigImpl
   ////////////////////  Configuration Methods  ////////////////////
   @Override
   public void setLogLevel(int value) {
-    this.logLevel = value;
+    this.logLevel = (Integer)checkAttribute(LOG_LEVEL, value);
     getAttSourceMap().put(LOG_LEVEL, ConfigSource.runtime());
     this.ds.getInternalLogWriter().setLogWriterLevel(value);
     LogWriterAppenders.configChanged(LogWriterAppenders.Identifier.MAIN);
@@ -69,12 +69,13 @@ public final class RuntimeDistributionConfigImpl
   
   @Override
   public void setStatisticSamplingEnabled(boolean value) {
-    this.statisticSamplingEnabled = value;
+    this.statisticSamplingEnabled = (Boolean)checkAttribute(STATISTIC_SAMPLING_ENABLED, value);
     getAttSourceMap().put(STATISTIC_SAMPLING_ENABLED, ConfigSource.runtime());
   }
 
   @Override
   public void setStatisticSampleRate(int value) {
+    value = (Integer)checkAttribute(STATISTIC_SAMPLE_RATE, value);
     if (value < DEFAULT_STATISTIC_SAMPLE_RATE) {
       // fix 48228
       this.ds.getLogWriter().info("Setting statistic-sample-rate to " + DEFAULT_STATISTIC_SAMPLE_RATE + " instead of the requested " + value + " because VSD does not work with sub-second sampling.");
@@ -85,6 +86,7 @@ public final class RuntimeDistributionConfigImpl
 
   @Override
   public void setStatisticArchiveFile(File value) {
+    value = (File)checkAttribute(STATISTIC_ARCHIVE_FILE, value);
     if (value == null) {
       value = new File("");
     }
@@ -100,26 +102,26 @@ public final class RuntimeDistributionConfigImpl
 
   @Override
   public void setArchiveDiskSpaceLimit(int value) {
-    this.archiveDiskSpaceLimit = value;
+    this.archiveDiskSpaceLimit = (Integer)checkAttribute(ARCHIVE_DISK_SPACE_LIMIT, value);
     getAttSourceMap().put(ARCHIVE_DISK_SPACE_LIMIT, ConfigSource.runtime());
   }
 
   @Override
   public void setArchiveFileSizeLimit(int value) {
-    this.archiveFileSizeLimit = value;
+    this.archiveFileSizeLimit = (Integer)checkAttribute(ARCHIVE_FILE_SIZE_LIMIT, value);
     getAttSourceMap().put(ARCHIVE_FILE_SIZE_LIMIT, ConfigSource.runtime());
   }
 
   @Override
   public void setLogDiskSpaceLimit(int value) {
-    this.logDiskSpaceLimit = value;
+    this.logDiskSpaceLimit = (Integer)checkAttribute(LOG_DISK_SPACE_LIMIT, value);
     getAttSourceMap().put(LOG_DISK_SPACE_LIMIT, ConfigSource.runtime());
     LogWriterAppenders.configChanged(LogWriterAppenders.Identifier.MAIN);
   }
 
   @Override
   public void setLogFileSizeLimit(int value) {
-    this.logFileSizeLimit = value;
+    this.logFileSizeLimit = (Integer)checkAttribute(LOG_FILE_SIZE_LIMIT, value);
     getAttSourceMap().put(LOG_FILE_SIZE_LIMIT, ConfigSource.runtime());
     LogWriterAppenders.configChanged(LogWriterAppenders.Identifier.MAIN);
   }


[06/50] [abbrv] incubator-geode git commit: GEODE-1792: Changed protocols and ciphers to be comma separated Make ssl-ciphers and ssl-protocols comma separated properties. The legacy *-ssl-ciphers and *-ssl-protocols still use space separated.

Posted by ud...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/80731e54/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionConfig.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionConfig.java b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionConfig.java
index 3f60778..e92d0b6 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionConfig.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionConfig.java
@@ -850,7 +850,7 @@ public interface DistributionConfig extends Config, LogConfig {
    */
   @Deprecated
   @ConfigAttributeGetter(name = CLUSTER_SSL_PROTOCOLS)
-  String getClusterSSLProtocols();
+  String[] getClusterSSLProtocols();
 
   /**
    * Sets the value of the {@link ConfigurationProperties#CLUSTER_SSL_PROTOCOLS}
@@ -858,7 +858,7 @@ public interface DistributionConfig extends Config, LogConfig {
    */
   @Deprecated
   @ConfigAttributeSetter(name = CLUSTER_SSL_PROTOCOLS)
-  void setClusterSSLProtocols(String protocols);
+  void setClusterSSLProtocols(String[] protocols);
 
   /**
    * The default {@link ConfigurationProperties#CLUSTER_SSL_PROTOCOLS} value.
@@ -870,7 +870,7 @@ public interface DistributionConfig extends Config, LogConfig {
    * The name of the {@link ConfigurationProperties#CLUSTER_SSL_PROTOCOLS} property
    */
   @Deprecated
-  @ConfigAttribute(type = String.class)
+  @ConfigAttribute(type = String[].class)
   String CLUSTER_SSL_PROTOCOLS_NAME = CLUSTER_SSL_PROTOCOLS;
 
   /**
@@ -879,7 +879,7 @@ public interface DistributionConfig extends Config, LogConfig {
    */
   @Deprecated
   @ConfigAttributeGetter(name = CLUSTER_SSL_CIPHERS)
-  String getClusterSSLCiphers();
+  String[] getClusterSSLCiphers();
 
   /**
    * Sets the value of the {@link ConfigurationProperties#CLUSTER_SSL_CIPHERS}
@@ -887,7 +887,7 @@ public interface DistributionConfig extends Config, LogConfig {
    */
   @Deprecated
   @ConfigAttributeSetter(name = CLUSTER_SSL_CIPHERS)
-  void setClusterSSLCiphers(String ciphers);
+  void setClusterSSLCiphers(String[] ciphers);
 
   /**
    * The default {@link ConfigurationProperties#CLUSTER_SSL_CIPHERS} value.
@@ -899,7 +899,7 @@ public interface DistributionConfig extends Config, LogConfig {
    * The name of the {@link ConfigurationProperties#CLUSTER_SSL_CIPHERS} property
    */
   @Deprecated
-  @ConfigAttribute(type = String.class)
+  @ConfigAttribute(type = String[].class)
   String CLUSTER_SSL_CIPHERS_NAME = CLUSTER_SSL_CIPHERS;
 
   /**
@@ -2592,16 +2592,16 @@ public interface DistributionConfig extends Config, LogConfig {
    */
   @Deprecated
   @ConfigAttributeGetter(name = JMX_MANAGER_SSL_PROTOCOLS)
-  String getJmxManagerSSLProtocols();
+  String[] getJmxManagerSSLProtocols();
 
   /**
    * Sets the value of the {@link ConfigurationProperties#JMX_MANAGER_SSL_PROTOCOLS}
    * property.
-   * @deprecated Geode 1.0 use {@link #setClusterSSLProtocols(String)}
+   * @deprecated Geode 1.0 use {@link #setClusterSSLProtocols(String[])}
    */
   @Deprecated
   @ConfigAttributeSetter(name = JMX_MANAGER_SSL_PROTOCOLS)
-  void setJmxManagerSSLProtocols(String protocols);
+  void setJmxManagerSSLProtocols(String[] protocols);
 
   /**
    * The default {@link ConfigurationProperties#JMX_MANAGER_SSL_PROTOCOLS} value.
@@ -2616,7 +2616,7 @@ public interface DistributionConfig extends Config, LogConfig {
    * @deprecated Geode 1.0 use {@link com.gemstone.gemfire.distributed.ConfigurationProperties#CLUSTER_SSL_PROTOCOLS}
    */
   @Deprecated
-  @ConfigAttribute(type = String.class)
+  @ConfigAttribute(type = String[].class)
   String JMX_MANAGER_SSL_PROTOCOLS_NAME = JMX_MANAGER_SSL_PROTOCOLS;
 
   /**
@@ -2626,16 +2626,16 @@ public interface DistributionConfig extends Config, LogConfig {
    */
   @Deprecated
   @ConfigAttributeGetter(name = JMX_MANAGER_SSL_CIPHERS)
-  String getJmxManagerSSLCiphers();
+  String[] getJmxManagerSSLCiphers();
 
   /**
    * Sets the value of the {@link ConfigurationProperties#JMX_MANAGER_SSL_CIPHERS}
    * property.
-   * @deprecated Geode 1.0 use {@link #setClusterSSLCiphers(String)}
+   * @deprecated Geode 1.0 use {@link #setClusterSSLCiphers(String[])}
    */
   @Deprecated
   @ConfigAttributeSetter(name = JMX_MANAGER_SSL_CIPHERS)
-  void setJmxManagerSSLCiphers(String ciphers);
+  void setJmxManagerSSLCiphers(String[] ciphers);
 
   /**
    * The default {@link ConfigurationProperties#JMX_MANAGER_SSL_CIPHERS} value.
@@ -2650,7 +2650,7 @@ public interface DistributionConfig extends Config, LogConfig {
    * @deprecated Geode 1.0 use {@link com.gemstone.gemfire.distributed.ConfigurationProperties#CLUSTER_SSL_CIPHERS}
    */
   @Deprecated
-  @ConfigAttribute(type = String.class)
+  @ConfigAttribute(type = String[].class)
   String JMX_MANAGER_SSL_CIPHERS_NAME = JMX_MANAGER_SSL_CIPHERS;
 
   /**
@@ -3209,16 +3209,16 @@ public interface DistributionConfig extends Config, LogConfig {
    */
   @Deprecated
   @ConfigAttributeGetter(name = HTTP_SERVICE_SSL_PROTOCOLS)
-  String getHttpServiceSSLProtocols();
+  String[] getHttpServiceSSLProtocols();
 
   /**
    * Sets the value of the {@link ConfigurationProperties#HTTP_SERVICE_SSL_PROTOCOLS}
    * property.
-   * @deprecated Geode 1.0 use {@link #setClusterSSLProtocols(String)}
+   * @deprecated Geode 1.0 use {@link #setClusterSSLProtocols(String[])}
    */
   @Deprecated
   @ConfigAttributeSetter(name = HTTP_SERVICE_SSL_PROTOCOLS)
-  void setHttpServiceSSLProtocols(String protocols);
+  void setHttpServiceSSLProtocols(String[] protocols);
 
   /**
    * The default {@link ConfigurationProperties#HTTP_SERVICE_SSL_PROTOCOLS} value.
@@ -3234,7 +3234,7 @@ public interface DistributionConfig extends Config, LogConfig {
    * @deprecated Geode 1.0 use {@link com.gemstone.gemfire.distributed.ConfigurationProperties#CLUSTER_SSL_PROTOCOLS}
    */
   @Deprecated
-  @ConfigAttribute(type = String.class)
+  @ConfigAttribute(type = String[].class)
   String HTTP_SERVICE_SSL_PROTOCOLS_NAME = HTTP_SERVICE_SSL_PROTOCOLS;
 
   /**
@@ -3244,16 +3244,16 @@ public interface DistributionConfig extends Config, LogConfig {
    */
   @Deprecated
   @ConfigAttributeGetter(name = HTTP_SERVICE_SSL_CIPHERS)
-  String getHttpServiceSSLCiphers();
+  String[] getHttpServiceSSLCiphers();
 
   /**
    * Sets the value of the {@link ConfigurationProperties#HTTP_SERVICE_SSL_CIPHERS}
    * property.
-   * @deprecated Geode 1.0 use {@link #setClusterSSLCiphers(String)}
+   * @deprecated Geode 1.0 use {@link #setClusterSSLCiphers(String[])}
    */
   @Deprecated
   @ConfigAttributeSetter(name = HTTP_SERVICE_SSL_CIPHERS)
-  void setHttpServiceSSLCiphers(String ciphers);
+  void setHttpServiceSSLCiphers(String[] ciphers);
 
   /**
    * The default {@link ConfigurationProperties#HTTP_SERVICE_SSL_CIPHERS} value.
@@ -3269,7 +3269,7 @@ public interface DistributionConfig extends Config, LogConfig {
    * @deprecated Geode 1.0 use {@link com.gemstone.gemfire.distributed.ConfigurationProperties#CLUSTER_SSL_CIPHERS}
    */
   @Deprecated
-  @ConfigAttribute(type = String.class)
+  @ConfigAttribute(type = String[].class)
   String HTTP_SERVICE_SSL_CIPHERS_NAME = HTTP_SERVICE_SSL_CIPHERS;
 
   /**
@@ -3565,14 +3565,14 @@ public interface DistributionConfig extends Config, LogConfig {
    */
   @Deprecated
   @ConfigAttributeGetter(name = SERVER_SSL_PROTOCOLS)
-  String getServerSSLProtocols();
+  String[] getServerSSLProtocols();
 
   /**
    * Sets the value of the {@link ConfigurationProperties#SERVER_SSL_PROTOCOLS}
    * property.
    */
   @ConfigAttributeSetter(name = SERVER_SSL_PROTOCOLS)
-  void setServerSSLProtocols(String protocols);
+  void setServerSSLProtocols(String[] protocols);
 
   /**
    * The default {@link ConfigurationProperties#SERVER_SSL_PROTOCOLS} value.
@@ -3587,7 +3587,7 @@ public interface DistributionConfig extends Config, LogConfig {
    * @deprecated Geode 1.0 use {@link com.gemstone.gemfire.distributed.ConfigurationProperties#CLUSTER_SSL_PROTOCOLS}
    */
   @Deprecated
-  @ConfigAttribute(type = String.class)
+  @ConfigAttribute(type = String[].class)
   String SERVER_SSL_PROTOCOLS_NAME = SERVER_SSL_PROTOCOLS;
 
   /**
@@ -3597,16 +3597,16 @@ public interface DistributionConfig extends Config, LogConfig {
    */
   @Deprecated
   @ConfigAttributeGetter(name = SERVER_SSL_CIPHERS)
-  String getServerSSLCiphers();
+  String[] getServerSSLCiphers();
 
   /**
    * Sets the value of the {@link ConfigurationProperties#SERVER_SSL_CIPHERS}
    * property.
-   * @deprecated Geode 1.0 use {@link #setClusterSSLCiphers(String)}�
+   * @deprecated Geode 1.0 use {@link #setClusterSSLCiphers(String[])}�
    */
   @Deprecated
   @ConfigAttributeSetter(name = SERVER_SSL_CIPHERS)
-  void setServerSSLCiphers(String ciphers);
+  void setServerSSLCiphers(String[] ciphers);
 
   /**
    * The default {@link ConfigurationProperties#SERVER_SSL_CIPHERS} value.
@@ -3621,7 +3621,7 @@ public interface DistributionConfig extends Config, LogConfig {
    * @deprecated Geode 1.0 use {@link com.gemstone.gemfire.distributed.ConfigurationProperties#CLUSTER_SSL_CIPHERS}�
    */
   @Deprecated
-  @ConfigAttribute(type = String.class)
+  @ConfigAttribute(type = String[].class)
   String SERVER_SSL_CIPHERS_NAME = SERVER_SSL_CIPHERS;
 
   /**
@@ -3873,7 +3873,7 @@ public interface DistributionConfig extends Config, LogConfig {
    */
   @Deprecated
   @ConfigAttributeGetter(name = GATEWAY_SSL_PROTOCOLS)
-  String getGatewaySSLProtocols();
+  String[] getGatewaySSLProtocols();
 
   /**
    * Sets the value of the {@link ConfigurationProperties#GATEWAY_SSL_PROTOCOLS}
@@ -3882,7 +3882,7 @@ public interface DistributionConfig extends Config, LogConfig {
    */
   @Deprecated
   @ConfigAttributeSetter(name = GATEWAY_SSL_PROTOCOLS)
-  void setGatewaySSLProtocols(String protocols);
+  void setGatewaySSLProtocols(String[] protocols);
 
   /**
    * The default {@link ConfigurationProperties#GATEWAY_SSL_PROTOCOLS} value.
@@ -3896,7 +3896,7 @@ public interface DistributionConfig extends Config, LogConfig {
    * @deprecated Geode 1.0 use {@link com.gemstone.gemfire.distributed.ConfigurationProperties#CLUSTER_SSL_PROTOCOLS}
    */
   @Deprecated
-  @ConfigAttribute(type = String.class)
+  @ConfigAttribute(type = String[].class)
   String GATEWAY_SSL_PROTOCOLS_NAME = GATEWAY_SSL_PROTOCOLS;
 
   /**
@@ -3906,16 +3906,16 @@ public interface DistributionConfig extends Config, LogConfig {
    */
   @Deprecated
   @ConfigAttributeGetter(name = GATEWAY_SSL_CIPHERS)
-  String getGatewaySSLCiphers();
+  String[] getGatewaySSLCiphers();
 
   /**
    * Sets the value of the {@link ConfigurationProperties#GATEWAY_SSL_CIPHERS}
    * property.
-   * @deprecated Geode 1.0 use {@link #setClusterSSLCiphers(String)}�
+   * @deprecated Geode 1.0 use {@link #setClusterSSLCiphers(String[])}�
    */
   @Deprecated
   @ConfigAttributeSetter(name = GATEWAY_SSL_CIPHERS)
-  void setGatewaySSLCiphers(String ciphers);
+  void setGatewaySSLCiphers(String[] ciphers);
 
   /**
    * The default {@link ConfigurationProperties#GATEWAY_SSL_CIPHERS} value.
@@ -3929,7 +3929,7 @@ public interface DistributionConfig extends Config, LogConfig {
    * @deprecated Geode 1.0 use {@link com.gemstone.gemfire.distributed.ConfigurationProperties#CLUSTER_SSL_CIPHERS}�
    */
   @Deprecated
-  @ConfigAttribute(type = String.class)
+  @ConfigAttribute(type = String[].class)
   String GATEWAY_SSL_CIPHERS_NAME = GATEWAY_SSL_CIPHERS;
 
   /**
@@ -4365,19 +4365,19 @@ public interface DistributionConfig extends Config, LogConfig {
    * property.
    */
   @ConfigAttributeGetter(name = SSL_PROTOCOLS)
-  String getSSLProtocols();
+  String[] getSSLProtocols();
 
   /**
    * Sets the value of the {@link ConfigurationProperties#SSL_PROTOCOLS}
    * property.
    */
   @ConfigAttributeSetter(name = SSL_PROTOCOLS)
-  void setSSLProtocols(String protocols);
+  void setSSLProtocols(String[] protocols);
 
   /**
    * The name of the {@link ConfigurationProperties#SSL_PROTOCOLS} property
    */
-  @ConfigAttribute(type = String.class)
+  @ConfigAttribute(type = String[].class)
   String SSL_PROTOCOLS_NAME = SSL_PROTOCOLS;
 
   /**
@@ -4385,19 +4385,19 @@ public interface DistributionConfig extends Config, LogConfig {
    * property.
    */
   @ConfigAttributeGetter(name = SSL_CIPHERS)
-  String getSSLCiphers();
+  String[] getSSLCiphers();
 
   /**
    * Sets the value of the {@link ConfigurationProperties#SSL_CIPHERS}
    * property.
    */
   @ConfigAttributeSetter(name = SSL_CIPHERS)
-  void setSSLCiphers(String ciphers);
+  void setSSLCiphers(String[] ciphers);
 
   /**
    * The name of the {@link ConfigurationProperties#SSL_CIPHERS} property
    */
-  @ConfigAttribute(type = String.class)
+  @ConfigAttribute(type = String[].class)
   String SSL_CIPHERS_NAME = SSL_CIPHERS;
 
   /**

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/80731e54/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionConfigImpl.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionConfigImpl.java b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionConfigImpl.java
index a5a9aa6..942322b 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionConfigImpl.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionConfigImpl.java
@@ -48,6 +48,7 @@ import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
 import com.gemstone.gemfire.internal.net.SSLEnabledComponent;
 import com.gemstone.gemfire.internal.net.SocketCreator;
 import com.gemstone.gemfire.internal.process.ProcessLauncherContext;
+import com.gemstone.gemfire.management.internal.SSLUtil;
 import com.gemstone.gemfire.memcached.GemFireMemcachedServer;
 
 /**
@@ -183,9 +184,9 @@ public class DistributionConfigImpl extends AbstractDistributionConfig implement
   @Deprecated
   private boolean clusterSSLEnabled = DEFAULT_SSL_ENABLED;
   @Deprecated
-  private String clusterSSLProtocols = DEFAULT_SSL_PROTOCOLS;
+  private String[] clusterSSLProtocols = new String[] { DEFAULT_SSL_PROTOCOLS };
   @Deprecated
-  private String clusterSSLCiphers = DEFAULT_SSL_CIPHERS;
+  private String[] clusterSSLCiphers = new String[] { DEFAULT_SSL_CIPHERS };
   @Deprecated
   private boolean clusterSSLRequireAuthentication = DEFAULT_SSL_REQUIRE_AUTHENTICATION;
   @Deprecated
@@ -458,9 +459,9 @@ public class DistributionConfigImpl extends AbstractDistributionConfig implement
   @Deprecated
   private boolean jmxManagerSslRequireAuthentication = DEFAULT_JMX_MANAGER_SSL_REQUIRE_AUTHENTICATION;
   @Deprecated
-  private String jmxManagerSslProtocols = DEFAULT_JMX_MANAGER_SSL_PROTOCOLS;
+  private String[] jmxManagerSslProtocols = new String[] { DEFAULT_JMX_MANAGER_SSL_PROTOCOLS };
   @Deprecated
-  private String jmxManagerSslCiphers = DEFAULT_JMX_MANAGER_SSL_CIPHERS;
+  private String[] jmxManagerSslCiphers = new String[] { DEFAULT_JMX_MANAGER_SSL_CIPHERS };
   @Deprecated
   private Properties jmxManagerSslProperties = new Properties();
   @Deprecated
@@ -481,9 +482,9 @@ public class DistributionConfigImpl extends AbstractDistributionConfig implement
   @Deprecated
   private boolean serverSslRequireAuthentication = DEFAULT_SERVER_SSL_REQUIRE_AUTHENTICATION;
   @Deprecated
-  private String serverSslProtocols = DEFAULT_SERVER_SSL_PROTOCOLS;
+  private String[] serverSslProtocols = new String[] { DEFAULT_SERVER_SSL_PROTOCOLS };
   @Deprecated
-  private String serverSslCiphers = DEFAULT_SERVER_SSL_CIPHERS;
+  private String[] serverSslCiphers = new String[] { DEFAULT_SERVER_SSL_CIPHERS };
   @Deprecated
   private Properties serverSslProperties = new Properties();
   @Deprecated
@@ -504,9 +505,9 @@ public class DistributionConfigImpl extends AbstractDistributionConfig implement
   @Deprecated
   private boolean gatewaySslRequireAuthentication = DEFAULT_GATEWAY_SSL_REQUIRE_AUTHENTICATION;
   @Deprecated
-  private String gatewaySslProtocols = DEFAULT_GATEWAY_SSL_PROTOCOLS;
+  private String[] gatewaySslProtocols = new String[] { DEFAULT_GATEWAY_SSL_PROTOCOLS };
   @Deprecated
-  private String gatewaySslCiphers = DEFAULT_GATEWAY_SSL_CIPHERS;
+  private String[] gatewaySslCiphers = new String[] { DEFAULT_GATEWAY_SSL_CIPHERS };
   @Deprecated
   private Properties gatewaySslProperties = new Properties();
   @Deprecated
@@ -528,9 +529,9 @@ public class DistributionConfigImpl extends AbstractDistributionConfig implement
   @Deprecated
   private boolean httpServiceSSLRequireAuthentication = DEFAULT_HTTP_SERVICE_SSL_REQUIRE_AUTHENTICATION;
   @Deprecated
-  private String httpServiceSSLProtocols = DEFAULT_HTTP_SERVICE_SSL_PROTOCOLS;
+  private String[] httpServiceSSLProtocols = new String[] { DEFAULT_HTTP_SERVICE_SSL_PROTOCOLS };
   @Deprecated
-  private String httpServiceSSLCiphers = DEFAULT_HTTP_SERVICE_SSL_CIPHERS;
+  private String[] httpServiceSSLCiphers = new String[] { DEFAULT_HTTP_SERVICE_SSL_CIPHERS };
   @Deprecated
   private Properties httpServiceSSLProperties = new Properties();
   @Deprecated
@@ -548,8 +549,8 @@ public class DistributionConfigImpl extends AbstractDistributionConfig implement
 
   private SSLEnabledComponent[] sslEnabledComponents = DEFAULT_SSL_ENABLED_COMPONENTS;
 
-  private String sslProtocols = DEFAULT_SSL_PROTOCOLS;
-  private String sslCiphers = DEFAULT_SSL_CIPHERS;
+  private String[] sslProtocols = new String[] { DEFAULT_SSL_PROTOCOLS };
+  private String[] sslCiphers = new String[] { DEFAULT_SSL_CIPHERS };
   private boolean sslRequireAuthentication = DEFAULT_SSL_REQUIRE_AUTHENTICATION;
   private String sslKeyStore = DEFAULT_SSL_KEYSTORE;
   private String sslKeyStoreType = DEFAULT_CLUSTER_SSL_KEYSTORE_TYPE;
@@ -1457,8 +1458,13 @@ public class DistributionConfigImpl extends AbstractDistributionConfig implement
         continue;
       }
       Object propVal = me.getValue();
-      if (propVal != null && (propVal instanceof String)) { // weed out extraneous non-string properties
-        this.setAttribute(propName, ((String) propVal).trim(), this.sourceMap.get(propName));
+      if (isLegacySSLCipherOrProtocol(propName)) {
+        propVal = SSLUtil.stringToArray((String) propVal);
+        setAttributeObject(propName, propVal, this.sourceMap.get(propName));
+      } else {
+        if (propVal != null && (propVal instanceof String)) { // weed out extraneous non-string properties
+          this.setAttribute(propName, ((String) propVal).trim(), this.sourceMap.get(propName));
+        }
       }
     }
     if (props.containsKey(CLUSTER_SSL_ENABLED)) {
@@ -1477,6 +1483,15 @@ public class DistributionConfigImpl extends AbstractDistributionConfig implement
     this.modifiable = false;
   }
 
+  private boolean isLegacySSLCipherOrProtocol(final String propName) {
+    if (propName.contains("-ciphers") || propName.contains("-protocols")) {
+      if (!ConfigurationProperties.SSL_CIPHERS.equals(propName) && !ConfigurationProperties.SSL_PROTOCOLS.equals(propName)) {
+        return true;
+      }
+    }
+    return false;
+  }
+
   public void close() {
     // Clear the extra stuff from System properties
     Properties props = System.getProperties();
@@ -1623,11 +1638,11 @@ public class DistributionConfigImpl extends AbstractDistributionConfig implement
     return this.clusterSSLEnabled;
   }
 
-  public String getClusterSSLProtocols() {
+  public String[] getClusterSSLProtocols() {
     return this.clusterSSLProtocols;
   }
 
-  public String getClusterSSLCiphers() {
+  public String[] getClusterSSLCiphers() {
     return this.clusterSSLCiphers;
   }
 
@@ -1903,12 +1918,12 @@ public class DistributionConfigImpl extends AbstractDistributionConfig implement
     this.clusterSSLEnabled = (Boolean) value;
   }
 
-  public void setClusterSSLProtocols(String value) {
-    this.clusterSSLProtocols = (String) value;
+  public void setClusterSSLProtocols(String[] value) {
+    this.clusterSSLProtocols = value;
   }
 
-  public void setClusterSSLCiphers(String value) {
-    this.clusterSSLCiphers = (String) value;
+  public void setClusterSSLCiphers(String[] value) {
+    this.clusterSSLCiphers = value;
   }
 
   public void setClusterSSLRequireAuthentication(boolean value) {
@@ -2313,22 +2328,22 @@ public class DistributionConfigImpl extends AbstractDistributionConfig implement
   }
 
   @Override
-  public String getJmxManagerSSLProtocols() {
+  public String[] getJmxManagerSSLProtocols() {
     return this.jmxManagerSslProtocols;
   }
 
   @Override
-  public void setJmxManagerSSLProtocols(String protocols) {
+  public void setJmxManagerSSLProtocols(String[] protocols) {
     this.jmxManagerSslProtocols = protocols;
   }
 
   @Override
-  public String getJmxManagerSSLCiphers() {
+  public String[] getJmxManagerSSLCiphers() {
     return this.jmxManagerSslCiphers;
   }
 
   @Override
-  public void setJmxManagerSSLCiphers(String ciphers) {
+  public void setJmxManagerSSLCiphers(String[] ciphers) {
     this.jmxManagerSslCiphers = ciphers;
   }
 
@@ -2555,22 +2570,22 @@ public class DistributionConfigImpl extends AbstractDistributionConfig implement
   }
 
   @Override
-  public String getSSLProtocols() {
+  public String[] getSSLProtocols() {
     return sslProtocols;
   }
 
   @Override
-  public void setSSLProtocols(final String sslProtocols) {
+  public void setSSLProtocols(final String[] sslProtocols) {
     this.sslProtocols = sslProtocols;
   }
 
   @Override
-  public String getSSLCiphers() {
+  public String[] getSSLCiphers() {
     return sslCiphers;
   }
 
   @Override
-  public void setSSLCiphers(final String sslCiphers) {
+  public void setSSLCiphers(final String[] sslCiphers) {
     this.sslCiphers = sslCiphers;
   }
 
@@ -3723,23 +3738,23 @@ public class DistributionConfigImpl extends AbstractDistributionConfig implement
   }
 
   @Override
-  public String getServerSSLProtocols() {
+  public String[] getServerSSLProtocols() {
     return this.serverSslProtocols;
   }
 
   @Override
-  public void setServerSSLProtocols(String protocols) {
-    this.serverSslProtocols = (String) protocols;
+  public void setServerSSLProtocols(String[] protocols) {
+    this.serverSslProtocols = protocols;
   }
 
   @Override
-  public String getServerSSLCiphers() {
+  public String[] getServerSSLCiphers() {
     return this.serverSslCiphers;
   }
 
   @Override
-  public void setServerSSLCiphers(String ciphers) {
-    this.serverSslCiphers = (String) ciphers;
+  public void setServerSSLCiphers(String[] ciphers) {
+    this.serverSslCiphers = ciphers;
   }
 
   public void setServerSSLKeyStore(String value) {
@@ -3814,23 +3829,23 @@ public class DistributionConfigImpl extends AbstractDistributionConfig implement
   }
 
   @Override
-  public String getGatewaySSLProtocols() {
+  public String[] getGatewaySSLProtocols() {
     return this.gatewaySslProtocols;
   }
 
   @Override
-  public void setGatewaySSLProtocols(String protocols) {
-    this.gatewaySslProtocols = (String) protocols;
+  public void setGatewaySSLProtocols(String[] protocols) {
+    this.gatewaySslProtocols = protocols;
   }
 
   @Override
-  public String getGatewaySSLCiphers() {
+  public String[] getGatewaySSLCiphers() {
     return this.gatewaySslCiphers;
   }
 
   @Override
-  public void setGatewaySSLCiphers(String ciphers) {
-    this.gatewaySslCiphers = (String) ciphers;
+  public void setGatewaySSLCiphers(String[] ciphers) {
+    this.gatewaySslCiphers = ciphers;
   }
 
   public void setGatewaySSLKeyStore(String value) {
@@ -3905,22 +3920,22 @@ public class DistributionConfigImpl extends AbstractDistributionConfig implement
   }
 
   @Override
-  public String getHttpServiceSSLProtocols() {
+  public String[] getHttpServiceSSLProtocols() {
     return httpServiceSSLProtocols;
   }
 
   @Override
-  public void setHttpServiceSSLProtocols(String httpServiceSSLProtocols) {
+  public void setHttpServiceSSLProtocols(String[] httpServiceSSLProtocols) {
     this.httpServiceSSLProtocols = httpServiceSSLProtocols;
   }
 
   @Override
-  public String getHttpServiceSSLCiphers() {
+  public String[] getHttpServiceSSLCiphers() {
     return httpServiceSSLCiphers;
   }
 
   @Override
-  public void setHttpServiceSSLCiphers(String httpServiceSSLCiphers) {
+  public void setHttpServiceSSLCiphers(String[] httpServiceSSLCiphers) {
     this.httpServiceSSLCiphers = httpServiceSSLCiphers;
   }
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/80731e54/geode-core/src/main/java/com/gemstone/gemfire/internal/admin/SSLConfig.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/admin/SSLConfig.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/admin/SSLConfig.java
index ebf3a7e..e3032c4 100755
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/admin/SSLConfig.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/admin/SSLConfig.java
@@ -31,8 +31,8 @@ import com.gemstone.gemfire.management.internal.SSLUtil;
 public class SSLConfig {
 
   private boolean enabled = DistributionConfig.DEFAULT_SSL_ENABLED;
-  private String protocols = DistributionConfig.DEFAULT_SSL_PROTOCOLS;
-  private String ciphers = DistributionConfig.DEFAULT_SSL_CIPHERS;
+  private String[] protocols = new String[] { DistributionConfig.DEFAULT_SSL_PROTOCOLS };
+  private String[] ciphers = new String[] { DistributionConfig.DEFAULT_SSL_CIPHERS };
   private boolean requireAuth = DistributionConfig.DEFAULT_SSL_REQUIRE_AUTHENTICATION;
   private String keystore = DistributionConfig.DEFAULT_SSL_KEYSTORE;
   private String keystoreType = DistributionConfig.DEFAULT_CLUSTER_SSL_KEYSTORE_TYPE;
@@ -108,27 +108,19 @@ public class SSLConfig {
     this.enabled = enabled;
   }
 
-  public String getProtocols() {
+  public String[] getProtocols() {
     return this.protocols;
   }
 
-  public String[] getProtocolsAsStringArray() {
-    return SSLUtil.readArray(this.protocols);
-  }
-
-  public void setProtocols(String protocols) {
+  public void setProtocols(String[] protocols) {
     this.protocols = protocols;
   }
 
-  public String getCiphers() {
+  public String[] getCiphers() {
     return this.ciphers;
   }
 
-  public String[] getCiphersAsStringArray() {
-    return SSLUtil.readArray(this.ciphers);
-  }
-
-  public void setCiphers(String ciphers) {
+  public void setCiphers(String[] ciphers) {
     this.ciphers = ciphers;
   }
 
@@ -149,7 +141,6 @@ public class SSLConfig {
   }
 
 
-
   public Properties getProperties() {
     return this.properties;
   }
@@ -186,8 +177,8 @@ public class SSLConfig {
     props.setProperty(CLUSTER_SSL_ENABLED, String.valueOf(this.enabled));
 
     if (this.enabled) {
-      props.setProperty(CLUSTER_SSL_PROTOCOLS, this.protocols);
-      props.setProperty(CLUSTER_SSL_CIPHERS, this.ciphers);
+      props.setProperty(CLUSTER_SSL_PROTOCOLS, SSLUtil.arrayToSpaceDelimitedString(this.protocols));
+      props.setProperty(CLUSTER_SSL_CIPHERS, SSLUtil.arrayToSpaceDelimitedString(this.ciphers));
       props.setProperty(CLUSTER_SSL_REQUIRE_AUTHENTICATION, String.valueOf(this.requireAuth));
     }
   }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/80731e54/geode-core/src/main/java/com/gemstone/gemfire/internal/net/SSLConfigurationFactory.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/net/SSLConfigurationFactory.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/net/SSLConfigurationFactory.java
index 33378b8..66fba7e 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/net/SSLConfigurationFactory.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/net/SSLConfigurationFactory.java
@@ -27,6 +27,7 @@ import org.springframework.util.StringUtils;
 import com.gemstone.gemfire.distributed.internal.DistributionConfig;
 import com.gemstone.gemfire.distributed.internal.DistributionConfigImpl;
 import com.gemstone.gemfire.internal.admin.SSLConfig;
+import com.gemstone.gemfire.management.internal.SSLUtil;
 
 public class SSLConfigurationFactory {
 
@@ -316,8 +317,8 @@ public class SSLConfigurationFactory {
                                                    final String alias) {
     SSLConfig sslConfig = new SSLConfig();
     sslConfig.setAlias(alias);
-    sslConfig.setCiphers(ciphers);
-    sslConfig.setProtocols(protocols);
+    sslConfig.setCiphers(SSLUtil.stringToArray(ciphers));
+    sslConfig.setProtocols(SSLUtil.stringToArray(protocols));
     sslConfig.setRequireAuth(needClientAuth);
     sslConfig.setEnabled(useSSL);
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/80731e54/geode-core/src/main/java/com/gemstone/gemfire/internal/net/SocketCreator.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/net/SocketCreator.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/net/SocketCreator.java
index a11733a..d361829 100755
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/net/SocketCreator.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/net/SocketCreator.java
@@ -440,7 +440,7 @@ public class SocketCreator {
   }
 
   private SSLContext getSSLContextInstance() {
-    String[] protocols = sslConfig.getProtocolsAsStringArray();
+    String[] protocols = sslConfig.getProtocols();
     SSLContext sslContext = null;
     if (protocols != null && protocols.length > 0) {
       for (String protocol : protocols) {
@@ -1019,11 +1019,11 @@ public class SocketCreator {
     serverSocket.setEnableSessionCreation(true);
 
     // restrict cyphers
-    String[] protocols = this.sslConfig.getProtocolsAsStringArray();
+    String[] protocols = this.sslConfig.getProtocols();
     if (!"any".equalsIgnoreCase(protocols[0])) {
       serverSocket.setEnabledProtocols(protocols);
     }
-    String[] ciphers = this.sslConfig.getCiphersAsStringArray();
+    String[] ciphers = this.sslConfig.getCiphers();
     if (!"any".equalsIgnoreCase(ciphers[0])) {
       serverSocket.setEnabledCipherSuites(ciphers);
     }
@@ -1040,13 +1040,13 @@ public class SocketCreator {
       sslSocket.setUseClientMode(true);
       sslSocket.setEnableSessionCreation(true);
 
-      String[] protocols = this.sslConfig.getProtocolsAsStringArray();
+      String[] protocols = this.sslConfig.getProtocols();
 
       // restrict cyphers
       if (protocols != null && !"any".equalsIgnoreCase(protocols[0])) {
         sslSocket.setEnabledProtocols(protocols);
       }
-      String[] ciphers = this.sslConfig.getCiphersAsStringArray();
+      String[] ciphers = this.sslConfig.getCiphers();
       if (ciphers != null && !"any".equalsIgnoreCase(ciphers[0])) {
         sslSocket.setEnabledCipherSuites(ciphers);
       }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/80731e54/geode-core/src/main/java/com/gemstone/gemfire/management/GemFireProperties.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/management/GemFireProperties.java b/geode-core/src/main/java/com/gemstone/gemfire/management/GemFireProperties.java
index 410d658..ed7e5b9 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/management/GemFireProperties.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/management/GemFireProperties.java
@@ -442,12 +442,12 @@ public class GemFireProperties {
    * @deprecated Geode 1.0 use {@link #clusterSSLProtocols}
    */
   @Deprecated
-  private String jmxManagerSSLProtocols;
+  private String[] jmxManagerSSLProtocols;
   /**
    * @deprecated Geode 1.0 use {@link #clusterSSLCiphers}
    */
   @Deprecated
-  private String jmxManagerSSLCiphers;
+  private String[] jmxManagerSSLCiphers;
   /**
    * @deprecated Geode 1.0 use {@link #clusterSSLRequireAuthentication}
    */
@@ -481,8 +481,8 @@ public class GemFireProperties {
   private String jmxManagerSSLAlias;
   
   private boolean clusterSSLEnabled;
-  private String clusterSSLProtocols;
-  private String clusterSSLCiphers;
+  private String[] clusterSSLProtocols;
+  private String[] clusterSSLCiphers;
   private boolean clusterSSLRequireAuthentication;
   private String clusterSSLKeyStore;
   private String clusterSSLKeyStoreType;
@@ -500,12 +500,12 @@ public class GemFireProperties {
    * @deprecated Geode 1.0 use {@link #clusterSSLProtocols}
    */
   @Deprecated
-  private String serverSSLProtocols;
+  private String[] serverSSLProtocols;
   /**
    * @deprecated Geode 1.0 use {@link #clusterSSLCiphers}
    */
   @Deprecated
-  private String serverSSLCiphers;
+  private String[] serverSSLCiphers;
   /**
    * @deprecated Geode 1.0 use {@link #clusterSSLRequireAuthentication}
    */
@@ -547,12 +547,12 @@ public class GemFireProperties {
    * @deprecated Geode 1.0 use {@link #clusterSSLProtocols}
    */
   @Deprecated
-  private String gatewaySSLProtocols;
+  private String[] gatewaySSLProtocols;
   /**
    * @deprecated Geode 1.0 use {@link #clusterSSLCiphers}
    */
   @Deprecated
-  private String gatewaySSLCiphers;
+  private String[] gatewaySSLCiphers;
   /**
    * @deprecated Geode 1.0 use {@link #clusterSSLRequireAuthentication}
    */
@@ -599,12 +599,12 @@ public class GemFireProperties {
    * @deprecated Geode 1.0 use {@link #clusterSSLProtocols}
    */
   @Deprecated
-  private String httpServiceSSLProtocols;
+  private String[] httpServiceSSLProtocols;
   /**
    * @deprecated Geode 1.0 use {@link #clusterSSLCiphers}
    */
   @Deprecated
-  private String httpServiceSSLCiphers;
+  private String[] httpServiceSSLCiphers;
   /**
    * @deprecated Geode 1.0 use {@link #clusterSSLKeyStore}
    */
@@ -1018,26 +1018,6 @@ public class GemFireProperties {
     
   }
 
-//  public void setSslEnabled(boolean sslEnabled) {
-//    this.sslEnabled = sslEnabled;
-//
-//  }
-//
-//  public void setSslCiphers(String sslCiphers) {
-//    this.sslCiphers = sslCiphers;
-//
-//  }
-//
-//  public void setSslProtocols(String sslProtocols) {
-//    this.sslProtocols = sslProtocols;
-//
-//  }
-//
-//  public void setSslRequireAuthentication(boolean sslRequireAuthentication) {
-//    this.sslRequireAuthentication = sslRequireAuthentication;
-//
-//  }
-
   public void setSocketLeaseTime(int socketLeaseTime) {
     this.socketLeaseTime = socketLeaseTime;
     
@@ -1358,19 +1338,19 @@ public class GemFireProperties {
     this.jmxManagerSSLEnabled = jmxManagerSSLEnabled;
   }
 
-  public String getJmxManagerSSLProtocols() {
+  public String[] getJmxManagerSSLProtocols() {
     return jmxManagerSSLProtocols;
   }
 
-  public void setJmxManagerSSLProtocols(String jmxManagerSSLProtocols) {
+  public void setJmxManagerSSLProtocols(String[] jmxManagerSSLProtocols) {
     this.jmxManagerSSLProtocols = jmxManagerSSLProtocols;
   }
 
-  public String getJmxManagerSSLCiphers() {
+  public String[] getJmxManagerSSLCiphers() {
     return jmxManagerSSLCiphers;
   }
 
-  public void setJmxManagerSSLCiphers(String jmxManagerSSLCiphers) {
+  public void setJmxManagerSSLCiphers(String[] jmxManagerSSLCiphers) {
     this.jmxManagerSSLCiphers = jmxManagerSSLCiphers;
   }
 
@@ -1431,19 +1411,19 @@ public class GemFireProperties {
     this.clusterSSLEnabled = clusterSSLEnabled;
   }
 
-  public String getClusterSSLProtocols() {
+  public String[] getClusterSSLProtocols() {
     return clusterSSLProtocols;
   }
 
-  public void setClusterSSLProtocols(String clusterSSLProtocols) {
+  public void setClusterSSLProtocols(String[] clusterSSLProtocols) {
     this.clusterSSLProtocols = clusterSSLProtocols;
   }
 
-  public String getClusterSSLCiphers() {
+  public String[] getClusterSSLCiphers() {
     return clusterSSLCiphers;
   }
 
-  public void setClusterSSLCiphers(String clusterSSLCiphers) {
+  public void setClusterSSLCiphers(String[] clusterSSLCiphers) {
     this.clusterSSLCiphers = clusterSSLCiphers;
   }
 
@@ -1504,19 +1484,19 @@ public class GemFireProperties {
     this.serverSSLEnabled = serverSSLEnabled;
   }
 
-  public String getServerSSLProtocols() {
+  public String[] getServerSSLProtocols() {
     return serverSSLProtocols;
   }
 
-  public void setServerSSLProtocols(String serverSSLProtocols) {
+  public void setServerSSLProtocols(String[] serverSSLProtocols) {
     this.serverSSLProtocols = serverSSLProtocols;
   }
 
-  public String getServerSSLCiphers() {
+  public String[] getServerSSLCiphers() {
     return serverSSLCiphers;
   }
 
-  public void setServerSSLCiphers(String serverSSLCiphers) {
+  public void setServerSSLCiphers(String[] serverSSLCiphers) {
     this.serverSSLCiphers = serverSSLCiphers;
   }
 
@@ -1577,19 +1557,19 @@ public class GemFireProperties {
     this.gatewaySSLEnabled = gatewaySSLEnabled;
   }
 
-  public String getGatewaySSLProtocols() {
+  public String[] getGatewaySSLProtocols() {
     return gatewaySSLProtocols;
   }
 
-  public void setGatewaySSLProtocols(String gatewaySSLProtocols) {
+  public void setGatewaySSLProtocols(String[] gatewaySSLProtocols) {
     this.gatewaySSLProtocols = gatewaySSLProtocols;
   }
 
-  public String getGatewaySSLCiphers() {
+  public String[] getGatewaySSLCiphers() {
     return gatewaySSLCiphers;
   }
 
-  public void setGatewaySSLCiphers(String gatewaySSLCiphers) {
+  public void setGatewaySSLCiphers(String[] gatewaySSLCiphers) {
     this.gatewaySSLCiphers = gatewaySSLCiphers;
   }
 
@@ -1658,19 +1638,19 @@ public class GemFireProperties {
     this.httpServiceSSLRequireAuthentication = httpServiceSSLRequireAuthentication;
   }
 
-  public String getHttpServiceSSLProtocols() {
+  public String[] getHttpServiceSSLProtocols() {
     return httpServiceSSLProtocols;
   }
 
-  public void setHttpServiceSSLProtocols(String httpServiceSSLProtocols) {
+  public void setHttpServiceSSLProtocols(String[] httpServiceSSLProtocols) {
     this.httpServiceSSLProtocols = httpServiceSSLProtocols;
   }
 
-  public String getHttpServiceSSLCiphers() {
+  public String[] getHttpServiceSSLCiphers() {
     return httpServiceSSLCiphers;
   }
 
-  public void setHttpServiceSSLCiphers(String httpServiceSSLCiphers) {
+  public void setHttpServiceSSLCiphers(String[] httpServiceSSLCiphers) {
     this.httpServiceSSLCiphers = httpServiceSSLCiphers;
   }
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/80731e54/geode-core/src/main/java/com/gemstone/gemfire/management/internal/JettyHelper.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/management/internal/JettyHelper.java b/geode-core/src/main/java/com/gemstone/gemfire/management/internal/JettyHelper.java
index 8724d73..8ebf4ef 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/management/internal/JettyHelper.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/management/internal/JettyHelper.java
@@ -19,6 +19,7 @@ package com.gemstone.gemfire.management.internal;
 import java.io.File;
 import java.util.concurrent.CountDownLatch;
 
+import org.apache.commons.lang.ArrayUtils;
 import org.apache.logging.log4j.Logger;
 import org.eclipse.jetty.http.HttpVersion;
 import org.eclipse.jetty.server.Connector;
@@ -80,12 +81,12 @@ public class JettyHelper {
 
       sslContextFactory.setNeedClientAuth(sslConfig.isRequireAuth());
 
-      if (!StringUtils.isBlank(sslConfig.getCiphers()) && !"any".equalsIgnoreCase(sslConfig.getCiphers())) {
+      if (sslConfig.getCiphers().length > 0 && !ArrayUtils.contains(sslConfig.getCiphers(),"any")) {
         //If use has mentioned "any" let the SSL layer decide on the ciphers
-        sslContextFactory.setIncludeCipherSuites(SSLUtil.readArray(sslConfig.getCiphers()));
+        sslContextFactory.setIncludeCipherSuites(sslConfig.getCiphers());
       }
 
-      String protocol = SSLUtil.getSSLAlgo(SSLUtil.readArray(sslConfig.getProtocols()));
+      String protocol = SSLUtil.getSSLAlgo(sslConfig.getProtocols());
       if (protocol != null) {
         sslContextFactory.setProtocol(protocol);
       } else {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/80731e54/geode-core/src/main/java/com/gemstone/gemfire/management/internal/SSLUtil.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/management/internal/SSLUtil.java b/geode-core/src/main/java/com/gemstone/gemfire/management/internal/SSLUtil.java
index 98248d5..7482d5d 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/management/internal/SSLUtil.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/management/internal/SSLUtil.java
@@ -20,17 +20,15 @@ import java.security.NoSuchAlgorithmException;
 import java.util.ArrayList;
 import java.util.List;
 import java.util.StringTokenizer;
-
 import javax.net.ssl.SSLContext;
 
 import com.gemstone.gemfire.internal.lang.StringUtils;
 
 /**
- * 
  * @since GemFire  8.1
  */
 public class SSLUtil {
-  
+
   public static String getSSLAlgo(String[] protocols) {
     String c = null;
 
@@ -63,19 +61,34 @@ public class SSLUtil {
     }
     return c;
   }
-  
-  /** Read an array of values from a string, whitespace separated. */
-  public static String[] readArray( String text ) {
+
+  /**
+   * Read an array of values from a string, whitespace separated.
+   */
+  public static String[] stringToArray(String text) {
     if (StringUtils.isBlank(text)) {
       return null;
     }
-    
-    StringTokenizer st = new StringTokenizer( text );
-    List<String> v = new ArrayList<String>( );
-    while( st.hasMoreTokens() ) {
-      v.add( st.nextToken() );
+
+    StringTokenizer st = new StringTokenizer(text);
+    List<String> v = new ArrayList<String>();
+    while (st.hasMoreTokens()) {
+      v.add(st.nextToken());
     }
-    return v.toArray( new String[ v.size() ] );
+    return v.toArray(new String[v.size()]);
   }
 
+
+  public static String arrayToSpaceDelimitedString(String[] stringArray) {
+    if (stringArray.length == 0) {
+      return "";
+    }
+    StringBuilder stringBuilder = new StringBuilder();
+    for (String text : stringArray) {
+      stringBuilder.append(text);
+      stringBuilder.append(" ");
+    }
+
+    return stringBuilder.toString().trim();
+  }
 }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/80731e54/geode-core/src/main/java/com/gemstone/gemfire/management/internal/cli/commands/ShellCommands.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/management/internal/cli/commands/ShellCommands.java b/geode-core/src/main/java/com/gemstone/gemfire/management/internal/cli/commands/ShellCommands.java
index 523541c..e849d3a 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/management/internal/cli/commands/ShellCommands.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/management/internal/cli/commands/ShellCommands.java
@@ -435,7 +435,7 @@ public class ShellCommands implements CommandMarker {
         trustManagerFactory.init(serverPub);
       }
 
-      SSLContext ssl = SSLContext.getInstance(SSLUtil.getSSLAlgo(SSLUtil.readArray(sslProtocolsToUse)));
+      SSLContext ssl = SSLContext.getInstance(SSLUtil.getSSLAlgo(SSLUtil.stringToArray(sslProtocolsToUse)));
 
       ssl.init(keyManagerFactory != null ? keyManagerFactory.getKeyManagers() : null,
         trustManagerFactory != null ? trustManagerFactory.getTrustManagers() : null, new java.security.SecureRandom());

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/80731e54/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/DistributionConfigJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/DistributionConfigJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/DistributionConfigJUnitTest.java
index 56b35ea..d25615d 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/DistributionConfigJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/DistributionConfigJUnitTest.java
@@ -111,11 +111,11 @@ public class DistributionConfigJUnitTest {
     System.out.println("otherList: " + otherList);
 
     //TODO - This makes no sense. One has no idea what the correct expected number of attributes are.
-    assertEquals(28, boolList.size());
+    assertEquals(29, boolList.size());
     assertEquals(33, intList.size());
-    assertEquals(84, stringList.size());
+    assertEquals(72, stringList.size());
     assertEquals(5, fileList.size());
-    assertEquals(4, otherList.size());
+    assertEquals(16, otherList.size());
   }
 
   @Test
@@ -306,7 +306,7 @@ public class DistributionConfigJUnitTest {
   public void testValidLocatorAddress() {
     String address = "81.240.0.1[7056]";
     config.modifiable = true;
-    config.setAttributeObject(START_LOCATOR,address,ConfigSource.api());
+    config.setAttributeObject(START_LOCATOR, address, ConfigSource.api());
     assertEquals(config.getStartLocator(), address);
   }
 
@@ -314,8 +314,8 @@ public class DistributionConfigJUnitTest {
   public void testInvalidLocatorAddress() {
     String address = "bad.bad[7056]";
     config.modifiable = true;
-//    config.setStartLocator(address);
-    config.setAttributeObject(START_LOCATOR,address,ConfigSource.api());
+    //    config.setStartLocator(address);
+    config.setAttributeObject(START_LOCATOR, address, ConfigSource.api());
   }
 
   @Test
@@ -375,6 +375,7 @@ public class DistributionConfigJUnitTest {
 
     DistributionConfig config = new DistributionConfigImpl(props);
   }
+
   @Test
   public void testSSLEnabledComponentsLegacyPass() {
     Properties props = new Properties();
@@ -385,4 +386,56 @@ public class DistributionConfigJUnitTest {
 
     DistributionConfig config = new DistributionConfigImpl(props);
   }
+
+  @Test
+  public void testSSLCiphers() {
+    Properties props = new Properties();
+    props.put(SSL_CIPHERS, "any,test,anythingelse");
+
+    DistributionConfig config = new DistributionConfigImpl(props);
+    assertArrayEquals(new String[] { "any", "test", "anythingelse" }, config.getSSLCiphers());
+  }
+
+  @Test
+  public void testSSLProtocols() {
+    Properties props = new Properties();
+    props.put(SSL_PROTOCOLS, "any,protocol1,protocol2");
+
+    DistributionConfig config = new DistributionConfigImpl(props);
+    assertArrayEquals(new String[] { "any", "protocol1", "protocol2" }, config.getSSLProtocols());
+  }
+
+  @Test
+  public void testSSLLegacyCiphers() {
+    Properties props = new Properties();
+    props.put(CLUSTER_SSL_CIPHERS, "cluster1 cluster2 cluster3");
+    props.put(JMX_MANAGER_SSL_CIPHERS, "jmx1 jmx2 jmx3");
+    props.put(HTTP_SERVICE_SSL_CIPHERS, "http1 http2 http3");
+    props.put(GATEWAY_SSL_CIPHERS, "gateway1 gateway2 gateway3");
+    props.put(SERVER_SSL_CIPHERS, "server1 server2 server3");
+
+    DistributionConfig config = new DistributionConfigImpl(props);
+    assertArrayEquals(new String[] { "cluster1", "cluster2", "cluster3" }, config.getClusterSSLCiphers());
+    assertArrayEquals(new String[] { "jmx1", "jmx2", "jmx3" }, config.getJmxManagerSSLCiphers());
+    assertArrayEquals(new String[] { "server1", "server2", "server3" }, config.getServerSSLCiphers());
+    assertArrayEquals(new String[] { "gateway1", "gateway2", "gateway3" }, config.getGatewaySSLCiphers());
+    assertArrayEquals(new String[] { "http1", "http2", "http3" }, config.getHttpServiceSSLCiphers());
+  }
+
+  @Test
+  public void testSSLLegacyProtocols() {
+    Properties props = new Properties();
+    props.put(CLUSTER_SSL_PROTOCOLS, "cluster1 cluster2 cluster3");
+    props.put(JMX_MANAGER_SSL_PROTOCOLS, "jmx1 jmx2 jmx3");
+    props.put(HTTP_SERVICE_SSL_PROTOCOLS, "http1 http2 http3");
+    props.put(GATEWAY_SSL_PROTOCOLS, "gateway1 gateway2 gateway3");
+    props.put(SERVER_SSL_PROTOCOLS, "server1 server2 server3");
+
+    DistributionConfig config = new DistributionConfigImpl(props);
+    assertArrayEquals(new String[] { "cluster1", "cluster2", "cluster3" }, config.getClusterSSLProtocols());
+    assertArrayEquals(new String[] { "jmx1", "jmx2", "jmx3" }, config.getJmxManagerSSLProtocols());
+    assertArrayEquals(new String[] { "server1", "server2", "server3" }, config.getServerSSLProtocols());
+    assertArrayEquals(new String[] { "gateway1", "gateway2", "gateway3" }, config.getGatewaySSLProtocols());
+    assertArrayEquals(new String[] { "http1", "http2", "http3" }, config.getHttpServiceSSLProtocols());
+  }
 }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/80731e54/geode-core/src/test/java/com/gemstone/gemfire/internal/net/SSLConfigurationFactoryTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/net/SSLConfigurationFactoryTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/net/SSLConfigurationFactoryTest.java
index 0b70c8f..f97d485 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/net/SSLConfigurationFactoryTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/net/SSLConfigurationFactoryTest.java
@@ -29,6 +29,7 @@ import org.junit.experimental.categories.Category;
 import com.gemstone.gemfire.distributed.internal.DistributionConfig;
 import com.gemstone.gemfire.distributed.internal.DistributionConfigImpl;
 import com.gemstone.gemfire.internal.admin.SSLConfig;
+import com.gemstone.gemfire.management.internal.SSLUtil;
 import com.gemstone.gemfire.test.dunit.internal.JUnit4DistributedTestCase;
 import com.gemstone.gemfire.test.junit.categories.UnitTest;
 
@@ -129,8 +130,8 @@ public class SSLConfigurationFactoryTest extends JUnit4DistributedTestCase {
     assertEquals(properties.getProperty(SSL_KEYSTORE_TYPE), sslConfig.getKeystoreType());
     assertEquals(properties.getProperty(SSL_TRUSTSTORE), sslConfig.getTruststore());
     assertEquals(properties.getProperty(SSL_TRUSTSTORE_PASSWORD), sslConfig.getTruststorePassword());
-    assertEquals(properties.getProperty(SSL_CIPHERS), sslConfig.getCiphers());
-    assertEquals(properties.getProperty(SSL_PROTOCOLS), sslConfig.getProtocols());
+    assertEquals(SSLUtil.stringToArray(properties.getProperty(SSL_CIPHERS)), sslConfig.getCiphers());
+    assertEquals(SSLUtil.stringToArray(properties.getProperty(SSL_PROTOCOLS)), sslConfig.getProtocols());
     assertEquals(getCorrectAlias(expectedSSLEnabledComponent, properties), sslConfig.getAlias());
     assertEquals(requiresAuthentication(properties, expectedSSLEnabledComponent), sslConfig.isRequireAuth());
     assertEquals(expectedSSLEnabledComponent, sslConfig.getSslEnabledComponent());

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/80731e54/gradle/java.gradle
----------------------------------------------------------------------
diff --git a/gradle/java.gradle b/gradle/java.gradle
index 5b28e85..de501c6 100644
--- a/gradle/java.gradle
+++ b/gradle/java.gradle
@@ -23,29 +23,29 @@ allprojects {
 }
 subprojects {
   apply plugin: 'java'
-  
+
   // apply compiler options
-//  gradle.taskGraph.whenReady( { graph ->
-//    tasks.withType(JavaCompile).each { javac ->
-//      javac.configure {
-//        sourceCompatibility '1.8'
-//        targetCompatibility '1.8'
-//        options.encoding = 'UTF-8'
-//      }
-//    }
-//  })
-  
+  gradle.taskGraph.whenReady({ graph ->
+    tasks.withType(JavaCompile).each { javac ->
+      javac.configure {
+        sourceCompatibility '1.8'
+        targetCompatibility '1.8'
+        options.encoding = 'UTF-8'
+      }
+    }
+  })
+
   // apply default manifest
-  gradle.taskGraph.whenReady( { graph ->
+  gradle.taskGraph.whenReady({ graph ->
     tasks.withType(Jar).each { jar ->
       jar.doFirst {
         manifest {
           attributes(
-            "Manifest-Version"  : "1.0",
-            "Created-By"        : System.getProperty("user.name"),
-            "Title"             : rootProject.name,
-            "Version"           : version,
-            "Organization"      : productOrg
+            "Manifest-Version": "1.0",
+            "Created-By": System.getProperty("user.name"),
+            "Title": rootProject.name,
+            "Version": version,
+            "Organization": productOrg
           )
         }
 
@@ -64,10 +64,10 @@ subprojects {
       description 'a dependency that is provided externally at runtime'
       visible true
     }
-    
+
     testOutput {
       extendsFrom testCompile
-      description  'a dependency that exposes test artifacts'
+      description 'a dependency that exposes test artifacts'
     }
   }
 
@@ -79,7 +79,7 @@ subprojects {
     }
   }
 
-  task jarTest (type: Jar, dependsOn: testClasses) {
+  task jarTest(type: Jar, dependsOn: testClasses) {
     description 'Assembles a jar archive of test classes.'
     from sourceSets.test.output
     classifier 'test'
@@ -100,7 +100,7 @@ subprojects {
 
   javadoc {
     options.addStringOption('Xdoclint:none', '-quiet')
-    options.encoding='UTF-8'
+    options.encoding = 'UTF-8'
   }
 }
 


[20/50] [abbrv] incubator-geode git commit: GEODE-420: Code review changes Removal of SSLEnabledComponent.java and SSLEnabledComponents.java

Posted by ud...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/24545408/geode-core/src/test/java/com/gemstone/gemfire/internal/net/JSSESocketJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/net/JSSESocketJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/net/JSSESocketJUnitTest.java
index 36d9f9c..1d7d66a 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/net/JSSESocketJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/net/JSSESocketJUnitTest.java
@@ -50,6 +50,7 @@ import com.gemstone.gemfire.distributed.internal.DistributionConfig;
 import com.gemstone.gemfire.distributed.internal.DistributionConfigImpl;
 import com.gemstone.gemfire.internal.AvailablePort;
 import com.gemstone.gemfire.internal.logging.LogService;
+import com.gemstone.gemfire.internal.security.SecurableComponent;
 import com.gemstone.gemfire.test.dunit.ThreadUtils;
 import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
 import com.gemstone.gemfire.util.test.TestUtil;
@@ -93,6 +94,7 @@ public class JSSESocketJUnitTest {
       acceptor.close();
     }
     System.out.println(baos.toString());
+    SocketCreatorFactory.close();
   }
 
   //----- test methods ------
@@ -125,13 +127,13 @@ public class JSSESocketJUnitTest {
       DistributionConfigImpl distributionConfig = new DistributionConfigImpl(new Properties());
 
       SocketCreatorFactory.setDistributionConfig(distributionConfig);
-      assertTrue(SocketCreatorFactory.getSSLSocketCreatorForComponent(SSLEnabledComponent.CLUSTER).useSSL());
+      assertTrue(SocketCreatorFactory.getSSLSocketCreatorForComponent(SecurableComponent.CLUSTER).useSSL());
 
-      final ServerSocket serverSocket = SocketCreatorFactory.getSSLSocketCreatorForComponent(SSLEnabledComponent.CLUSTER).createServerSocket(randport, 0, InetAddress.getByName("localhost"));
+      final ServerSocket serverSocket = SocketCreatorFactory.getSSLSocketCreatorForComponent(SecurableComponent.CLUSTER).createServerSocket(randport, 0, InetAddress.getByName("localhost"));
 
       Thread serverThread = startServer(serverSocket, receiver);
 
-      Socket client = SocketCreatorFactory.getSSLSocketCreatorForComponent(SSLEnabledComponent.CLUSTER).connectForServer(InetAddress.getByName("localhost"), randport);
+      Socket client = SocketCreatorFactory.getSSLSocketCreatorForComponent(SecurableComponent.CLUSTER).connectForServer(InetAddress.getByName("localhost"), randport);
 
       ObjectOutputStream oos = new ObjectOutputStream(client.getOutputStream());
       String expected = new String("testing " + name.getMethodName());
@@ -166,7 +168,6 @@ public class JSSESocketJUnitTest {
     } finally {
       // Reset original base log level
       LogService.setBaseLogLevel(originalBaseLevel);
-      SocketCreatorFactory.close();
     }
   }
 
@@ -185,7 +186,7 @@ public class JSSESocketJUnitTest {
     factoryInvoked = false;
     try {
       try {
-        Socket sock = SocketCreatorFactory.getSSLSocketCreatorForComponent(SSLEnabledComponent.CLUSTER).connectForClient("localhost", 12345, 0);
+        Socket sock = SocketCreatorFactory.getSSLSocketCreatorForComponent(SecurableComponent.CLUSTER).connectForClient("localhost", 12345, 0);
         sock.close();
         fail("socket factory was invoked");
       } catch (IOException e) {
@@ -193,7 +194,7 @@ public class JSSESocketJUnitTest {
       }
     } finally {
       System.getProperties().remove(DistributionConfig.GEMFIRE_PREFIX + "clientSocketFactory");
-      SocketCreatorFactory.getSSLSocketCreatorForComponent(SSLEnabledComponent.CLUSTER).initializeClientSocketFactory();
+      SocketCreatorFactory.getSSLSocketCreatorForComponent(SecurableComponent.CLUSTER).initializeClientSocketFactory();
     }
   }
 
@@ -221,7 +222,7 @@ public class JSSESocketJUnitTest {
       public void run() {
         try {
           Socket s = serverSocket.accept();
-          SocketCreatorFactory.getSSLSocketCreatorForComponent(SSLEnabledComponent.CLUSTER).configureServerSSLSocket(s);
+          SocketCreatorFactory.getSSLSocketCreatorForComponent(SecurableComponent.CLUSTER).configureServerSSLSocket(s);
           ObjectInputStream ois = new ObjectInputStream(s.getInputStream());
           receiver[0] = ois.readObject();
           server = s;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/24545408/geode-core/src/test/java/com/gemstone/gemfire/internal/net/SSLConfigurationFactoryTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/net/SSLConfigurationFactoryTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/net/SSLConfigurationFactoryTest.java
index 0b70c8f..d890457 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/net/SSLConfigurationFactoryTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/net/SSLConfigurationFactoryTest.java
@@ -29,6 +29,7 @@ import org.junit.experimental.categories.Category;
 import com.gemstone.gemfire.distributed.internal.DistributionConfig;
 import com.gemstone.gemfire.distributed.internal.DistributionConfigImpl;
 import com.gemstone.gemfire.internal.admin.SSLConfig;
+import com.gemstone.gemfire.internal.security.SecurableComponent;
 import com.gemstone.gemfire.test.dunit.internal.JUnit4DistributedTestCase;
 import com.gemstone.gemfire.test.junit.categories.UnitTest;
 
@@ -54,15 +55,15 @@ public class SSLConfigurationFactoryTest extends JUnit4DistributedTestCase {
     properties.setProperty(SSL_PROTOCOLS, "any");
     DistributionConfigImpl distributionConfig = new DistributionConfigImpl(properties);
     SSLConfigurationFactory.setDistributionConfig(distributionConfig);
-    for (SSLEnabledComponent sslEnabledComponent : SSLEnabledComponent.values()) {
-      assertSSLConfig(properties, SSLConfigurationFactory.getSSLConfigForComponent(sslEnabledComponent), sslEnabledComponent, distributionConfig);
+    for (SecurableComponent securableComponent : SecurableComponent.values()) {
+      assertSSLConfig(properties, SSLConfigurationFactory.getSSLConfigForComponent(securableComponent), securableComponent, distributionConfig);
     }
   }
 
   @Test
   public void getSSLConfigForComponentHTTPService() throws Exception {
     Properties properties = new Properties();
-    properties.setProperty(SSL_ENABLED_COMPONENTS, SSLEnabledComponent.HTTP_SERVICE.getConstant());
+    properties.setProperty(SSL_ENABLED_COMPONENTS, SecurableComponent.HTTP_SERVICE.getConstant());
     properties.setProperty(SSL_KEYSTORE, "someKeyStore");
     properties.setProperty(SSL_KEYSTORE_PASSWORD, "keystorePassword");
     properties.setProperty(SSL_KEYSTORE_TYPE, "JKS");
@@ -73,15 +74,15 @@ public class SSLConfigurationFactoryTest extends JUnit4DistributedTestCase {
     properties.setProperty(SSL_PROTOCOLS, "any");
     DistributionConfigImpl distributionConfig = new DistributionConfigImpl(properties);
     SSLConfigurationFactory.setDistributionConfig(distributionConfig);
-    for (SSLEnabledComponent sslEnabledComponent : SSLEnabledComponent.values()) {
-      assertSSLConfig(properties, SSLConfigurationFactory.getSSLConfigForComponent(sslEnabledComponent), sslEnabledComponent, distributionConfig);
+    for (SecurableComponent securableComponent : SecurableComponent.values()) {
+      assertSSLConfig(properties, SSLConfigurationFactory.getSSLConfigForComponent(securableComponent), securableComponent, distributionConfig);
     }
   }
 
   @Test
   public void getSSLConfigForComponentHTTPServiceWithAlias() throws Exception {
     Properties properties = new Properties();
-    properties.setProperty(SSL_ENABLED_COMPONENTS, SSLEnabledComponent.HTTP_SERVICE.getConstant());
+    properties.setProperty(SSL_ENABLED_COMPONENTS, SecurableComponent.HTTP_SERVICE.getConstant());
     properties.setProperty(SSL_KEYSTORE, "someKeyStore");
     properties.setProperty(SSL_KEYSTORE_PASSWORD, "keystorePassword");
     properties.setProperty(SSL_KEYSTORE_TYPE, "JKS");
@@ -93,15 +94,15 @@ public class SSLConfigurationFactoryTest extends JUnit4DistributedTestCase {
     properties.setProperty(SSL_PROTOCOLS, "any");
     DistributionConfigImpl distributionConfig = new DistributionConfigImpl(properties);
     SSLConfigurationFactory.setDistributionConfig(distributionConfig);
-    for (SSLEnabledComponent sslEnabledComponent : SSLEnabledComponent.values()) {
-      assertSSLConfig(properties, SSLConfigurationFactory.getSSLConfigForComponent(sslEnabledComponent), sslEnabledComponent, distributionConfig);
+    for (SecurableComponent securableComponent : SecurableComponent.values()) {
+      assertSSLConfig(properties, SSLConfigurationFactory.getSSLConfigForComponent(securableComponent), securableComponent, distributionConfig);
     }
   }
 
   @Test
   public void getSSLConfigForComponentHTTPServiceWithMutualAuth() throws Exception {
     Properties properties = new Properties();
-    properties.setProperty(SSL_ENABLED_COMPONENTS, SSLEnabledComponent.HTTP_SERVICE.getConstant());
+    properties.setProperty(SSL_ENABLED_COMPONENTS, SecurableComponent.HTTP_SERVICE.getConstant());
     properties.setProperty(SSL_KEYSTORE, "someKeyStore");
     properties.setProperty(SSL_KEYSTORE_PASSWORD, "keystorePassword");
     properties.setProperty(SSL_KEYSTORE_TYPE, "JKS");
@@ -114,16 +115,16 @@ public class SSLConfigurationFactoryTest extends JUnit4DistributedTestCase {
     properties.setProperty(SSL_PROTOCOLS, "any");
     DistributionConfigImpl distributionConfig = new DistributionConfigImpl(properties);
     SSLConfigurationFactory.setDistributionConfig(distributionConfig);
-    for (SSLEnabledComponent sslEnabledComponent : SSLEnabledComponent.values()) {
-      assertSSLConfig(properties, SSLConfigurationFactory.getSSLConfigForComponent(sslEnabledComponent), sslEnabledComponent, distributionConfig);
+    for (SecurableComponent securableComponent : SecurableComponent.values()) {
+      assertSSLConfig(properties, SSLConfigurationFactory.getSSLConfigForComponent(securableComponent), securableComponent, distributionConfig);
     }
   }
 
   private void assertSSLConfig(final Properties properties,
                                final SSLConfig sslConfig,
-                               final SSLEnabledComponent expectedSSLEnabledComponent,
+                               final SecurableComponent expectedSecurableComponent,
                                final DistributionConfigImpl distributionConfig) {
-    assertEquals(isSSLComponentEnabled(expectedSSLEnabledComponent, distributionConfig.getSSLEnabledComponents()), sslConfig.isEnabled());
+    assertEquals(isSSLComponentEnabled(expectedSecurableComponent, distributionConfig.getSSLEnabledComponents()), sslConfig.isEnabled());
     assertEquals(properties.getProperty(SSL_KEYSTORE), sslConfig.getKeystore());
     assertEquals(properties.getProperty(SSL_KEYSTORE_PASSWORD), sslConfig.getKeystorePassword());
     assertEquals(properties.getProperty(SSL_KEYSTORE_TYPE), sslConfig.getKeystoreType());
@@ -131,20 +132,20 @@ public class SSLConfigurationFactoryTest extends JUnit4DistributedTestCase {
     assertEquals(properties.getProperty(SSL_TRUSTSTORE_PASSWORD), sslConfig.getTruststorePassword());
     assertEquals(properties.getProperty(SSL_CIPHERS), sslConfig.getCiphers());
     assertEquals(properties.getProperty(SSL_PROTOCOLS), sslConfig.getProtocols());
-    assertEquals(getCorrectAlias(expectedSSLEnabledComponent, properties), sslConfig.getAlias());
-    assertEquals(requiresAuthentication(properties, expectedSSLEnabledComponent), sslConfig.isRequireAuth());
-    assertEquals(expectedSSLEnabledComponent, sslConfig.getSslEnabledComponent());
+    assertEquals(getCorrectAlias(expectedSecurableComponent, properties), sslConfig.getAlias());
+    assertEquals(requiresAuthentication(properties, expectedSecurableComponent), sslConfig.isRequireAuth());
+    assertEquals(expectedSecurableComponent, sslConfig.getSecuredComponent());
   }
 
-  private boolean requiresAuthentication(final Properties properties, final SSLEnabledComponent expectedSSLEnabledComponent) {
-    boolean defaultAuthentication = expectedSSLEnabledComponent.equals(SSLEnabledComponent.HTTP_SERVICE) ? DistributionConfig.DEFAULT_SSL_HTTP_SERVICE_REQUIRE_AUTHENTICATION : DistributionConfig.DEFAULT_SSL_REQUIRE_AUTHENTICATION;
+  private boolean requiresAuthentication(final Properties properties, final SecurableComponent expectedSecurableComponent) {
+    boolean defaultAuthentication = expectedSecurableComponent.equals(SecurableComponent.HTTP_SERVICE) ? DistributionConfig.DEFAULT_SSL_HTTP_SERVICE_REQUIRE_AUTHENTICATION : DistributionConfig.DEFAULT_SSL_REQUIRE_AUTHENTICATION;
     String httpRequiresAuthentication = properties.getProperty(SSL_HTTP_SERVICE_REQUIRE_AUTHENTICATION);
 
     return httpRequiresAuthentication == null ? defaultAuthentication : Boolean.parseBoolean(httpRequiresAuthentication);
   }
 
-  private String getCorrectAlias(final SSLEnabledComponent expectedSSLEnabledComponent, final Properties properties) {
-    switch (expectedSSLEnabledComponent) {
+  private String getCorrectAlias(final SecurableComponent expectedSecurableComponent, final Properties properties) {
+    switch (expectedSecurableComponent) {
       case ALL:
         return properties.getProperty(SSL_DEFAULT_ALIAS);
       case CLUSTER:
@@ -169,9 +170,9 @@ public class SSLConfigurationFactoryTest extends JUnit4DistributedTestCase {
     return !StringUtils.isEmpty(aliasProperty) ? aliasProperty : properties.getProperty(SSL_DEFAULT_ALIAS);
   }
 
-  private boolean isSSLComponentEnabled(final SSLEnabledComponent expectedSSLEnabledComponent, final SSLEnabledComponent[] sslEnabledComponents) {
-    for (SSLEnabledComponent sslEnabledComponent : sslEnabledComponents) {
-      if (SSLEnabledComponent.ALL.equals(sslEnabledComponent) || sslEnabledComponent.equals(expectedSSLEnabledComponent)) {
+  private boolean isSSLComponentEnabled(final SecurableComponent expectedSecurableComponent, final SecurableComponent[] SecurableComponents) {
+    for (SecurableComponent SecurableComponent : SecurableComponents) {
+      if (SecurableComponent.ALL.equals(SecurableComponent) || SecurableComponent.equals(expectedSecurableComponent)) {
         return true;
       }
     }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/24545408/geode-core/src/test/java/com/gemstone/gemfire/internal/net/SocketCreatorFactoryJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/net/SocketCreatorFactoryJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/net/SocketCreatorFactoryJUnitTest.java
index 7db1a97..d406755 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/net/SocketCreatorFactoryJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/net/SocketCreatorFactoryJUnitTest.java
@@ -26,8 +26,8 @@ import org.junit.After;
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
 
-import com.gemstone.gemfire.distributed.SSLEnabledComponents;
 import com.gemstone.gemfire.distributed.internal.DistributionConfigImpl;
+import com.gemstone.gemfire.internal.security.SecurableComponent;
 import com.gemstone.gemfire.test.dunit.Assert;
 import com.gemstone.gemfire.test.junit.categories.UnitTest;
 import com.gemstone.gemfire.util.test.TestUtil;
@@ -35,150 +35,145 @@ import com.gemstone.gemfire.util.test.TestUtil;
 @Category(UnitTest.class)
 public class SocketCreatorFactoryJUnitTest extends JSSESocketJUnitTest {
 
-  @After
-  public void tearDown() {
-    SocketCreatorFactory.close();
-  }
-
   @Test
   public void testNewSSLConfigSSLComponentLocator() {
-    Properties properties = configureSSLProperties(SSLEnabledComponents.LOCATOR);
+    Properties properties = configureSSLProperties(SecurableComponent.LOCATOR.getConstant());
 
     DistributionConfigImpl distributionConfig = new DistributionConfigImpl(properties);
     SocketCreatorFactory.setDistributionConfig(distributionConfig);
 
-    Assert.assertTrue(SocketCreatorFactory.getSSLSocketCreatorForComponent(SSLEnabledComponent.LOCATOR).useSSL());
-    Assert.assertFalse(SocketCreatorFactory.getSSLSocketCreatorForComponent(SSLEnabledComponent.CLUSTER).useSSL());
-    Assert.assertFalse(SocketCreatorFactory.getSSLSocketCreatorForComponent(SSLEnabledComponent.GATEWAY).useSSL());
-    Assert.assertFalse(SocketCreatorFactory.getSSLSocketCreatorForComponent(SSLEnabledComponent.JMX).useSSL());
-    Assert.assertFalse(SocketCreatorFactory.getSSLSocketCreatorForComponent(SSLEnabledComponent.SERVER).useSSL());
-    Assert.assertFalse(SocketCreatorFactory.getSSLSocketCreatorForComponent(SSLEnabledComponent.HTTP_SERVICE).useSSL());
+    Assert.assertTrue(SocketCreatorFactory.getSSLSocketCreatorForComponent(SecurableComponent.LOCATOR).useSSL());
+    Assert.assertFalse(SocketCreatorFactory.getSSLSocketCreatorForComponent(SecurableComponent.CLUSTER).useSSL());
+    Assert.assertFalse(SocketCreatorFactory.getSSLSocketCreatorForComponent(SecurableComponent.GATEWAY).useSSL());
+    Assert.assertFalse(SocketCreatorFactory.getSSLSocketCreatorForComponent(SecurableComponent.JMX).useSSL());
+    Assert.assertFalse(SocketCreatorFactory.getSSLSocketCreatorForComponent(SecurableComponent.SERVER).useSSL());
+    Assert.assertFalse(SocketCreatorFactory.getSSLSocketCreatorForComponent(SecurableComponent.HTTP_SERVICE).useSSL());
   }
 
   @Test
   public void testNewSSLConfigSSLComponentALL() {
-    Properties properties = configureSSLProperties(SSLEnabledComponents.ALL);
+    Properties properties = configureSSLProperties(SecurableComponent.ALL.getConstant());
 
     DistributionConfigImpl distributionConfig = new DistributionConfigImpl(properties);
     SocketCreatorFactory.setDistributionConfig(distributionConfig);
 
-    Assert.assertTrue(SocketCreatorFactory.getSSLSocketCreatorForComponent(SSLEnabledComponent.CLUSTER).useSSL());
-    Assert.assertTrue(SocketCreatorFactory.getSSLSocketCreatorForComponent(SSLEnabledComponent.LOCATOR).useSSL());
-    Assert.assertTrue(SocketCreatorFactory.getSSLSocketCreatorForComponent(SSLEnabledComponent.GATEWAY).useSSL());
-    Assert.assertTrue(SocketCreatorFactory.getSSLSocketCreatorForComponent(SSLEnabledComponent.JMX).useSSL());
-    Assert.assertTrue(SocketCreatorFactory.getSSLSocketCreatorForComponent(SSLEnabledComponent.SERVER).useSSL());
-    Assert.assertTrue(SocketCreatorFactory.getSSLSocketCreatorForComponent(SSLEnabledComponent.HTTP_SERVICE).useSSL());
+    Assert.assertTrue(SocketCreatorFactory.getSSLSocketCreatorForComponent(SecurableComponent.CLUSTER).useSSL());
+    Assert.assertTrue(SocketCreatorFactory.getSSLSocketCreatorForComponent(SecurableComponent.LOCATOR).useSSL());
+    Assert.assertTrue(SocketCreatorFactory.getSSLSocketCreatorForComponent(SecurableComponent.GATEWAY).useSSL());
+    Assert.assertTrue(SocketCreatorFactory.getSSLSocketCreatorForComponent(SecurableComponent.JMX).useSSL());
+    Assert.assertTrue(SocketCreatorFactory.getSSLSocketCreatorForComponent(SecurableComponent.SERVER).useSSL());
+    Assert.assertTrue(SocketCreatorFactory.getSSLSocketCreatorForComponent(SecurableComponent.HTTP_SERVICE).useSSL());
   }
 
   @Test
   public void testNewSSLConfigSSLComponentCLUSTER() {
-    Properties properties = configureSSLProperties(SSLEnabledComponents.CLUSTER);
+    Properties properties = configureSSLProperties(SecurableComponent.CLUSTER.getConstant());
 
     DistributionConfigImpl distributionConfig = new DistributionConfigImpl(properties);
     SocketCreatorFactory.setDistributionConfig(distributionConfig);
 
-    Assert.assertTrue(SocketCreatorFactory.getSSLSocketCreatorForComponent(SSLEnabledComponent.CLUSTER).useSSL());
-    Assert.assertFalse(SocketCreatorFactory.getSSLSocketCreatorForComponent(SSLEnabledComponent.GATEWAY).useSSL());
-    Assert.assertFalse(SocketCreatorFactory.getSSLSocketCreatorForComponent(SSLEnabledComponent.JMX).useSSL());
-    Assert.assertFalse(SocketCreatorFactory.getSSLSocketCreatorForComponent(SSLEnabledComponent.SERVER).useSSL());
-    Assert.assertFalse(SocketCreatorFactory.getSSLSocketCreatorForComponent(SSLEnabledComponent.HTTP_SERVICE).useSSL());
-    Assert.assertFalse(SocketCreatorFactory.getSSLSocketCreatorForComponent(SSLEnabledComponent.LOCATOR).useSSL());
+    Assert.assertTrue(SocketCreatorFactory.getSSLSocketCreatorForComponent(SecurableComponent.CLUSTER).useSSL());
+    Assert.assertFalse(SocketCreatorFactory.getSSLSocketCreatorForComponent(SecurableComponent.GATEWAY).useSSL());
+    Assert.assertFalse(SocketCreatorFactory.getSSLSocketCreatorForComponent(SecurableComponent.JMX).useSSL());
+    Assert.assertFalse(SocketCreatorFactory.getSSLSocketCreatorForComponent(SecurableComponent.SERVER).useSSL());
+    Assert.assertFalse(SocketCreatorFactory.getSSLSocketCreatorForComponent(SecurableComponent.HTTP_SERVICE).useSSL());
+    Assert.assertFalse(SocketCreatorFactory.getSSLSocketCreatorForComponent(SecurableComponent.LOCATOR).useSSL());
   }
 
   @Test
   public void testNewSSLConfigSSLComponentGATEWAY() {
-    Properties properties = configureSSLProperties(SSLEnabledComponents.GATEWAY);
+    Properties properties = configureSSLProperties(SecurableComponent.GATEWAY.getConstant());
 
     DistributionConfigImpl distributionConfig = new DistributionConfigImpl(properties);
     SocketCreatorFactory.setDistributionConfig(distributionConfig);
 
-    Assert.assertFalse(SocketCreatorFactory.getSSLSocketCreatorForComponent(SSLEnabledComponent.CLUSTER).useSSL());
-    Assert.assertTrue(SocketCreatorFactory.getSSLSocketCreatorForComponent(SSLEnabledComponent.GATEWAY).useSSL());
-    Assert.assertFalse(SocketCreatorFactory.getSSLSocketCreatorForComponent(SSLEnabledComponent.JMX).useSSL());
-    Assert.assertFalse(SocketCreatorFactory.getSSLSocketCreatorForComponent(SSLEnabledComponent.SERVER).useSSL());
-    Assert.assertFalse(SocketCreatorFactory.getSSLSocketCreatorForComponent(SSLEnabledComponent.HTTP_SERVICE).useSSL());
-    Assert.assertFalse(SocketCreatorFactory.getSSLSocketCreatorForComponent(SSLEnabledComponent.LOCATOR).useSSL());
+    Assert.assertFalse(SocketCreatorFactory.getSSLSocketCreatorForComponent(SecurableComponent.CLUSTER).useSSL());
+    Assert.assertTrue(SocketCreatorFactory.getSSLSocketCreatorForComponent(SecurableComponent.GATEWAY).useSSL());
+    Assert.assertFalse(SocketCreatorFactory.getSSLSocketCreatorForComponent(SecurableComponent.JMX).useSSL());
+    Assert.assertFalse(SocketCreatorFactory.getSSLSocketCreatorForComponent(SecurableComponent.SERVER).useSSL());
+    Assert.assertFalse(SocketCreatorFactory.getSSLSocketCreatorForComponent(SecurableComponent.HTTP_SERVICE).useSSL());
+    Assert.assertFalse(SocketCreatorFactory.getSSLSocketCreatorForComponent(SecurableComponent.LOCATOR).useSSL());
   }
 
   @Test
   public void testNewSSLConfigSSLComponentHTTP_SERVICE() {
-    Properties properties = configureSSLProperties(SSLEnabledComponents.HTTP_SERVICE);
+    Properties properties = configureSSLProperties(SecurableComponent.HTTP_SERVICE.getConstant());
 
     DistributionConfigImpl distributionConfig = new DistributionConfigImpl(properties);
     SocketCreatorFactory.setDistributionConfig(distributionConfig);
 
-    Assert.assertFalse(SocketCreatorFactory.getSSLSocketCreatorForComponent(SSLEnabledComponent.CLUSTER).useSSL());
-    Assert.assertFalse(SocketCreatorFactory.getSSLSocketCreatorForComponent(SSLEnabledComponent.GATEWAY).useSSL());
-    Assert.assertFalse(SocketCreatorFactory.getSSLSocketCreatorForComponent(SSLEnabledComponent.JMX).useSSL());
-    Assert.assertFalse(SocketCreatorFactory.getSSLSocketCreatorForComponent(SSLEnabledComponent.SERVER).useSSL());
-    Assert.assertTrue(SocketCreatorFactory.getSSLSocketCreatorForComponent(SSLEnabledComponent.HTTP_SERVICE).useSSL());
-    Assert.assertFalse(SocketCreatorFactory.getSSLSocketCreatorForComponent(SSLEnabledComponent.LOCATOR).useSSL());
+    Assert.assertFalse(SocketCreatorFactory.getSSLSocketCreatorForComponent(SecurableComponent.CLUSTER).useSSL());
+    Assert.assertFalse(SocketCreatorFactory.getSSLSocketCreatorForComponent(SecurableComponent.GATEWAY).useSSL());
+    Assert.assertFalse(SocketCreatorFactory.getSSLSocketCreatorForComponent(SecurableComponent.JMX).useSSL());
+    Assert.assertFalse(SocketCreatorFactory.getSSLSocketCreatorForComponent(SecurableComponent.SERVER).useSSL());
+    Assert.assertTrue(SocketCreatorFactory.getSSLSocketCreatorForComponent(SecurableComponent.HTTP_SERVICE).useSSL());
+    Assert.assertFalse(SocketCreatorFactory.getSSLSocketCreatorForComponent(SecurableComponent.LOCATOR).useSSL());
   }
 
   @Test
   public void testNewSSLConfigSSLComponentJMX() {
-    Properties properties = configureSSLProperties(SSLEnabledComponents.JMX);
+    Properties properties = configureSSLProperties(SecurableComponent.JMX.getConstant());
 
     DistributionConfigImpl distributionConfig = new DistributionConfigImpl(properties);
     SocketCreatorFactory.setDistributionConfig(distributionConfig);
 
-    Assert.assertFalse(SocketCreatorFactory.getSSLSocketCreatorForComponent(SSLEnabledComponent.CLUSTER).useSSL());
-    Assert.assertFalse(SocketCreatorFactory.getSSLSocketCreatorForComponent(SSLEnabledComponent.GATEWAY).useSSL());
-    Assert.assertTrue(SocketCreatorFactory.getSSLSocketCreatorForComponent(SSLEnabledComponent.JMX).useSSL());
-    Assert.assertFalse(SocketCreatorFactory.getSSLSocketCreatorForComponent(SSLEnabledComponent.SERVER).useSSL());
-    Assert.assertFalse(SocketCreatorFactory.getSSLSocketCreatorForComponent(SSLEnabledComponent.HTTP_SERVICE).useSSL());
-    Assert.assertFalse(SocketCreatorFactory.getSSLSocketCreatorForComponent(SSLEnabledComponent.LOCATOR).useSSL());
+    Assert.assertFalse(SocketCreatorFactory.getSSLSocketCreatorForComponent(SecurableComponent.CLUSTER).useSSL());
+    Assert.assertFalse(SocketCreatorFactory.getSSLSocketCreatorForComponent(SecurableComponent.GATEWAY).useSSL());
+    Assert.assertTrue(SocketCreatorFactory.getSSLSocketCreatorForComponent(SecurableComponent.JMX).useSSL());
+    Assert.assertFalse(SocketCreatorFactory.getSSLSocketCreatorForComponent(SecurableComponent.SERVER).useSSL());
+    Assert.assertFalse(SocketCreatorFactory.getSSLSocketCreatorForComponent(SecurableComponent.HTTP_SERVICE).useSSL());
+    Assert.assertFalse(SocketCreatorFactory.getSSLSocketCreatorForComponent(SecurableComponent.LOCATOR).useSSL());
   }
 
   @Test
   public void testNewSSLConfigSSLComponentSERVER() {
-    Properties properties = configureSSLProperties(SSLEnabledComponents.SERVER);
+    Properties properties = configureSSLProperties(SecurableComponent.SERVER.getConstant());
 
     DistributionConfigImpl distributionConfig = new DistributionConfigImpl(properties);
 
     SocketCreatorFactory.setDistributionConfig(distributionConfig);
 
-    Assert.assertFalse(SocketCreatorFactory.getSSLSocketCreatorForComponent(SSLEnabledComponent.CLUSTER).useSSL());
-    Assert.assertFalse(SocketCreatorFactory.getSSLSocketCreatorForComponent(SSLEnabledComponent.GATEWAY).useSSL());
-    Assert.assertFalse(SocketCreatorFactory.getSSLSocketCreatorForComponent(SSLEnabledComponent.JMX).useSSL());
-    Assert.assertTrue(SocketCreatorFactory.getSSLSocketCreatorForComponent(SSLEnabledComponent.SERVER).useSSL());
-    Assert.assertFalse(SocketCreatorFactory.getSSLSocketCreatorForComponent(SSLEnabledComponent.HTTP_SERVICE).useSSL());
-    Assert.assertFalse(SocketCreatorFactory.getSSLSocketCreatorForComponent(SSLEnabledComponent.LOCATOR).useSSL());
+    Assert.assertFalse(SocketCreatorFactory.getSSLSocketCreatorForComponent(SecurableComponent.CLUSTER).useSSL());
+    Assert.assertFalse(SocketCreatorFactory.getSSLSocketCreatorForComponent(SecurableComponent.GATEWAY).useSSL());
+    Assert.assertFalse(SocketCreatorFactory.getSSLSocketCreatorForComponent(SecurableComponent.JMX).useSSL());
+    Assert.assertTrue(SocketCreatorFactory.getSSLSocketCreatorForComponent(SecurableComponent.SERVER).useSSL());
+    Assert.assertFalse(SocketCreatorFactory.getSSLSocketCreatorForComponent(SecurableComponent.HTTP_SERVICE).useSSL());
+    Assert.assertFalse(SocketCreatorFactory.getSSLSocketCreatorForComponent(SecurableComponent.LOCATOR).useSSL());
   }
 
   @Test
   public void testNewSSLConfigSSLComponentCombinations1() {
-    Properties properties = configureSSLProperties(commaDelimitedString(SSLEnabledComponents.CLUSTER, SSLEnabledComponents.SERVER));
+    Properties properties = configureSSLProperties(commaDelimitedString(SecurableComponent.CLUSTER.getConstant(), SecurableComponent.SERVER.getConstant()));
 
     DistributionConfigImpl distributionConfig = new DistributionConfigImpl(properties);
     SocketCreatorFactory.setDistributionConfig(distributionConfig);
 
-    Assert.assertTrue(SocketCreatorFactory.getSSLSocketCreatorForComponent(SSLEnabledComponent.CLUSTER).useSSL());
-    Assert.assertFalse(SocketCreatorFactory.getSSLSocketCreatorForComponent(SSLEnabledComponent.GATEWAY).useSSL());
-    Assert.assertFalse(SocketCreatorFactory.getSSLSocketCreatorForComponent(SSLEnabledComponent.JMX).useSSL());
-    Assert.assertTrue(SocketCreatorFactory.getSSLSocketCreatorForComponent(SSLEnabledComponent.SERVER).useSSL());
-    Assert.assertFalse(SocketCreatorFactory.getSSLSocketCreatorForComponent(SSLEnabledComponent.HTTP_SERVICE).useSSL());
-    Assert.assertFalse(SocketCreatorFactory.getSSLSocketCreatorForComponent(SSLEnabledComponent.LOCATOR).useSSL());
+    Assert.assertTrue(SocketCreatorFactory.getSSLSocketCreatorForComponent(SecurableComponent.CLUSTER).useSSL());
+    Assert.assertFalse(SocketCreatorFactory.getSSLSocketCreatorForComponent(SecurableComponent.GATEWAY).useSSL());
+    Assert.assertFalse(SocketCreatorFactory.getSSLSocketCreatorForComponent(SecurableComponent.JMX).useSSL());
+    Assert.assertTrue(SocketCreatorFactory.getSSLSocketCreatorForComponent(SecurableComponent.SERVER).useSSL());
+    Assert.assertFalse(SocketCreatorFactory.getSSLSocketCreatorForComponent(SecurableComponent.HTTP_SERVICE).useSSL());
+    Assert.assertFalse(SocketCreatorFactory.getSSLSocketCreatorForComponent(SecurableComponent.LOCATOR).useSSL());
   }
 
   @Test
   public void testNewSSLConfigSSLComponentCombinations2() {
-    Properties properties = configureSSLProperties(commaDelimitedString(SSLEnabledComponents.CLUSTER, SSLEnabledComponents.SERVER, SSLEnabledComponents.HTTP_SERVICE, SSLEnabledComponents.JMX));
+    Properties properties = configureSSLProperties(commaDelimitedString(SecurableComponent.CLUSTER.getConstant(), SecurableComponent.SERVER.getConstant(), SecurableComponent.HTTP_SERVICE.getConstant(), SecurableComponent.JMX.getConstant()));
 
     DistributionConfigImpl distributionConfig = new DistributionConfigImpl(properties);
     SocketCreatorFactory.setDistributionConfig(distributionConfig);
 
-    Assert.assertTrue(SocketCreatorFactory.getSSLSocketCreatorForComponent(SSLEnabledComponent.CLUSTER).useSSL());
-    Assert.assertFalse(SocketCreatorFactory.getSSLSocketCreatorForComponent(SSLEnabledComponent.GATEWAY).useSSL());
-    Assert.assertTrue(SocketCreatorFactory.getSSLSocketCreatorForComponent(SSLEnabledComponent.JMX).useSSL());
-    Assert.assertTrue(SocketCreatorFactory.getSSLSocketCreatorForComponent(SSLEnabledComponent.SERVER).useSSL());
-    Assert.assertTrue(SocketCreatorFactory.getSSLSocketCreatorForComponent(SSLEnabledComponent.HTTP_SERVICE).useSSL());
-    Assert.assertFalse(SocketCreatorFactory.getSSLSocketCreatorForComponent(SSLEnabledComponent.LOCATOR).useSSL());
+    Assert.assertTrue(SocketCreatorFactory.getSSLSocketCreatorForComponent(SecurableComponent.CLUSTER).useSSL());
+    Assert.assertFalse(SocketCreatorFactory.getSSLSocketCreatorForComponent(SecurableComponent.GATEWAY).useSSL());
+    Assert.assertTrue(SocketCreatorFactory.getSSLSocketCreatorForComponent(SecurableComponent.JMX).useSSL());
+    Assert.assertTrue(SocketCreatorFactory.getSSLSocketCreatorForComponent(SecurableComponent.SERVER).useSSL());
+    Assert.assertTrue(SocketCreatorFactory.getSSLSocketCreatorForComponent(SecurableComponent.HTTP_SERVICE).useSSL());
+    Assert.assertFalse(SocketCreatorFactory.getSSLSocketCreatorForComponent(SecurableComponent.LOCATOR).useSSL());
   }
 
   @Test
   public void testNewSSLConfigSSLComponentAliasWithMultiKeyStore() {
-    Properties properties = configureSSLProperties(SSLEnabledComponent.ALL.getConstant());
+    Properties properties = configureSSLProperties(SecurableComponent.ALL.getConstant());
 
     properties.setProperty(SSL_KEYSTORE, TestUtil.getResourcePath(getClass(), "/com/gemstone/gemfire/internal/net/multiKey.jks"));
     properties.setProperty(SSL_TRUSTSTORE, TestUtil.getResourcePath(getClass(), "/com/gemstone/gemfire/internal/net/multiKeyTrust.jks"));
@@ -189,17 +184,17 @@ public class SocketCreatorFactoryJUnitTest extends JSSESocketJUnitTest {
     DistributionConfigImpl distributionConfig = new DistributionConfigImpl(properties);
     SocketCreatorFactory.setDistributionConfig(distributionConfig);
 
-    Assert.assertTrue(SocketCreatorFactory.getSSLSocketCreatorForComponent(SSLEnabledComponent.CLUSTER).useSSL());
-    Assert.assertTrue(SocketCreatorFactory.getSSLSocketCreatorForComponent(SSLEnabledComponent.GATEWAY).useSSL());
-    Assert.assertTrue(SocketCreatorFactory.getSSLSocketCreatorForComponent(SSLEnabledComponent.JMX).useSSL());
-    Assert.assertTrue(SocketCreatorFactory.getSSLSocketCreatorForComponent(SSLEnabledComponent.SERVER).useSSL());
-    Assert.assertTrue(SocketCreatorFactory.getSSLSocketCreatorForComponent(SSLEnabledComponent.HTTP_SERVICE).useSSL());
-    Assert.assertTrue(SocketCreatorFactory.getSSLSocketCreatorForComponent(SSLEnabledComponent.LOCATOR).useSSL());
+    Assert.assertTrue(SocketCreatorFactory.getSSLSocketCreatorForComponent(SecurableComponent.CLUSTER).useSSL());
+    Assert.assertTrue(SocketCreatorFactory.getSSLSocketCreatorForComponent(SecurableComponent.GATEWAY).useSSL());
+    Assert.assertTrue(SocketCreatorFactory.getSSLSocketCreatorForComponent(SecurableComponent.JMX).useSSL());
+    Assert.assertTrue(SocketCreatorFactory.getSSLSocketCreatorForComponent(SecurableComponent.SERVER).useSSL());
+    Assert.assertTrue(SocketCreatorFactory.getSSLSocketCreatorForComponent(SecurableComponent.HTTP_SERVICE).useSSL());
+    Assert.assertTrue(SocketCreatorFactory.getSSLSocketCreatorForComponent(SecurableComponent.LOCATOR).useSSL());
   }
 
   @Test
   public void testNewSSLConfigSSLComponentWithoutAliasWithMultiKeyStore() {
-    Properties properties = configureSSLProperties(SSLEnabledComponent.ALL.getConstant());
+    Properties properties = configureSSLProperties(SecurableComponent.ALL.getConstant());
 
     properties.setProperty(SSL_KEYSTORE, TestUtil.getResourcePath(getClass(), "/com/gemstone/gemfire/internal/net/multiKey.jks"));
     properties.setProperty(SSL_TRUSTSTORE, TestUtil.getResourcePath(getClass(), "/com/gemstone/gemfire/internal/net/multiKeyTrust.jks"));
@@ -207,12 +202,12 @@ public class SocketCreatorFactoryJUnitTest extends JSSESocketJUnitTest {
     DistributionConfigImpl distributionConfig = new DistributionConfigImpl(properties);
     SocketCreatorFactory.setDistributionConfig(distributionConfig);
 
-    Assert.assertTrue(SocketCreatorFactory.getSSLSocketCreatorForComponent(SSLEnabledComponent.CLUSTER).useSSL());
-    Assert.assertTrue(SocketCreatorFactory.getSSLSocketCreatorForComponent(SSLEnabledComponent.GATEWAY).useSSL());
-    Assert.assertTrue(SocketCreatorFactory.getSSLSocketCreatorForComponent(SSLEnabledComponent.JMX).useSSL());
-    Assert.assertTrue(SocketCreatorFactory.getSSLSocketCreatorForComponent(SSLEnabledComponent.SERVER).useSSL());
-    Assert.assertTrue(SocketCreatorFactory.getSSLSocketCreatorForComponent(SSLEnabledComponent.HTTP_SERVICE).useSSL());
-    Assert.assertTrue(SocketCreatorFactory.getSSLSocketCreatorForComponent(SSLEnabledComponent.LOCATOR).useSSL());
+    Assert.assertTrue(SocketCreatorFactory.getSSLSocketCreatorForComponent(SecurableComponent.CLUSTER).useSSL());
+    Assert.assertTrue(SocketCreatorFactory.getSSLSocketCreatorForComponent(SecurableComponent.GATEWAY).useSSL());
+    Assert.assertTrue(SocketCreatorFactory.getSSLSocketCreatorForComponent(SecurableComponent.JMX).useSSL());
+    Assert.assertTrue(SocketCreatorFactory.getSSLSocketCreatorForComponent(SecurableComponent.SERVER).useSSL());
+    Assert.assertTrue(SocketCreatorFactory.getSSLSocketCreatorForComponent(SecurableComponent.HTTP_SERVICE).useSSL());
+    Assert.assertTrue(SocketCreatorFactory.getSSLSocketCreatorForComponent(SecurableComponent.LOCATOR).useSSL());
   }
 
   private Properties configureSSLProperties(String sslComponents) {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/24545408/geode-core/src/test/java/com/gemstone/gemfire/management/JMXMBeanDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/JMXMBeanDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/JMXMBeanDUnitTest.java
index 786d405..86a735e 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/JMXMBeanDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/JMXMBeanDUnitTest.java
@@ -22,6 +22,9 @@ import static org.junit.Assert.*;
 
 import java.io.File;
 import java.io.IOException;
+import java.io.Serializable;
+import java.net.Socket;
+import java.rmi.server.RMIClientSocketFactory;
 import java.util.HashMap;
 import java.util.Map;
 import java.util.Properties;
@@ -33,26 +36,21 @@ import javax.management.remote.JMXConnectorFactory;
 import javax.management.remote.JMXServiceURL;
 import javax.rmi.ssl.SslRMIClientSocketFactory;
 
-import org.junit.After;
 import org.junit.Before;
-import org.junit.Ignore;
 import org.junit.Rule;
 import org.junit.Test;
-import org.junit.experimental.categories.Category;
 
-import com.gemstone.gemfire.distributed.AbstractLauncher;
 import com.gemstone.gemfire.distributed.LocatorLauncher;
 import com.gemstone.gemfire.distributed.ServerLauncher;
 import com.gemstone.gemfire.internal.AvailablePortHelper;
-import com.gemstone.gemfire.internal.net.SSLEnabledComponent;
+import com.gemstone.gemfire.internal.net.SocketCreator;
+import com.gemstone.gemfire.internal.security.SecurableComponent;
 import com.gemstone.gemfire.test.dunit.DistributedTestCase;
 import com.gemstone.gemfire.test.dunit.DistributedTestUtils;
 import com.gemstone.gemfire.test.dunit.Host;
-import com.gemstone.gemfire.test.dunit.Invoke;
 import com.gemstone.gemfire.test.dunit.NetworkUtils;
 import com.gemstone.gemfire.test.dunit.VM;
 import com.gemstone.gemfire.test.dunit.rules.DistributedRestoreSystemProperties;
-import com.gemstone.gemfire.test.junit.categories.FlakyTest;
 import com.gemstone.gemfire.test.junit.rules.serializable.SerializableTemporaryFolder;
 import com.gemstone.gemfire.util.test.TestUtil;
 
@@ -85,24 +83,12 @@ public class JMXMBeanDUnitTest extends DistributedTestCase {
     serverHostName = NetworkUtils.getServerHostName(host);
   }
 
-  @After
-  public void after() throws InterruptedException {
-    Invoke.invokeInEveryVM(() -> {
-      if (locatorLauncher != null) {
-        try {
-          assertEquals(AbstractLauncher.Status.STOPPED, locatorLauncher.stop().getStatus());
-        } finally {
-          locatorLauncher = null;
-        }
-      }
-    });
-  }
-
   @Test
-  public void testJMXOverSSLWithoutJMXAlias() {
+  public void testJMXOverSSLWithoutJMXAlias() throws Exception {
+    Properties properties = configureLocatorProperties(new Properties(), jmxPort, serverHostName, true, false, true);
     locator.invoke("Configure and start Locator", () -> {
       System.setProperty("javax.ssl.debug", "true");
-      configureAndStartLocator(locatorPort, jmxPort, serverHostName, true, false, true);
+      configureAndStartLocator(locatorPort, jmxPort, serverHostName, properties);
     });
 
     jmxClient.invoke("Configure and start JMX Client", () -> {
@@ -113,9 +99,10 @@ public class JMXMBeanDUnitTest extends DistributedTestCase {
 
   @Test
   public void testJMXOverSSLWithJMXAlias() throws Exception {
+    Properties properties = configureLocatorProperties(new Properties(), jmxPort, serverHostName, true, false, true);
     locator.invoke("Configure and start Locator", () -> {
       System.setProperty("javax.ssl.debug", "true");
-      configureAndStartLocator(locatorPort, jmxPort, serverHostName, true, false, true);
+      configureAndStartLocator(locatorPort, jmxPort, serverHostName, properties);
     });
 
     jmxClient.invoke("Configure and start JMX Client", () -> {
@@ -125,10 +112,12 @@ public class JMXMBeanDUnitTest extends DistributedTestCase {
   }
 
   @Test
-  public void testJMXOverSSL() {
+  public void testJMXOverSSL() throws Exception {
+    Properties properties = configureLocatorProperties(new Properties(), jmxPort, serverHostName, true, false, true);
+
     locator.invoke("Configure and start Locator", () -> {
       System.setProperty("javax.ssl.debug", "true");
-      configureAndStartLocator(locatorPort, jmxPort, serverHostName, true, false, false);
+      configureAndStartLocator(locatorPort, jmxPort, serverHostName, properties);
     });
 
     jmxClient.invoke("Configure and start JMX Client", () -> {
@@ -138,11 +127,12 @@ public class JMXMBeanDUnitTest extends DistributedTestCase {
   }
 
   @Test
-  public void testJMXOverLegacySSL() {
-    locator.invoke("Configure and start Locator", () -> {
+  public void testJMXOverLegacySSL() throws Exception {
+    Properties properties = configureLocatorProperties(new Properties(), jmxPort, serverHostName, true, true, false);
+//    locator.invoke("Configure and start Locator", () -> {
       System.setProperty("javax.ssl.debug", "true");
-      configureAndStartLocator(locatorPort, jmxPort, serverHostName, true, true, false);
-    });
+      configureAndStartLocator(locatorPort, jmxPort, serverHostName, properties);
+//    });
 
     jmxClient.invoke("Configure and start JMX Client", () -> {
       System.setProperty("javax.ssl.debug", "true");
@@ -151,29 +141,21 @@ public class JMXMBeanDUnitTest extends DistributedTestCase {
   }
 
   @Test
-  @Category(FlakyTest.class)
+  //  @Category(FlakyTest.class)
   //To be fixed in GEODE-1716
   public void testJMXOverNonSSL() throws Exception {
-    locator.invoke("Configure and start Locator", () -> {
-      configureAndStartLocator(locatorPort, jmxPort, serverHostName, false);
-    });
-
-    jmxClient.invoke("Configure and start JMX Client", () -> {
-      connectAndValidateAsJmxClient(jmxPort, serverHostName, false);
-    });
-
+    Properties properties = configureLocatorProperties(new Properties(), jmxPort, serverHostName, false, false, false);
+    locator.invoke("Configure and start Locator", () -> configureAndStartLocator(locatorPort, jmxPort, serverHostName, properties));
+    jmxClient.invoke("Configure and start JMX Client", () -> connectAndValidateAsJmxClient(jmxPort, serverHostName, false));
   }
 
   @Test
   public void testJMXOverNonSSLWithClientUsingIncorrectPort() throws Exception {
-    locator.invoke("Configure and start Locator", () -> {
-      configureAndStartLocator(locatorPort, jmxPort, serverHostName, false);
-    });
-
-    assertThatThrownBy(() -> jmxClient.invoke("Configure and start JMX Client", () -> {
-      connectAndValidateAsJmxClient(9999, serverHostName, false);
-    })).hasCauseExactlyInstanceOf(IOException.class).hasRootCauseExactlyInstanceOf(java.net.ConnectException.class);
+    Properties properties = configureLocatorProperties(new Properties(), jmxPort, serverHostName, false, false, false);
+    locator.invoke("Configure and start Locator", () -> configureAndStartLocator(locatorPort, jmxPort, serverHostName, properties));
 
+    assertThatThrownBy(() -> jmxClient.invoke("Configure and start JMX Client", () -> connectAndValidateAsJmxClient(9999, serverHostName, false))).hasCauseExactlyInstanceOf(IOException.class)
+                                                                                                                                                  .hasRootCauseExactlyInstanceOf(java.net.ConnectException.class);
   }
 
 
@@ -184,7 +166,7 @@ public class JMXMBeanDUnitTest extends DistributedTestCase {
   private void connectAndValidateAsJmxClient(final int jmxPort, final String serverHostName, final boolean useSSL, final boolean useMulti) throws Exception {
     // JMX RMI
 
-    Map<String,Object> environment = new HashMap();
+    Map<String, Object> environment = new HashMap();
 
     if (useSSL) {
       System.setProperty("javax.net.ssl.keyStore", useMulti ? getMultiKeyKeystore() : getSimpleSingleKeyKeystore());
@@ -193,6 +175,7 @@ public class JMXMBeanDUnitTest extends DistributedTestCase {
       System.setProperty("javax.net.ssl.trustStore", useMulti ? getMultiKeyTruststore() : getSimpleSingleKeyKeystore());
       System.setProperty("javax.net.ssl.trustStoreType", "JKS");
       System.setProperty("javax.net.ssl.trustStorePassword", "password");
+      System.setProperty("com.sun.management.jmxremote.ssl.need.client.auth", "true");
       System.setProperty("com.sun.management.jmxremote.ssl", "true");
       System.setProperty("com.sun.management.jmxremote.registry.ssl", "true");
       environment.put("com.sun.jndi.rmi.factory.socket", new SslRMIClientSocketFactory());
@@ -218,45 +201,18 @@ public class JMXMBeanDUnitTest extends DistributedTestCase {
     }
   }
 
-  private void configureAndStartServer(final int locatorPort, final String serverHostName) throws IOException {
-    final String memberName = getUniqueName() + "-server";
-    final File workingDirectory = temporaryFolder.newFolder(memberName);
-
-    Properties properties = configureServerProperties(new Properties(), serverHostName + "[" + locatorPort + "]");
-    ServerLauncher.Builder builder = new ServerLauncher.Builder();
-
-    //    properties.stringPropertyNames().stream().map((name) -> builder.set(name, properties.getProperty(name)));
-    for (String propertyName : properties.stringPropertyNames()) {
-      builder.set(propertyName, properties.getProperty(propertyName));
-    }
-    builder.setServerPort(0)
-           .setHostNameForClients(serverHostName)
-           .setServerBindAddress(serverHostName)
-           .setWorkingDirectory(workingDirectory.getCanonicalPath())
-           .setMemberName(memberName)
-           .build()
-           .start();
-  }
-
-  private void configureAndStartLocator(final int locatorPort, final int jmxPort, final String serverHostName, final boolean useSSL) throws IOException {
-    configureAndStartLocator(locatorPort, jmxPort, serverHostName, useSSL, false, false);
+  private void configureAndStartLocator(final int locatorPort, final int jmxPort, final String serverHostName, final Properties properties) throws IOException {
+    configureAndStartLocator(locatorPort, serverHostName, properties);
   }
 
-  private void configureAndStartLocator(final int locatorPort,
-                                        final int jmxPort,
-                                        final String serverHostName,
-                                        final boolean useSSL,
-                                        final boolean useLegacySSL,
-                                        final boolean useMultiKeyKeystore) throws IOException {
+  private void configureAndStartLocator(final int locatorPort, final String serverHostName, final Properties properties) throws IOException {
     DistributedTestUtils.deleteLocatorStateFile();
 
     final String memberName = getUniqueName() + "-locator";
     final File workingDirectory = temporaryFolder.newFolder(memberName);
 
-    Properties properties = configureLocatorProperties(new Properties(), jmxPort, serverHostName, useSSL, useLegacySSL, useMultiKeyKeystore);
     LocatorLauncher.Builder builder = new LocatorLauncher.Builder();
 
-    //    properties.stringPropertyNames().stream().map((name) -> builder.set(name, properties.getProperty(name)));
     for (String propertyName : properties.stringPropertyNames()) {
       builder.set(propertyName, properties.getProperty(propertyName));
     }
@@ -293,7 +249,7 @@ public class JMXMBeanDUnitTest extends DistributedTestCase {
         properties.setProperty(SSL_TRUSTSTORE_PASSWORD, "password");
         properties.setProperty(SSL_KEYSTORE, getSimpleSingleKeyKeystore());
         properties.setProperty(SSL_TRUSTSTORE, getSimpleSingleKeyKeystore());
-        properties.setProperty(SSL_ENABLED_COMPONENTS, SSLEnabledComponent.JMX.toString());
+        properties.setProperty(SSL_ENABLED_COMPONENTS, SecurableComponent.JMX.getConstant());
 
         if (useMultiKey) {
           properties.setProperty(SSL_KEYSTORE, getMultiKeyKeystore());
@@ -342,4 +298,20 @@ public class JMXMBeanDUnitTest extends DistributedTestCase {
     properties.setProperty(USE_CLUSTER_CONFIGURATION, "false");
     return properties;
   }
+
+  private static class GemFireRMIClientSocketFactory implements RMIClientSocketFactory, Serializable {
+
+    private static final long serialVersionUID = -7604285019188827617L;
+
+    private/* final hack to prevent serialization */ transient SocketCreator sc;
+
+    public GemFireRMIClientSocketFactory(SocketCreator sc) {
+      this.sc = sc;
+    }
+
+    @Override
+    public Socket createSocket(String host, int port) throws IOException {
+      return this.sc.connectForClient(host, port, 0/* no timeout */);
+    }
+  }
 }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/24545408/geode-core/src/test/java/com/gemstone/gemfire/management/internal/JettyHelperJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/JettyHelperJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/JettyHelperJUnitTest.java
index b53f39c..5aac277 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/JettyHelperJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/JettyHelperJUnitTest.java
@@ -23,10 +23,8 @@ import org.eclipse.jetty.server.ServerConnector;
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
 
-import com.gemstone.gemfire.internal.admin.SSLConfig;
 import com.gemstone.gemfire.internal.net.SSLConfigurationFactory;
-import com.gemstone.gemfire.internal.net.SSLEnabledComponent;
-import com.gemstone.gemfire.internal.net.SocketCreatorFactory;
+import com.gemstone.gemfire.internal.security.SecurableComponent;
 import com.gemstone.gemfire.test.junit.categories.UnitTest;
 
 /**
@@ -44,7 +42,7 @@ public class JettyHelperJUnitTest {
   @Test
   public void testSetPortNoBindAddress() throws Exception {
 
-    final Server jetty = JettyHelper.initJetty(null, 8090, SSLConfigurationFactory.getSSLConfigForComponent(SSLEnabledComponent.HTTP_SERVICE));
+    final Server jetty = JettyHelper.initJetty(null, 8090, SSLConfigurationFactory.getSSLConfigForComponent(SecurableComponent.HTTP_SERVICE));
 
     assertNotNull(jetty);
     assertNotNull(jetty.getConnectors()[0]);
@@ -54,7 +52,7 @@ public class JettyHelperJUnitTest {
   @Test
   public void testSetPortWithBindAddress() throws Exception {
 
-    final Server jetty = JettyHelper.initJetty("10.123.50.1", 10480, SSLConfigurationFactory.getSSLConfigForComponent(SSLEnabledComponent.HTTP_SERVICE));
+    final Server jetty = JettyHelper.initJetty("10.123.50.1", 10480, SSLConfigurationFactory.getSSLConfigForComponent(SecurableComponent.HTTP_SERVICE));
 
     assertNotNull(jetty);
     assertNotNull(jetty.getConnectors()[0]);

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/24545408/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/HTTPServiceSSLSupportJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/HTTPServiceSSLSupportJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/HTTPServiceSSLSupportJUnitTest.java
index 0bfdf52..ebb1033 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/HTTPServiceSSLSupportJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/HTTPServiceSSLSupportJUnitTest.java
@@ -29,7 +29,6 @@ import org.junit.experimental.categories.Category;
 
 import com.gemstone.gemfire.distributed.internal.DistributionConfig;
 import com.gemstone.gemfire.distributed.internal.DistributionConfigImpl;
-import com.gemstone.gemfire.internal.net.SSLEnabledComponent;
 import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
 import com.gemstone.gemfire.util.test.TestUtil;
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/24545408/geode-core/src/test/java/com/gemstone/gemfire/test/dunit/internal/JUnit4DistributedTestCase.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/test/dunit/internal/JUnit4DistributedTestCase.java b/geode-core/src/test/java/com/gemstone/gemfire/test/dunit/internal/JUnit4DistributedTestCase.java
index 6be3889..87cd557 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/test/dunit/internal/JUnit4DistributedTestCase.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/test/dunit/internal/JUnit4DistributedTestCase.java
@@ -494,6 +494,7 @@ public abstract class JUnit4DistributedTestCase implements DistributedTestFixtur
     if (!getDistributedSystemProperties().isEmpty()) {
       disconnectAllFromDS();
     }
+    Invoke.invokeInEveryVM("SocketCreateFactory.reset", () -> SocketCreatorFactory.close());
   }
 
   /**
@@ -566,7 +567,6 @@ public abstract class JUnit4DistributedTestCase implements DistributedTestFixtur
     RegionTestCase.preSnapshotRegion = null;
     SocketCreator.resetHostNameCache();
     SocketCreator.resolve_dns = true;
-    SocketCreatorFactory.close();
     Message.MAX_MESSAGE_SIZE = Message.DEFAULT_MAX_MESSAGE_SIZE;
 
     // clear system properties -- keep alphabetized

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/24545408/geode-pulse/src/test/java/com/vmware/gemfire/tools/pulse/testbed/driver/PulseUITest.java
----------------------------------------------------------------------
diff --git a/geode-pulse/src/test/java/com/vmware/gemfire/tools/pulse/testbed/driver/PulseUITest.java b/geode-pulse/src/test/java/com/vmware/gemfire/tools/pulse/testbed/driver/PulseUITest.java
index 35339d7..3ce8855 100644
--- a/geode-pulse/src/test/java/com/vmware/gemfire/tools/pulse/testbed/driver/PulseUITest.java
+++ b/geode-pulse/src/test/java/com/vmware/gemfire/tools/pulse/testbed/driver/PulseUITest.java
@@ -36,7 +36,7 @@ import org.openqa.selenium.support.ui.ExpectedCondition;
 import org.openqa.selenium.support.ui.WebDriverWait;
 
 import com.gemstone.gemfire.internal.net.SSLConfigurationFactory;
-import com.gemstone.gemfire.internal.net.SSLEnabledComponent;
+import com.gemstone.gemfire.internal.security.SecurableComponent;
 import com.gemstone.gemfire.management.internal.JettyHelper;
 import com.gemstone.gemfire.test.junit.categories.UITest;
 import com.vmware.gemfire.tools.pulse.testbed.GemFireDistributedSystem.Locator;
@@ -72,7 +72,7 @@ public class PulseUITest {
     path = getPulseWarPath();
     //System.setProperty("pulse.propMockDataUpdaterClass", "com.vmware.gemfire.tools.pulse.testbed.PropMockDataUpdater");
 
-    jetty = JettyHelper.initJetty(host, port, SSLConfigurationFactory.getSSLConfigForComponent(SSLEnabledComponent.HTTP_SERVICE));
+    jetty = JettyHelper.initJetty(host, port, SSLConfigurationFactory.getSSLConfigForComponent(SecurableComponent.HTTP_SERVICE));
     JettyHelper.addWebApplication(jetty, context, getPulseWarPath());
     jetty.start();
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/24545408/geode-pulse/src/test/java/com/vmware/gemfire/tools/pulse/tests/PulseAbstractTest.java
----------------------------------------------------------------------
diff --git a/geode-pulse/src/test/java/com/vmware/gemfire/tools/pulse/tests/PulseAbstractTest.java b/geode-pulse/src/test/java/com/vmware/gemfire/tools/pulse/tests/PulseAbstractTest.java
index e06891d..b11cf2c 100644
--- a/geode-pulse/src/test/java/com/vmware/gemfire/tools/pulse/tests/PulseAbstractTest.java
+++ b/geode-pulse/src/test/java/com/vmware/gemfire/tools/pulse/tests/PulseAbstractTest.java
@@ -45,7 +45,7 @@ import org.openqa.selenium.support.ui.ExpectedConditions;
 import org.openqa.selenium.support.ui.WebDriverWait;
 
 import com.gemstone.gemfire.internal.net.SSLConfigurationFactory;
-import com.gemstone.gemfire.internal.net.SSLEnabledComponent;
+import com.gemstone.gemfire.internal.security.SecurableComponent;
 import com.gemstone.gemfire.management.internal.JettyHelper;
 import com.vmware.gemfire.tools.pulse.internal.data.PulseConstants;
 
@@ -148,7 +148,7 @@ public abstract class PulseAbstractTest extends PulseBaseTest {
     int port = 8080;
     String context = "/pulse";
 
-    jetty = JettyHelper.initJetty(host, port, SSLConfigurationFactory.getSSLConfigForComponent(SSLEnabledComponent.HTTP_SERVICE));
+    jetty = JettyHelper.initJetty(host, port, SSLConfigurationFactory.getSSLConfigForComponent(SecurableComponent.HTTP_SERVICE));
     JettyHelper.addWebApplication(jetty, context, getPulseWarPath());
     jetty.start();
 


[37/50] [abbrv] incubator-geode git commit: Merge branch 'develop' into feature/GEODE-420

Posted by ud...@apache.org.
Merge branch 'develop' into feature/GEODE-420


Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/c6f59974
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/c6f59974
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/c6f59974

Branch: refs/heads/develop
Commit: c6f599748e11db03880ec8d036564447bf6db36e
Parents: a97ea4e bb829d3
Author: Udo Kohlmeyer <uk...@pivotal.io>
Authored: Mon Sep 5 08:44:57 2016 +1000
Committer: Udo Kohlmeyer <uk...@pivotal.io>
Committed: Mon Sep 5 08:44:57 2016 +1000

----------------------------------------------------------------------
 .../gemfire/internal/GemFireVersion.java        |  66 ++--
 .../internal/cache/BucketRegionQueue.java       |  28 +-
 .../internal/cache/DistributedRegion.java       |   2 +-
 .../gemfire/internal/cache/EntryExpiryTask.java |   3 +
 .../gemfire/internal/cache/ExpiryTask.java      |   5 +
 .../src/test/java/cacheRunner/Portfolio.java    | 128 ------
 .../src/test/java/cacheRunner/Position.java     |  73 ----
 .../com/gemstone/gemfire/TXExpiryJUnitTest.java |   3 +
 .../cache/query/dunit/RemoteQueryDUnitTest.java |  14 +-
 .../gemfire/cache30/RegionTestCase.java         |   9 +-
 .../internal/GemFireVersionJUnitTest.java       |  22 +-
 .../internal/cache/Bug37377DUnitTest.java       | 393 +++++++++----------
 .../PartitionedRegionSingleHopDUnitTest.java    |  37 +-
 ...tegratedClientGetPutAuthDistributedTest.java |   3 +-
 .../AbstractPartitionedRepositoryManager.java   | 124 ++++++
 .../lucene/internal/IndexRepositoryFactory.java |  21 +-
 .../internal/LuceneIndexCreationProfile.java    |  12 +-
 .../lucene/internal/LuceneIndexFactory.java     |  30 ++
 .../LuceneIndexForPartitionedRegion.java        | 134 +++----
 .../cache/lucene/internal/LuceneIndexImpl.java  |  79 +++-
 .../cache/lucene/internal/LuceneRawIndex.java   |  43 ++
 .../lucene/internal/LuceneRawIndexFactory.java  |  27 ++
 .../lucene/internal/LuceneServiceImpl.java      |   5 +-
 .../internal/PartitionedRepositoryManager.java  | 123 +-----
 .../internal/RawIndexRepositoryFactory.java     |  63 +++
 .../internal/RawLuceneRepositoryManager.java    |  46 +++
 .../repository/IndexRepositoryImpl.java         |   6 +-
 .../LuceneIndexCreationIntegrationTest.java     |  29 ++
 .../cache/lucene/LuceneQueriesPRBase.java       |   7 +-
 .../LuceneIndexCreationProfileJUnitTest.java    |  12 +-
 .../LuceneIndexForPartitionedRegionTest.java    |  34 +-
 .../LuceneIndexRecoveryHAIntegrationTest.java   |  19 +-
 .../PartitionedRepositoryManagerJUnitTest.java  |  68 ++--
 .../RawLuceneRepositoryManagerJUnitTest.java    |  97 +++++
 .../DistributedScoringJUnitTest.java            |   2 +-
 .../IndexRepositoryImplJUnitTest.java           |   6 +-
 .../IndexRepositoryImplPerformanceTest.java     |   2 +-
 .../cache/lucene/test/IndexRepositorySpy.java   |  20 +-
 .../wan/GatewaySenderEventRemoteDispatcher.java |   8 +-
 39 files changed, 991 insertions(+), 812 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/c6f59974/geode-core/src/main/java/com/gemstone/gemfire/internal/GemFireVersion.java
----------------------------------------------------------------------


[48/50] [abbrv] incubator-geode git commit: GEODE-420: Fixing tests after merge

Posted by ud...@apache.org.
GEODE-420: Fixing tests after merge


Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/79d9b014
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/79d9b014
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/79d9b014

Branch: refs/heads/develop
Commit: 79d9b0149c3f6b9dfce3f6cb7c442ef5faf77e4e
Parents: 0b579cf
Author: Udo Kohlmeyer <uk...@pivotal.io>
Authored: Tue Sep 13 11:40:37 2016 +1000
Committer: Udo Kohlmeyer <uk...@pivotal.io>
Committed: Tue Sep 13 11:40:37 2016 +1000

----------------------------------------------------------------------
 .../internal/InternalDistributedSystemJUnitTest.java           | 6 ++----
 .../com/gemstone/gemfire/codeAnalysis/excludedClasses.txt      | 1 +
 2 files changed, 3 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/79d9b014/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/InternalDistributedSystemJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/InternalDistributedSystemJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/InternalDistributedSystemJUnitTest.java
index 6695371..5c70a78 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/InternalDistributedSystemJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/InternalDistributedSystemJUnitTest.java
@@ -40,7 +40,6 @@ import org.junit.Test;
 import org.junit.experimental.categories.Category;
 import org.junit.rules.ExpectedException;
 
-import com.gemstone.gemfire.GemFireConfigException;
 import com.gemstone.gemfire.distributed.DistributedSystem;
 import com.gemstone.gemfire.distributed.DistributedSystemDisconnectedException;
 import com.gemstone.gemfire.distributed.Locator;
@@ -57,8 +56,7 @@ import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
  * @since GemFire 2.1
  */
 @Category(IntegrationTest.class)
-public class InternalDistributedSystemJUnitTest
-{
+public class InternalDistributedSystemJUnitTest {
 
   /**
    * A connection to a distributed system created by this test
@@ -714,7 +712,7 @@ public class InternalDistributedSystemJUnitTest
     Properties props = getCommonProperties();
     props.setProperty(SSL_ENABLED_COMPONENTS, "cluster,server");
     Config config1 = new DistributionConfigImpl(props, false);
-    assertEquals("cluster server", config1.getAttribute(SSL_ENABLED_COMPONENTS));
+    assertEquals("cluster,server", config1.getAttribute(SSL_ENABLED_COMPONENTS));
   }
 
   @Rule

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/79d9b014/geode-core/src/test/resources/com/gemstone/gemfire/codeAnalysis/excludedClasses.txt
----------------------------------------------------------------------
diff --git a/geode-core/src/test/resources/com/gemstone/gemfire/codeAnalysis/excludedClasses.txt b/geode-core/src/test/resources/com/gemstone/gemfire/codeAnalysis/excludedClasses.txt
index 5e5a4c4..4d27e43 100644
--- a/geode-core/src/test/resources/com/gemstone/gemfire/codeAnalysis/excludedClasses.txt
+++ b/geode-core/src/test/resources/com/gemstone/gemfire/codeAnalysis/excludedClasses.txt
@@ -154,3 +154,4 @@ org/apache/geode/security/ResourcePermission
 org/apache/geode/security/ResourcePermission$Operation
 org/apache/geode/security/ResourcePermission$Resource
 com/gemstone/gemfire/distributed/internal/tcpserver/LocatorCancelException
+com.gemstone.gemfire.internal.security.SecurableCommunicationChannel


[16/50] [abbrv] incubator-geode git commit: GEODE-420: Updating JavaDoc reference as per review

Posted by ud...@apache.org.
GEODE-420: Updating JavaDoc reference as per review


Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/02c0becd
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/02c0becd
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/02c0becd

Branch: refs/heads/develop
Commit: 02c0becdb4bbe335c49858b7056ca3d92c92f06d
Parents: 12e73a9
Author: Udo Kohlmeyer <uk...@pivotal.io>
Authored: Mon Aug 22 11:46:37 2016 +1000
Committer: Udo Kohlmeyer <uk...@pivotal.io>
Committed: Mon Aug 22 11:46:37 2016 +1000

----------------------------------------------------------------------
 .../distributed/ConfigurationProperties.java    | 99 +++++++++++++-------
 1 file changed, 67 insertions(+), 32 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/02c0becd/geode-core/src/main/java/com/gemstone/gemfire/distributed/ConfigurationProperties.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/distributed/ConfigurationProperties.java b/geode-core/src/main/java/com/gemstone/gemfire/distributed/ConfigurationProperties.java
index 59d8c2f..9f41a64 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/distributed/ConfigurationProperties.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/distributed/ConfigurationProperties.java
@@ -463,8 +463,9 @@ public interface ConfigurationProperties {
    * </p>
    * <U>Default</U>: <code>any</code></p>
    * <U>Since</U>: GemFire 8.0
-   * @deprecated Since Geode 1.0 use {@link #CLUSTER_SSL_CIPHERS}
+   * @deprecated Since Geode 1.0 use {@link #SSL_CIPHERS}
    */
+  @Deprecated
   String GATEWAY_SSL_CIPHERS = "gateway-ssl-ciphers";
   /**
    * The static String definition of the <i>"gateway-ssl-enabled"</i> property
@@ -477,6 +478,7 @@ public interface ConfigurationProperties {
    * <U>Since</U>: GemFire 8.0
    * @deprecated Since Geode 1.0 use {@link #SSL_ENABLED_COMPONENTS} with the optional {@link #SSL_GATEWAY_ALIAS}
    */
+  @Deprecated
   String GATEWAY_SSL_ENABLED = "gateway-ssl-enabled";
   /**
    * The static String definition of the <i>"gateway-ssl-keystore"</i> property
@@ -486,8 +488,9 @@ public interface ConfigurationProperties {
    * </p>
    * <U>Default</U>: ""</p>
    * <U>Since</U>: GemFire 8.0
-   * @deprecated Since Geode 1.0 use {@link #CLUSTER_SSL_KEYSTORE}
+   * @deprecated Since Geode 1.0 use {@link #SSL_KEYSTORE}
    */
+  @Deprecated
   String GATEWAY_SSL_KEYSTORE = "gateway-ssl-keystore";
   /**
    * The static String definition of the <i>"gateway-ssl-keystore-password"</i> property
@@ -497,8 +500,9 @@ public interface ConfigurationProperties {
    * </p>
    * <U>Default</U>: ""</p>
    * <U>Since</U>: GemFire 8.0
-   * @deprecated Since Geode 1.0 use {@link #CLUSTER_SSL_KEYSTORE_PASSWORD}
+   * @deprecated Since Geode 1.0 use {@link #SSL_KEYSTORE_PASSWORD}
    */
+  @Deprecated
   String GATEWAY_SSL_KEYSTORE_PASSWORD = "gateway-ssl-keystore-password";
   /**
    * The static String definition of the <i>"gateway-ssl-keystore-type"</i> property
@@ -508,8 +512,9 @@ public interface ConfigurationProperties {
    * </p>
    * <U>Default</U>: ""</p>
    * <U>Since</U>: GemFire 8.0
-   * @deprecated Since Geode 1.0 use {@link #CLUSTER_SSL_KEYSTORE_TYPE}
+   * @deprecated Since Geode 1.0 use {@link #SSL_KEYSTORE_TYPE}
    */
+  @Deprecated
   String GATEWAY_SSL_KEYSTORE_TYPE = "gateway-ssl-keystore-type";
   /**
    * The static String definition of the <i>"gateway-ssl-protocols"</i> property
@@ -519,8 +524,9 @@ public interface ConfigurationProperties {
    * </p>
    * <U>Default</U>: <code>any</code></p>
    * <U>Since</U>: GemFire 8.0
-   * @deprecated Since Geode 1.0 use {@link #CLUSTER_SSL_PROTOCOLS}
+   * @deprecated Since Geode 1.0 use {@link #SSL_PROTOCOLS}
    */
+  @Deprecated
   String GATEWAY_SSL_PROTOCOLS = "gateway-ssl-protocols";
   /**
    * The static String definition of the <i>"gateway-ssl-require-authentication"</i> property
@@ -530,8 +536,9 @@ public interface ConfigurationProperties {
    * </p>
    * <U>Default</U>: <code>any</code></p>
    * <U>Since</U>: GemFire 8.0
-   * @deprecated Since Geode 1.0 use {@link #CLUSTER_SSL_REQUIRE_AUTHENTICATION}
+   * @deprecated Since Geode 1.0 use {@link #SSL_REQUIRE_AUTHENTICATION}
    */
+  @Deprecated
   String GATEWAY_SSL_REQUIRE_AUTHENTICATION = "gateway-ssl-require-authentication";
   /**
    * The static String definition of the <i>"gateway-ssl-truststore"</i> property
@@ -541,8 +548,9 @@ public interface ConfigurationProperties {
    * </p>
    * <U>Default</U>: ""</p>
    * <U>Since</U>: GemFire 8.0
-   * @deprecated Since Geode 1.0 use {@link #CLUSTER_SSL_TRUSTSTORE}
+   * @deprecated Since Geode 1.0 use {@link #SSL_TRUSTSTORE}
    */
+  @Deprecated
   String GATEWAY_SSL_TRUSTSTORE = "gateway-ssl-truststore";
   /**
    * The static String definition of the <i>"gateway-ssl-truststore-password"</i> property
@@ -552,8 +560,9 @@ public interface ConfigurationProperties {
    * </p>
    * <U>Default</U>: ""</p>
    * <U>Since</U>: GemFire 8.0
-   * @deprecated Since Geode 1.0 use {@link #CLUSTER_SSL_TRUSTSTORE_PASSWORD}
+   * @deprecated Since Geode 1.0 use {@link #SSL_TRUSTSTORE_PASSWORD}
    */
+  @Deprecated
   String GATEWAY_SSL_TRUSTSTORE_PASSWORD = "gateway-ssl-truststore-password";
   /**
    * The static String definition of the <i>"groups"</i> property.
@@ -609,8 +618,9 @@ public interface ConfigurationProperties {
    * </p>
    * <U>Default</U>: <code>any</code></p>
    * <U>Since</U>: GemFire 8.1
-   * @deprecated Since Geode 1.0 use {@link #CLUSTER_SSL_CIPHERS}
+   * @deprecated Since Geode 1.0 use {@link #SSL_CIPHERS}
    */
+  @Deprecated
   String HTTP_SERVICE_SSL_CIPHERS = "http-service-ssl-ciphers";
   /**
    * The static String definition of the <i>"http-service-ssl-enabled"</i> property
@@ -624,6 +634,7 @@ public interface ConfigurationProperties {
    * <U>Since</U>: GemFire 8.1
    * @deprecated Since Geode 1.0 use {@link #SSL_ENABLED_COMPONENTS} with optional {@link #SSL_HTTP_SERVICE_ALIAS}
    */
+  @Deprecated
   String HTTP_SERVICE_SSL_ENABLED = "http-service-ssl-enabled";
   /**
    * The static String definition of the <i>"http-service-ssl-keystore"</i> property
@@ -633,8 +644,9 @@ public interface ConfigurationProperties {
    * </p>
    * <U>Default</U>: ""</p>
    * <U>Since</U>: GemFire 8.1
-   * @deprecated Since Geode 1.0 use {@link #CLUSTER_SSL_KEYSTORE}
+   * @deprecated Since Geode 1.0 use {@link #SSL_KEYSTORE}
    */
+  @Deprecated
   String HTTP_SERVICE_SSL_KEYSTORE = "http-service-ssl-keystore";
   /**
    * The static String definition of the <i>"http-service-ssl-keystore-password"</i> property
@@ -644,8 +656,9 @@ public interface ConfigurationProperties {
    * </p>
    * <U>Default</U>: ""</p>
    * <U>Since</U>: GemFire 8.1
-   * @deprecated Since Geode 1.0 use {@link #CLUSTER_SSL_KEYSTORE_PASSWORD}
+   * @deprecated Since Geode 1.0 use {@link #SSL_KEYSTORE_PASSWORD}
    */
+  @Deprecated
   String HTTP_SERVICE_SSL_KEYSTORE_PASSWORD = "http-service-ssl-keystore-password";
   /**
    * The static String definition of the <i>"http-service-ssl-keystore-type"</i> property
@@ -655,8 +668,9 @@ public interface ConfigurationProperties {
    * </p>
    * <U>Default</U>: ""</p>
    * <U>Since</U>: GemFire 8.1
-   * @deprecated Since Geode 1.0 use {@link #CLUSTER_SSL_KEYSTORE_TYPE}
+   * @deprecated Since Geode 1.0 use {@link #SSL_KEYSTORE_TYPE}
    */
+  @Deprecated
   String HTTP_SERVICE_SSL_KEYSTORE_TYPE = "http-service-ssl-keystore-type";
   /**
    * The static String definition of the <i>"http-service-ssl-protocols"</i> property
@@ -666,8 +680,9 @@ public interface ConfigurationProperties {
    * </p>
    * <U>Default</U>: <code>any</code></p>
    * <U>Since</U>: GemFire 8.1
-   * @deprecated Since Geode 1.0 use {@link #CLUSTER_SSL_PROTOCOLS}
+   * @deprecated Since Geode 1.0 use {@link #SSL_PROTOCOLS}
    */
+  @Deprecated
   String HTTP_SERVICE_SSL_PROTOCOLS = "http-service-ssl-protocols";
   /**
    * The static String definition of the <i>"http-service-ssl-require-authentication"</i> property
@@ -677,8 +692,9 @@ public interface ConfigurationProperties {
    * </p>
    * <U>Default</U>: <code>false</code></p>
    * <U>Since</U>: GemFire 8.1
-   * @deprecated Since Geode 1.0 use {@link #CLUSTER_SSL_REQUIRE_AUTHENTICATION}
+   * @deprecated Since Geode 1.0 use {@link #SSL_HTTP_SERVICE_REQUIRE_AUTHENTICATION}
    */
+  @Deprecated
   String HTTP_SERVICE_SSL_REQUIRE_AUTHENTICATION = "http-service-ssl-require-authentication";
   /**
    * The static String definition of the <i>"http-service-ssl-truststore"</i> property
@@ -688,8 +704,9 @@ public interface ConfigurationProperties {
    * </p>
    * <U>Default</U>: ""</p>
    * <U>Since</U>: GemFire 8.1
-   * @deprecated Since Geode 1.0 use {@link #CLUSTER_SSL_TRUSTSTORE}
+   * @deprecated Since Geode 1.0 use {@link #SSL_TRUSTSTORE}
    */
+  @Deprecated
   String HTTP_SERVICE_SSL_TRUSTSTORE = "http-service-ssl-truststore";
   /**
    * The static String definition of the <i>"http-service-ssl-truststore-password"</i> property
@@ -699,8 +716,9 @@ public interface ConfigurationProperties {
    * </p>
    * <U>Default</U>: ""</p>
    * <U>Since</U>: GemFire 8.1
-   * @deprecated Since Geode 1.0 use {@link #CLUSTER_SSL_TRUSTSTORE_PASSWORD}
+   * @deprecated Since Geode 1.0 use {@link #SSL_TRUSTSTORE_PASSWORD}
    */
+  @Deprecated
   String HTTP_SERVICE_SSL_TRUSTSTORE_PASSWORD = "http-service-ssl-truststore-password";
   /**
    * The static String definition of the jmx-manager-ssl prefix "jmx-manager-ssl-" used in conjunction with other jmx-manager-ssl-* properties</i> property
@@ -839,8 +857,9 @@ public interface ConfigurationProperties {
    * Those listed must be supported by the available providers.
    * </p>
    * <U>Default</U>: "any"
-   * @deprecated Since Geode 1.0 use {@link #CLUSTER_SSL_CIPHERS}
+   * @deprecated Since Geode 1.0 use {@link #SSL_CIPHERS}
    */
+  @Deprecated
   String JMX_MANAGER_SSL_CIPHERS = "jmx-manager-ssl-ciphers";
   /**
    * The static String definition of the <i>"jmx-manager-ssl-enabled"</i> property
@@ -854,6 +873,7 @@ public interface ConfigurationProperties {
    * <U>Default</U>: "false"
    * @deprecated Since Geode 1.0 use {@link #SSL_ENABLED_COMPONENTS} with optional {@link #SSL_JMX_MANAGER_ALIAS}
    */
+  @Deprecated
   String JMX_MANAGER_SSL_ENABLED = "jmx-manager-ssl-enabled";
   /**
    * The static String definition of the <i>"jmx-manager-ssl-keystore"</i> property
@@ -863,8 +883,9 @@ public interface ConfigurationProperties {
    * </p>
    * <U>Default</U>: ""</p>
    * <U>Since</U>: GemFire 8.0
-   * @deprecated Since Geode 1.0 use {@link #CLUSTER_SSL_KEYSTORE}
+   * @deprecated Since Geode 1.0 use {@link #SSL_KEYSTORE}
    */
+  @Deprecated
   String JMX_MANAGER_SSL_KEYSTORE = "jmx-manager-ssl-keystore";
   /**
    * The static String definition of the <i>"jmx-manager-ssl-keystore-password"</i> property
@@ -874,8 +895,9 @@ public interface ConfigurationProperties {
    * </p>
    * <U>Default</U>: ""</p>
    * <U>Since</U>: GemFire 8.0
-   * @deprecated Since Geode 1.0 use {@link #CLUSTER_SSL_KEYSTORE_PASSWORD}
+   * @deprecated Since Geode 1.0 use {@link #SSL_KEYSTORE_PASSWORD}
    */
+  @Deprecated
   String JMX_MANAGER_SSL_KEYSTORE_PASSWORD = "jmx-manager-ssl-keystore-password";
   /**
    * The static String definition of the <i>"jmx-manager-ssl-keystore-type"</i> property
@@ -885,8 +907,9 @@ public interface ConfigurationProperties {
    * </p>
    * <U>Default</U>: ""</p>
    * <U>Since</U>: GemFire 8.0
-   * @deprecated Since Geode 1.0 use {@link #CLUSTER_SSL_KEYSTORE_TYPE}
+   * @deprecated Since Geode 1.0 use {@link #SSL_KEYSTORE_TYPE}
    */
+  @Deprecated
   String JMX_MANAGER_SSL_KEYSTORE_TYPE = "jmx-manager-ssl-keystore-type";
   /**
    * The static String definition of the <i>"jmx-manager-ssl-protocols"</i> property
@@ -895,8 +918,9 @@ public interface ConfigurationProperties {
    * Those listed must be supported by the available providers.
    * </p>
    * <U>Default</U>: "any"
-   * @deprecated Since Geode 1.0 use {@link #CLUSTER_SSL_PROTOCOLS}
+   * @deprecated Since Geode 1.0 use {@link #SSL_PROTOCOLS}
    */
+  @Deprecated
   String JMX_MANAGER_SSL_PROTOCOLS = "jmx-manager-ssl-protocols";
   /**
    * The static String definition of the <i>"jmx-manager-ssl-require-authentication"</i> property
@@ -905,8 +929,9 @@ public interface ConfigurationProperties {
    * side of the connection to be authenticated.
    * </p>
    * <U>Default</U>: "true"
-   * @deprecated Since Geode 1.0 use {@link #CLUSTER_SSL_REQUIRE_AUTHENTICATION}
+   * @deprecated Since Geode 1.0 use {@link #SSL_REQUIRE_AUTHENTICATION}
    */
+  @Deprecated
   String JMX_MANAGER_SSL_REQUIRE_AUTHENTICATION = "jmx-manager-ssl-require-authentication";
   /**
    * The static String definition of the <i>"jmx-manager-ssl-truststore"</i> property
@@ -916,8 +941,9 @@ public interface ConfigurationProperties {
    * </p>
    * <U>Default</U>: ""</p>
    * <U>Since</U>: GemFire 8.0
-   * @deprecated Since Geode 1.0 use {@link #CLUSTER_SSL_TRUSTSTORE}
+   * @deprecated Since Geode 1.0 use {@link #SSL_TRUSTSTORE}
    */
+  @Deprecated
   String JMX_MANAGER_SSL_TRUSTSTORE = "jmx-manager-ssl-truststore";
   /**
    * The static String definition of the <i>"jmx-manager-ssl-truststore-password"</i> property
@@ -927,8 +953,9 @@ public interface ConfigurationProperties {
    * </p>
    * <U>Default</U>: ""</p>
    * <U>Since</U>: GemFire 8.0
-   * @deprecated Since Geode 1.0 use {@link #CLUSTER_SSL_TRUSTSTORE_PASSWORD}
+   * @deprecated Since Geode 1.0 use {@link #SSL_TRUSTSTORE_PASSWORD}
    */
+  @Deprecated
   String JMX_MANAGER_SSL_TRUSTSTORE_PASSWORD = "jmx-manager-ssl-truststore-password";
   /**
    * The static String definition of the <i>"load-cluster-configuration-from-dir"</i> property
@@ -1356,8 +1383,9 @@ public interface ConfigurationProperties {
    * </p>
    * <U>Default</U>: <code>any</code></p>
    * <U>Since</U>: GemFire 8.0
-   * @deprecated Since Geode 1.0 use {@link #CLUSTER_SSL_CIPHERS}
+   * @deprecated Since Geode 1.0 use {@link #SSL_CIPHERS}
    */
+  @Deprecated
   String SERVER_SSL_CIPHERS = "server-ssl-ciphers";
   /**
    * The static String definition of the <i>"server-ssl-enabled"</i> property
@@ -1380,8 +1408,9 @@ public interface ConfigurationProperties {
    * </p>
    * <U>Default</U>: ""</p>
    * <U>Since</U>: GemFire 8.0
-   * @deprecated Since Geode 1.0 use {@link #CLUSTER_SSL_KEYSTORE}
+   * @deprecated Since Geode 1.0 use {@link #SSL_KEYSTORE}
    */
+  @Deprecated
   String SERVER_SSL_KEYSTORE = "server-ssl-keystore";
   /**
    * The static String definition of the <i>"server-ssl-keystore-password"</i> property
@@ -1391,8 +1420,9 @@ public interface ConfigurationProperties {
    * </p>
    * <U>Default</U>: ""</p>
    * <U>Since</U>: GemFire 8.0
-   * @deprecated Since Geode 1.0 use {@link #CLUSTER_SSL_KEYSTORE_PASSWORD}
+   * @deprecated Since Geode 1.0 use {@link #SSL_KEYSTORE_PASSWORD}
    */
+  @Deprecated
   String SERVER_SSL_KEYSTORE_PASSWORD = "server-ssl-keystore-password";
   /**
    * The static String definition of the <i>"server-ssl-keystore-type"</i> property
@@ -1402,8 +1432,9 @@ public interface ConfigurationProperties {
    * </p>
    * <U>Default</U>: ""</p>
    * <U>Since</U>: GemFire 8.0
-   * @deprecated Since Geode 1.0 use {@link #CLUSTER_SSL_KEYSTORE_TYPE}
+   * @deprecated Since Geode 1.0 use {@link #SSL_KEYSTORE_TYPE}
    */
+  @Deprecated
   String SERVER_SSL_KEYSTORE_TYPE = "server-ssl-keystore-type";
   /**
    * The static String definition of the <i>"server-ssl-protocols"</i> property
@@ -1413,8 +1444,9 @@ public interface ConfigurationProperties {
    * </p>
    * <U>Default</U>: <code>any</code></p>
    * <U>Since</U>: GemFire 8.0
-   * @deprecated Since Geode 1.0 use {@link #CLUSTER_SSL_PROTOCOLS}
+   * @deprecated Since Geode 1.0 use {@link #SSL_PROTOCOLS}
    */
+  @Deprecated
   String SERVER_SSL_PROTOCOLS = "server-ssl-protocols";
   /**
    * The static String definition of the <i>"server-ssl-require-authentication"</i> property
@@ -1424,8 +1456,9 @@ public interface ConfigurationProperties {
    * </p>
    * <U>Default</U>: <code>any</code></p>
    * <U>Since</U>: GemFire 8.0
-   * @deprecated Since Geode 1.0 use {@link #CLUSTER_SSL_REQUIRE_AUTHENTICATION}
+   * @deprecated Since Geode 1.0 use {@link #SSL_REQUIRE_AUTHENTICATION}
    */
+  @Deprecated
   String SERVER_SSL_REQUIRE_AUTHENTICATION = "server-ssl-require-authentication";
   /**
    * The static String definition of the <i>"server-ssl-truststore"</i> property
@@ -1435,8 +1468,9 @@ public interface ConfigurationProperties {
    * </p>
    * <U>Default</U>: ""</p>
    * <U>Since</U>: GemFire 8.0
-   * @deprecated Since Geode 1.0 use {@link #CLUSTER_SSL_TRUSTSTORE}
+   * @deprecated Since Geode 1.0 use {@link #SSL_TRUSTSTORE}
    */
+  @Deprecated
   String SERVER_SSL_TRUSTSTORE = "server-ssl-truststore";
   /**
    * The static String definition of the <i>"server-ssl-truststore-password"</i> property
@@ -1446,8 +1480,9 @@ public interface ConfigurationProperties {
    * </p>
    * <U>Default</U>: ""</p>
    * <U>Since</U>: GemFire 8.0
-   * @deprecated Since Geode 1.0 use {@link #CLUSTER_SSL_TRUSTSTORE_PASSWORD}
+   * @deprecated Since Geode 1.0 use {@link #SSL_TRUSTSTORE_PASSWORD}
    */
+  @Deprecated
   String SERVER_SSL_TRUSTSTORE_PASSWORD = "server-ssl-truststore-password";
   /**
    * The static String definition of the <i>"socket-buffer-size"</i> property


[50/50] [abbrv] incubator-geode git commit: Merge branch 'develop' into feature/GEODE-420

Posted by ud...@apache.org.
Merge branch 'develop' into feature/GEODE-420

# Conflicts:
#	geode-core/src/test/resources/com/gemstone/gemfire/codeAnalysis/excludedClasses.txt


Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/a325d074
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/a325d074
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/a325d074

Branch: refs/heads/develop
Commit: a325d074fd676e520dd9f7e565c77017de48d243
Parents: b6f429c 74e7732
Author: Udo Kohlmeyer <uk...@pivotal.io>
Authored: Wed Sep 14 05:09:19 2016 +1000
Committer: Udo Kohlmeyer <uk...@pivotal.io>
Committed: Wed Sep 14 05:09:19 2016 +1000

----------------------------------------------------------------------
 .../modules/session/catalina/DeltaSession7.java | 599 +++++++++++++++++++
 .../catalina/Tomcat7DeltaSessionManager.java    |   6 +
 .../session/Tomcat7SessionsJUnitTest.java       |  40 ++
 .../modules/session/TestSessionsBase.java       |   4 +-
 .../internal/AbstractGroupOrRangeJunction.java  |   2 +-
 .../internal/index/CompactMapRangeIndex.java    |  11 +
 .../membership/gms/auth/GMSAuthenticator.java   |   4 +-
 .../internal/cache/tier/sockets/HandShake.java  |   4 +-
 .../internal/security/GeodeSecurityUtil.java    |  34 +-
 .../security/IntegratedSecurityService.java     |   5 +
 .../internal/security/SecurityService.java      |   1 +
 .../security/shiro/CustomAuthRealm.java         |  19 +-
 .../shiro/GeodeAuthenticationToken.java         |  41 ++
 .../security/shiro/JMXShiroAuthenticator.java   |  20 +-
 .../support/LoginHandlerInterceptor.java        |   7 +-
 .../dunit/CompactRangeIndexQueryDUnitTest.java  |  43 +-
 .../index/CompactRangeIndexJUnitTest.java       |  48 +-
 ...GMSAuthenticatorWithSecurityManagerTest.java |   8 +-
 .../security/IntegratedClientAuthDUnitTest.java |   2 +-
 .../gemfire/codeAnalysis/excludedClasses.txt    |   1 +
 gradle/dependency-versions.properties           |   2 +-
 21 files changed, 835 insertions(+), 66 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/a325d074/geode-core/src/test/resources/com/gemstone/gemfire/codeAnalysis/excludedClasses.txt
----------------------------------------------------------------------
diff --cc geode-core/src/test/resources/com/gemstone/gemfire/codeAnalysis/excludedClasses.txt
index 4d27e43,5e1a3c9..a821897
--- a/geode-core/src/test/resources/com/gemstone/gemfire/codeAnalysis/excludedClasses.txt
+++ b/geode-core/src/test/resources/com/gemstone/gemfire/codeAnalysis/excludedClasses.txt
@@@ -153,5 -153,4 +153,6 @@@ com/gemstone/gemfire/internal/cache/ope
  org/apache/geode/security/ResourcePermission
  org/apache/geode/security/ResourcePermission$Operation
  org/apache/geode/security/ResourcePermission$Resource
 +com/gemstone/gemfire/distributed/internal/tcpserver/LocatorCancelException
 +com.gemstone.gemfire.internal.security.SecurableCommunicationChannel
+ com/gemstone/gemfire/internal/security/shiro/GeodeAuthenticationToken


[49/50] [abbrv] incubator-geode git commit: GEODE-420: Fixing tests after merge

Posted by ud...@apache.org.
GEODE-420: Fixing tests after merge


Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/b6f429cb
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/b6f429cb
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/b6f429cb

Branch: refs/heads/develop
Commit: b6f429cb19783b8aa2e88544d30cac5f0fc87b86
Parents: 79d9b01
Author: Udo Kohlmeyer <uk...@pivotal.io>
Authored: Wed Sep 14 05:06:17 2016 +1000
Committer: Udo Kohlmeyer <uk...@pivotal.io>
Committed: Wed Sep 14 05:06:17 2016 +1000

----------------------------------------------------------------------
 .../java/com/gemstone/gemfire/distributed/LocatorDUnitTest.java    | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/b6f429cb/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorDUnitTest.java
index 2cee5bf..f949e8d 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorDUnitTest.java
@@ -364,7 +364,7 @@ public class LocatorDUnitTest extends JUnit4DistributedTestCase {
     properties.put(MEMBER_TIMEOUT, "2000");
     properties.put(LOG_LEVEL, LogWriterUtils.getDUnitLogLevel());
     properties.put(ENABLE_CLUSTER_CONFIGURATION, "false");
-    properties.put(SSL_CIPHERS, "TLS_RSA_WITH_AES_256_CBC_SHA256,TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384,TLS_DHE_RSA_WITH_AES_256_CBC_SHA256,TLS_DHE_DSS_WITH_AES_256_CBC_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA,TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA");
+    properties.put(SSL_CIPHERS, "any");
     properties.put(SSL_PROTOCOLS, "TLSv1,TLSv1.1,TLSv1.2");
     properties.put(SSL_KEYSTORE, getSingleKeyKeystore());
     properties.put(SSL_KEYSTORE_PASSWORD, "password");


[27/50] [abbrv] incubator-geode git commit: Merge branch 'develop' into feature/GEODE-420

Posted by ud...@apache.org.
Merge branch 'develop' into feature/GEODE-420

# Conflicts:
#	geode-core/src/main/java/com/gemstone/gemfire/internal/GemFireVersion.java


Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/59adbcc0
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/59adbcc0
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/59adbcc0

Branch: refs/heads/develop
Commit: 59adbcc0341f1e54f546ce180a89c059cbf8e1a1
Parents: a455526 7f4992c
Author: Udo Kohlmeyer <uk...@pivotal.io>
Authored: Fri Aug 26 09:27:13 2016 +1000
Committer: Udo Kohlmeyer <uk...@pivotal.io>
Committed: Fri Aug 26 09:27:13 2016 +1000

----------------------------------------------------------------------
 build.gradle                                    |   1 -
 .../SessionExpirationCacheListener.java         |   6 +-
 geode-core/build.gradle                         |  33 -
 .../distributed/internal/StartupMessage.java    |  14 -
 .../gemfire/internal/GemFireVersion.java        | 726 +++++--------------
 .../gemstone/gemfire/internal/SystemAdmin.java  |  10 +-
 .../security/shiro/CustomAuthRealm.java         |   2 +-
 .../apache/geode/security/SecurityManager.java  |   5 +-
 .../templates/SampleSecurityManager.java        |   5 +-
 .../internal/GemFireVersionJUnitTest.java       |  75 +-
 .../gemfire/internal/VersionJUnitTest.java      |  50 ++
 .../gemfire/security/SpySecurityManager.java    |   3 +-
 gradle/utilities.gradle                         |  43 ++
 13 files changed, 283 insertions(+), 690 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/59adbcc0/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/StartupMessage.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/59adbcc0/geode-core/src/main/java/com/gemstone/gemfire/internal/SystemAdmin.java
----------------------------------------------------------------------


[31/50] [abbrv] incubator-geode git commit: Merge branch 'develop' into feature/GEODE-420

Posted by ud...@apache.org.
Merge branch 'develop' into feature/GEODE-420

# Conflicts:
#	geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/AbstractDistributionConfig.java
#	geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/InternalLocator.java
#	geode-core/src/test/java/com/gemstone/gemfire/cache30/DistributedMulticastRegionDUnitTest.java
#	geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorDUnitTest.java
#	geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/DistributionConfigJUnitTest.java


Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/a3a5a04c
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/a3a5a04c
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/a3a5a04c

Branch: refs/heads/develop
Commit: a3a5a04cdd3018150cc6b753654f5a47c8d08b06
Parents: 5d0cd43 5cb5009
Author: Udo Kohlmeyer <uk...@pivotal.io>
Authored: Tue Aug 30 12:56:17 2016 +1000
Committer: Udo Kohlmeyer <uk...@pivotal.io>
Committed: Tue Aug 30 12:56:17 2016 +1000

----------------------------------------------------------------------
 .gitignore                                      |   2 +
 .../client/internal/ClientPartitionAdvisor.java |  23 +-
 .../distributed/ConfigurationProperties.java    |   9 +
 .../internal/AbstractDistributionConfig.java    |   8 +-
 .../gemfire/distributed/internal/DMStats.java   |   7 +
 .../internal/DistributionConfig.java            |  32 +-
 .../internal/DistributionConfigImpl.java        |  14 +-
 .../distributed/internal/DistributionStats.java |  43 +-
 .../distributed/internal/InternalLocator.java   |   4 +-
 .../internal/LonerDistributionManager.java      |  22 +
 .../membership/InternalDistributedMember.java   |  50 +-
 .../internal/membership/MemberFactory.java      |   4 +-
 .../internal/membership/MemberServices.java     |   2 +-
 .../internal/membership/NetView.java            |  33 +-
 .../internal/membership/gms/GMSMember.java      |  48 +-
 .../membership/gms/GMSMemberFactory.java        |   4 +-
 .../internal/membership/gms/Services.java       |   8 +
 .../membership/gms/interfaces/JoinLeave.java    |   6 +
 .../membership/gms/interfaces/Messenger.java    |  46 ++
 .../gms/locator/FindCoordinatorRequest.java     |  35 +-
 .../gms/locator/FindCoordinatorResponse.java    |  81 ++-
 .../membership/gms/locator/GMSLocator.java      |  55 +-
 .../membership/gms/membership/GMSJoinLeave.java | 183 ++++-
 .../gms/messages/InstallViewMessage.java        |  25 +
 .../gms/messages/JoinRequestMessage.java        |  42 +-
 .../gms/messages/JoinResponseMessage.java       |  63 +-
 .../membership/gms/messenger/GMSEncrypt.java    | 616 ++++++++++++++++
 .../gms/messenger/JGroupsMessenger.java         | 399 ++++++++--
 .../internal/InternalDataSerializer.java        |  18 +
 .../gemfire/internal/i18n/LocalizedStrings.java |   3 +-
 .../DistributedMulticastRegionDUnitTest.java    |  33 +-
 ...MulticastRegionWithUDPSecurityDUnitTest.java |  37 +
 .../gemfire/cache30/ReconnectDUnitTest.java     |   4 +
 .../ReconnectWithUDPSecurityDUnitTest.java      |  33 +
 .../gemfire/distributed/LocatorDUnitTest.java   |  78 +-
 .../LocatorUDPSecurityDUnitTest.java            | 105 +++
 .../internal/DistributionConfigJUnitTest.java   |   2 +-
 .../membership/MembershipJUnitTest.java         | 158 ++++
 .../membership/gms/GMSMemberJUnitTest.java      |  24 +
 .../locator/GMSLocatorRecoveryJUnitTest.java    |   4 +-
 .../gms/membership/GMSJoinLeaveJUnitTest.java   |  44 +-
 .../gms/messenger/GMSEncryptJUnitTest.java      | 725 +++++++++++++++++++
 .../messenger/JGroupsMessengerJUnitTest.java    | 243 ++++++-
 .../cache/OffHeapEvictionDUnitTest.java         |   7 +
 .../sanctionedDataSerializables.txt             |  46 +-
 gradle/rat.gradle                               |   2 +
 46 files changed, 3160 insertions(+), 270 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/a3a5a04c/geode-core/src/main/java/com/gemstone/gemfire/distributed/ConfigurationProperties.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/a3a5a04c/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/AbstractDistributionConfig.java
----------------------------------------------------------------------
diff --cc geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/AbstractDistributionConfig.java
index 9168503,d4c3b90..f92511e
--- a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/AbstractDistributionConfig.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/AbstractDistributionConfig.java
@@@ -683,212 -686,371 +683,218 @@@ public abstract class AbstractDistribut
    }
  
    protected static final Map dcAttDescriptions;
 +
    static {
 -    Map<String, String> m =  new HashMap<String, String>();
 -
 -    m.put(ACK_WAIT_THRESHOLD,
 -      LocalizedStrings.AbstractDistributionConfig_DEFAULT_ACK_WAIT_THRESHOLD_0_1_2
 -      .toLocalizedString( new Object[] { 
 -          Integer.valueOf(DEFAULT_ACK_WAIT_THRESHOLD),
 -          Integer.valueOf(MIN_ACK_WAIT_THRESHOLD),
 -          Integer.valueOf(MIN_ACK_WAIT_THRESHOLD)}));
 -
 -    m.put(ARCHIVE_FILE_SIZE_LIMIT,
 -      LocalizedStrings.AbstractDistributionConfig_ARCHIVE_FILE_SIZE_LIMIT_NAME
 -        .toLocalizedString());
 -
 -    m.put(ACK_SEVERE_ALERT_THRESHOLD,
 -      LocalizedStrings.AbstractDistributionConfig_ACK_SEVERE_ALERT_THRESHOLD_NAME
 -        .toLocalizedString( 
 -           new Object[] { ACK_WAIT_THRESHOLD,
 -                          Integer.valueOf(DEFAULT_ACK_SEVERE_ALERT_THRESHOLD),
 -                          Integer.valueOf(MIN_ACK_SEVERE_ALERT_THRESHOLD),
 -                          Integer.valueOf(MAX_ACK_SEVERE_ALERT_THRESHOLD)}));
 -
 -    m.put(ARCHIVE_DISK_SPACE_LIMIT,
 -      LocalizedStrings.AbstractDistributionConfig_ARCHIVE_DISK_SPACE_LIMIT_NAME
 -        .toLocalizedString());
 -
 -    m.put(CACHE_XML_FILE,
 -      LocalizedStrings.AbstractDistributionConfig_CACHE_XML_FILE_NAME_0
 -        .toLocalizedString( DEFAULT_CACHE_XML_FILE ));
 -
 -    m.put(DISABLE_TCP,
 -      LocalizedStrings.AbstractDistributionConfig_DISABLE_TCP_NAME_0
 -        .toLocalizedString(Boolean.valueOf(DEFAULT_DISABLE_TCP)));
 -
 -    m.put(ENABLE_TIME_STATISTICS,
 -      LocalizedStrings.AbstractDistributionConfig_ENABLE_TIME_STATISTICS_NAME
 -        .toLocalizedString());
 -
 -    m.put(DEPLOY_WORKING_DIR,
 -        LocalizedStrings.AbstractDistributionConfig_DEPLOY_WORKING_DIR_0 
 -          .toLocalizedString(DEFAULT_DEPLOY_WORKING_DIR));
 -
 -    m.put(LOG_FILE,
 -      LocalizedStrings.AbstractDistributionConfig_LOG_FILE_NAME_0
 -        .toLocalizedString(DEFAULT_LOG_FILE));
 -
 -    m.put(LOG_LEVEL,
 -      LocalizedStrings.AbstractDistributionConfig_LOG_LEVEL_NAME_0_1 
 -        .toLocalizedString(new Object[] { LogWriterImpl.levelToString(DEFAULT_LOG_LEVEL), LogWriterImpl.allowedLogLevels()}));
 -
 -    m.put(LOG_FILE_SIZE_LIMIT,
 -      LocalizedStrings.AbstractDistributionConfig_LOG_FILE_SIZE_LIMIT_NAME
 -        .toLocalizedString());
 -
 -    m.put(LOG_DISK_SPACE_LIMIT,
 -      LocalizedStrings.AbstractDistributionConfig_LOG_DISK_SPACE_LIMIT_NAME
 -        .toLocalizedString());
 -
 -    m.put(LOCATORS,
 -      LocalizedStrings.AbstractDistributionConfig_LOCATORS_NAME_0
 -        .toLocalizedString(DEFAULT_LOCATORS));
 -
 -    m.put(LOCATOR_WAIT_TIME,
 -      LocalizedStrings.AbstractDistributionConfig_LOCATOR_WAIT_TIME_NAME_0
 -        .toLocalizedString(Integer.valueOf(DEFAULT_LOCATOR_WAIT_TIME)));
 -
 -    m.put(TCP_PORT,
 -      LocalizedStrings.AbstractDistributionConfig_TCP_PORT_NAME_0_1_2
 -        .toLocalizedString( new Object[] {
 -          Integer.valueOf(DEFAULT_TCP_PORT),
 -          Integer.valueOf(MIN_TCP_PORT),
 -          Integer.valueOf(MAX_TCP_PORT)}));
 -
 -    m.put(MCAST_PORT,
 -      LocalizedStrings.AbstractDistributionConfig_MCAST_PORT_NAME_0_1_2
 -       .toLocalizedString(new Object[] {
 -          Integer.valueOf(DEFAULT_MCAST_PORT),
 -          Integer.valueOf(MIN_MCAST_PORT), 
 -          Integer.valueOf(MAX_MCAST_PORT)}));
 -
 -    m.put(MCAST_ADDRESS,
 -      LocalizedStrings.AbstractDistributionConfig_MCAST_ADDRESS_NAME_0_1
 -       .toLocalizedString(new Object[] {
 -          Integer.valueOf(DEFAULT_MCAST_PORT),
 -          DEFAULT_MCAST_ADDRESS}));
 -
 -    m.put(MCAST_TTL,
 -      LocalizedStrings.AbstractDistributionConfig_MCAST_TTL_NAME_0_1_2
 -       .toLocalizedString(new Object[] {
 -          Integer.valueOf(DEFAULT_MCAST_TTL),
 -          Integer.valueOf(MIN_MCAST_TTL),
 -          Integer.valueOf(MAX_MCAST_TTL)}));
 -
 -    m.put(MCAST_SEND_BUFFER_SIZE,
 -      LocalizedStrings.AbstractDistributionConfig_MCAST_SEND_BUFFER_SIZE_NAME_0
 -       .toLocalizedString(Integer.valueOf(DEFAULT_MCAST_SEND_BUFFER_SIZE)));
 -
 -    m.put(MCAST_RECV_BUFFER_SIZE,
 -      LocalizedStrings.AbstractDistributionConfig_MCAST_RECV_BUFFER_SIZE_NAME_0
 -       .toLocalizedString(Integer.valueOf(DEFAULT_MCAST_RECV_BUFFER_SIZE)));
 -
 -    m.put(MCAST_FLOW_CONTROL,
 -      LocalizedStrings.AbstractDistributionConfig_MCAST_FLOW_CONTROL_NAME_0
 -       .toLocalizedString(DEFAULT_MCAST_FLOW_CONTROL));
 -
 -    m.put(MEMBER_TIMEOUT,
 -        LocalizedStrings.AbstractDistributionConfig_MEMBER_TIMEOUT_NAME_0
 -        .toLocalizedString(Integer.valueOf(DEFAULT_MEMBER_TIMEOUT)));
 -    
 +    Map<String, String> m = new HashMap<String, String>();
 +
 +    m.put(ACK_WAIT_THRESHOLD, LocalizedStrings.AbstractDistributionConfig_DEFAULT_ACK_WAIT_THRESHOLD_0_1_2.toLocalizedString(new Object[] {
 +      Integer.valueOf(DEFAULT_ACK_WAIT_THRESHOLD), Integer.valueOf(MIN_ACK_WAIT_THRESHOLD), Integer.valueOf(MIN_ACK_WAIT_THRESHOLD)
 +    }));
 +
 +    m.put(ARCHIVE_FILE_SIZE_LIMIT, LocalizedStrings.AbstractDistributionConfig_ARCHIVE_FILE_SIZE_LIMIT_NAME.toLocalizedString());
 +
 +    m.put(ACK_SEVERE_ALERT_THRESHOLD, LocalizedStrings.AbstractDistributionConfig_ACK_SEVERE_ALERT_THRESHOLD_NAME.toLocalizedString(new Object[] {
 +      ACK_WAIT_THRESHOLD,
 +      Integer.valueOf(DEFAULT_ACK_SEVERE_ALERT_THRESHOLD),
 +      Integer.valueOf(MIN_ACK_SEVERE_ALERT_THRESHOLD),
 +      Integer.valueOf(MAX_ACK_SEVERE_ALERT_THRESHOLD)
 +    }));
 +
 +    m.put(ARCHIVE_DISK_SPACE_LIMIT, LocalizedStrings.AbstractDistributionConfig_ARCHIVE_DISK_SPACE_LIMIT_NAME.toLocalizedString());
 +
 +    m.put(CACHE_XML_FILE, LocalizedStrings.AbstractDistributionConfig_CACHE_XML_FILE_NAME_0.toLocalizedString(DEFAULT_CACHE_XML_FILE));
 +
 +    m.put(DISABLE_TCP, LocalizedStrings.AbstractDistributionConfig_DISABLE_TCP_NAME_0.toLocalizedString(Boolean.valueOf(DEFAULT_DISABLE_TCP)));
 +
 +    m.put(ENABLE_TIME_STATISTICS, LocalizedStrings.AbstractDistributionConfig_ENABLE_TIME_STATISTICS_NAME.toLocalizedString());
 +
 +    m.put(DEPLOY_WORKING_DIR, LocalizedStrings.AbstractDistributionConfig_DEPLOY_WORKING_DIR_0.toLocalizedString(DEFAULT_DEPLOY_WORKING_DIR));
 +
 +    m.put(LOG_FILE, LocalizedStrings.AbstractDistributionConfig_LOG_FILE_NAME_0.toLocalizedString(DEFAULT_LOG_FILE));
 +
 +    m.put(LOG_LEVEL, LocalizedStrings.AbstractDistributionConfig_LOG_LEVEL_NAME_0_1.toLocalizedString(new Object[] {
 +      LogWriterImpl.levelToString(DEFAULT_LOG_LEVEL), LogWriterImpl.allowedLogLevels()
 +    }));
 +
 +    m.put(LOG_FILE_SIZE_LIMIT, LocalizedStrings.AbstractDistributionConfig_LOG_FILE_SIZE_LIMIT_NAME.toLocalizedString());
 +
 +    m.put(LOG_DISK_SPACE_LIMIT, LocalizedStrings.AbstractDistributionConfig_LOG_DISK_SPACE_LIMIT_NAME.toLocalizedString());
 +
 +    m.put(LOCATORS, LocalizedStrings.AbstractDistributionConfig_LOCATORS_NAME_0.toLocalizedString(DEFAULT_LOCATORS));
 +
 +    m.put(LOCATOR_WAIT_TIME, LocalizedStrings.AbstractDistributionConfig_LOCATOR_WAIT_TIME_NAME_0.toLocalizedString(Integer.valueOf(DEFAULT_LOCATOR_WAIT_TIME)));
 +
 +    m.put(TCP_PORT, LocalizedStrings.AbstractDistributionConfig_TCP_PORT_NAME_0_1_2.toLocalizedString(new Object[] {
 +      Integer.valueOf(DEFAULT_TCP_PORT), Integer.valueOf(MIN_TCP_PORT), Integer.valueOf(MAX_TCP_PORT)
 +    }));
 +
 +    m.put(MCAST_PORT, LocalizedStrings.AbstractDistributionConfig_MCAST_PORT_NAME_0_1_2.toLocalizedString(new Object[] {
 +      Integer.valueOf(DEFAULT_MCAST_PORT), Integer.valueOf(MIN_MCAST_PORT), Integer.valueOf(MAX_MCAST_PORT)
 +    }));
 +
 +    m.put(MCAST_ADDRESS, LocalizedStrings.AbstractDistributionConfig_MCAST_ADDRESS_NAME_0_1.toLocalizedString(new Object[] {
 +      Integer.valueOf(DEFAULT_MCAST_PORT), DEFAULT_MCAST_ADDRESS
 +    }));
 +
 +    m.put(MCAST_TTL, LocalizedStrings.AbstractDistributionConfig_MCAST_TTL_NAME_0_1_2.toLocalizedString(new Object[] {
 +      Integer.valueOf(DEFAULT_MCAST_TTL), Integer.valueOf(MIN_MCAST_TTL), Integer.valueOf(MAX_MCAST_TTL)
 +    }));
 +
 +    m.put(MCAST_SEND_BUFFER_SIZE, LocalizedStrings.AbstractDistributionConfig_MCAST_SEND_BUFFER_SIZE_NAME_0.toLocalizedString(Integer.valueOf(DEFAULT_MCAST_SEND_BUFFER_SIZE)));
 +
 +    m.put(MCAST_RECV_BUFFER_SIZE, LocalizedStrings.AbstractDistributionConfig_MCAST_RECV_BUFFER_SIZE_NAME_0.toLocalizedString(Integer.valueOf(DEFAULT_MCAST_RECV_BUFFER_SIZE)));
 +
 +    m.put(MCAST_FLOW_CONTROL, LocalizedStrings.AbstractDistributionConfig_MCAST_FLOW_CONTROL_NAME_0.toLocalizedString(DEFAULT_MCAST_FLOW_CONTROL));
 +
 +    m.put(MEMBER_TIMEOUT, LocalizedStrings.AbstractDistributionConfig_MEMBER_TIMEOUT_NAME_0.toLocalizedString(Integer.valueOf(DEFAULT_MEMBER_TIMEOUT)));
 +
      // for some reason the default port range is null under some circumstances
      int[] range = DEFAULT_MEMBERSHIP_PORT_RANGE;
 -    String srange = range==null? "not available" : "" + range[0] + "-" + range[1];
 -    String msg = LocalizedStrings.AbstractDistributionConfig_MEMBERSHIP_PORT_RANGE_NAME_0
 -                          .toLocalizedString(srange); 
 -    m.put(MEMBERSHIP_PORT_RANGE,
 -        msg);
 -
 -    m.put(UDP_SEND_BUFFER_SIZE,
 -      LocalizedStrings.AbstractDistributionConfig_UDP_SEND_BUFFER_SIZE_NAME_0
 -       .toLocalizedString(Integer.valueOf(DEFAULT_UDP_SEND_BUFFER_SIZE)));
 -
 -    m.put(UDP_RECV_BUFFER_SIZE,
 -      LocalizedStrings.AbstractDistributionConfig_UDP_RECV_BUFFER_SIZE_NAME_0
 -       .toLocalizedString(Integer.valueOf(DEFAULT_UDP_RECV_BUFFER_SIZE)));
 -
 -    m.put(UDP_FRAGMENT_SIZE,
 -      LocalizedStrings.AbstractDistributionConfig_UDP_FRAGMENT_SIZE_NAME_0
 -       .toLocalizedString(Integer.valueOf(DEFAULT_UDP_FRAGMENT_SIZE)));
 -
 -    m.put(SOCKET_LEASE_TIME,
 -      LocalizedStrings.AbstractDistributionConfig_SOCKET_LEASE_TIME_NAME_0_1_2
 -       .toLocalizedString(new Object[] { 
 -           Integer.valueOf(DEFAULT_SOCKET_LEASE_TIME),
 -           Integer.valueOf(MIN_SOCKET_LEASE_TIME), 
 -           Integer.valueOf(MAX_SOCKET_LEASE_TIME)}));
 - 
 -    m.put(SOCKET_BUFFER_SIZE,
 -      LocalizedStrings.AbstractDistributionConfig_SOCKET_BUFFER_SIZE_NAME_0_1_2
 -        .toLocalizedString(new Object[] {
 -           Integer.valueOf(DEFAULT_SOCKET_BUFFER_SIZE),
 -           Integer.valueOf(MIN_SOCKET_BUFFER_SIZE),
 -           Integer.valueOf(MAX_SOCKET_BUFFER_SIZE)}));
 -
 -    m.put(CONSERVE_SOCKETS,
 -      LocalizedStrings.AbstractDistributionConfig_CONSERVE_SOCKETS_NAME_0
 -        .toLocalizedString(Boolean.valueOf(DEFAULT_CONSERVE_SOCKETS)));
 -
 -    m.put(ROLES,
 -      LocalizedStrings.AbstractDistributionConfig_ROLES_NAME_0
 -        .toLocalizedString(DEFAULT_ROLES));
 -
 -    m.put(BIND_ADDRESS,
 -      LocalizedStrings.AbstractDistributionConfig_BIND_ADDRESS_NAME_0
 -        .toLocalizedString(DEFAULT_BIND_ADDRESS));
 -
 -    m.put(SERVER_BIND_ADDRESS,
 -      LocalizedStrings.AbstractDistributionConfig_SERVER_BIND_ADDRESS_NAME_0
 -        .toLocalizedString(DEFAULT_BIND_ADDRESS));
 -
 -    m.put(NAME, "A name that uniquely identifies a member in its distributed system." +
 -        " Multiple members in the same distributed system can not have the same name." +
 -        " Defaults to \"\".");
 -
 -    m.put(STATISTIC_ARCHIVE_FILE,
 -      LocalizedStrings.AbstractDistributionConfig_STATISTIC_ARCHIVE_FILE_NAME_0
 -        .toLocalizedString(DEFAULT_STATISTIC_ARCHIVE_FILE));
 -   
 -    m.put(STATISTIC_SAMPLE_RATE,
 -      LocalizedStrings.AbstractDistributionConfig_STATISTIC_SAMPLE_RATE_NAME_0_1_2
 -        .toLocalizedString(new Object[] {
 -           Integer.valueOf(DEFAULT_STATISTIC_SAMPLE_RATE),
 -           Integer.valueOf(MIN_STATISTIC_SAMPLE_RATE),
 -           Integer.valueOf(MAX_STATISTIC_SAMPLE_RATE)}));
 - 
 -    m.put(STATISTIC_SAMPLING_ENABLED,
 -      LocalizedStrings.AbstractDistributionConfig_STATISTIC_SAMPLING_ENABLED_NAME_0
 -        .toLocalizedString(
 -           Boolean.valueOf(DEFAULT_STATISTIC_SAMPLING_ENABLED)));
 -
 -    m.put(SSL_ENABLED,
 -      LocalizedStrings.AbstractDistributionConfig_SSL_ENABLED_NAME_0
 -        .toLocalizedString(
 -           Boolean.valueOf(DEFAULT_SSL_ENABLED)));
 -
 -    m.put(SSL_PROTOCOLS,
 -      LocalizedStrings.AbstractDistributionConfig_SSL_PROTOCOLS_NAME_0
 -        .toLocalizedString(DEFAULT_SSL_PROTOCOLS));
 -
 -    m.put(SSL_CIPHERS,
 -      LocalizedStrings.AbstractDistributionConfig_SSL_CIPHERS_NAME_0
 -        .toLocalizedString(DEFAULT_SSL_CIPHERS));
 -
 -    m.put(SSL_REQUIRE_AUTHENTICATION,
 -      LocalizedStrings.AbstractDistributionConfig_SSL_REQUIRE_AUTHENTICATION_NAME
 -        .toLocalizedString(Boolean.valueOf(DEFAULT_SSL_REQUIRE_AUTHENTICATION)));
 -    
 -    m.put(CLUSTER_SSL_ENABLED,
 -        LocalizedStrings.AbstractDistributionConfig_SSL_ENABLED_NAME_0
 -          .toLocalizedString(
 -             Boolean.valueOf(DEFAULT_CLUSTER_SSL_ENABLED)));
 -
 -    m.put(CLUSTER_SSL_PROTOCOLS,
 -        LocalizedStrings.AbstractDistributionConfig_SSL_PROTOCOLS_NAME_0
 -          .toLocalizedString(DEFAULT_CLUSTER_SSL_PROTOCOLS));
 -
 -    m.put(CLUSTER_SSL_CIPHERS,
 -        LocalizedStrings.AbstractDistributionConfig_SSL_CIPHERS_NAME_0
 -          .toLocalizedString(DEFAULT_CLUSTER_SSL_CIPHERS));
 -
 -    m.put(CLUSTER_SSL_REQUIRE_AUTHENTICATION,
 -        LocalizedStrings.AbstractDistributionConfig_SSL_REQUIRE_AUTHENTICATION_NAME
 -          .toLocalizedString(Boolean.valueOf(DEFAULT_CLUSTER_SSL_REQUIRE_AUTHENTICATION)));
 -    
 -    m.put(CLUSTER_SSL_KEYSTORE,"Location of the Java keystore file containing an distributed member's own certificate and private key.");
 -
 -    m.put(CLUSTER_SSL_KEYSTORE_TYPE,
 -        "For Java keystore file format, this property has the value jks (or JKS).");
 -
 -    m.put(CLUSTER_SSL_KEYSTORE_PASSWORD,"Password to access the private key from the keystore file specified by javax.net.ssl.keyStore.");
 -
 -    m.put(CLUSTER_SSL_TRUSTSTORE,"Location of the Java keystore file containing the collection of CA certificates trusted by distributed member (trust store).");
 -    
 -    m.put(CLUSTER_SSL_TRUSTSTORE_PASSWORD,"Password to unlock the keystore file (store password) specified by  javax.net.ssl.trustStore.");
 -    
 -    m.put(MAX_WAIT_TIME_RECONNECT,
 -      LocalizedStrings.AbstractDistributionConfig_MAX_WAIT_TIME_FOR_RECONNECT
 -        .toLocalizedString());
 -
 -    m.put(MAX_NUM_RECONNECT_TRIES,
 -      LocalizedStrings.AbstractDistributionConfig_MAX_NUM_RECONNECT_TRIES
 -        .toLocalizedString());
 -
 -    m.put(ASYNC_DISTRIBUTION_TIMEOUT,
 -      LocalizedStrings.AbstractDistributionConfig_ASYNC_DISTRIBUTION_TIMEOUT_NAME_0_1_2
 -        .toLocalizedString( new Object[] {
 -            Integer.valueOf(DEFAULT_ASYNC_DISTRIBUTION_TIMEOUT),
 -            Integer.valueOf(MIN_ASYNC_DISTRIBUTION_TIMEOUT),
 -            Integer.valueOf(MAX_ASYNC_DISTRIBUTION_TIMEOUT)}));
 -        
 -
 -    m.put(ASYNC_QUEUE_TIMEOUT,
 -      LocalizedStrings.AbstractDistributionConfig_ASYNC_QUEUE_TIMEOUT_NAME_0_1_2   
 -        .toLocalizedString( new Object[] {
 -          Integer.valueOf(DEFAULT_ASYNC_QUEUE_TIMEOUT),
 -          Integer.valueOf(MIN_ASYNC_QUEUE_TIMEOUT),
 -          Integer.valueOf(MAX_ASYNC_QUEUE_TIMEOUT)}));
 -    
 -    m.put(ASYNC_MAX_QUEUE_SIZE,
 -      LocalizedStrings.AbstractDistributionConfig_ASYNC_MAX_QUEUE_SIZE_NAME_0_1_2   
 -        .toLocalizedString( new Object[] {
 -          Integer.valueOf(DEFAULT_ASYNC_MAX_QUEUE_SIZE),
 -          Integer.valueOf(MIN_ASYNC_MAX_QUEUE_SIZE),
 -            Integer.valueOf(MAX_ASYNC_MAX_QUEUE_SIZE) }));
 -
 -    m.put(START_LOCATOR,
 -      LocalizedStrings.AbstractDistributionConfig_START_LOCATOR_NAME
 -        .toLocalizedString());
 -
 -    m.put(DURABLE_CLIENT_ID,
 -      LocalizedStrings.AbstractDistributionConfig_DURABLE_CLIENT_ID_NAME_0
 -        .toLocalizedString(DEFAULT_DURABLE_CLIENT_ID));
 -
 -    m.put(CONFLATE_EVENTS,
 -      LocalizedStrings.AbstractDistributionConfig_CLIENT_CONFLATION_PROP_NAME
 -        .toLocalizedString());
 -    
 -    m.put(DURABLE_CLIENT_TIMEOUT,
 -      LocalizedStrings.AbstractDistributionConfig_DURABLE_CLIENT_TIMEOUT_NAME_0
 -        .toLocalizedString(Integer.valueOf(DEFAULT_DURABLE_CLIENT_TIMEOUT)));
 -
 -    m.put(SECURITY_CLIENT_AUTH_INIT,
 -      LocalizedStrings.AbstractDistributionConfig_SECURITY_CLIENT_AUTH_INIT_NAME_0
 -        .toLocalizedString(DEFAULT_SECURITY_CLIENT_AUTH_INIT));
 -    
 +    String srange = range == null ? "not available" : "" + range[0] + "-" + range[1];
 +    String msg = LocalizedStrings.AbstractDistributionConfig_MEMBERSHIP_PORT_RANGE_NAME_0.toLocalizedString(srange);
 +    m.put(MEMBERSHIP_PORT_RANGE, msg);
 +
 +    m.put(UDP_SEND_BUFFER_SIZE, LocalizedStrings.AbstractDistributionConfig_UDP_SEND_BUFFER_SIZE_NAME_0.toLocalizedString(Integer.valueOf(DEFAULT_UDP_SEND_BUFFER_SIZE)));
 +
 +    m.put(UDP_RECV_BUFFER_SIZE, LocalizedStrings.AbstractDistributionConfig_UDP_RECV_BUFFER_SIZE_NAME_0.toLocalizedString(Integer.valueOf(DEFAULT_UDP_RECV_BUFFER_SIZE)));
 +
 +    m.put(UDP_FRAGMENT_SIZE, LocalizedStrings.AbstractDistributionConfig_UDP_FRAGMENT_SIZE_NAME_0.toLocalizedString(Integer.valueOf(DEFAULT_UDP_FRAGMENT_SIZE)));
 +
 +    m.put(SOCKET_LEASE_TIME, LocalizedStrings.AbstractDistributionConfig_SOCKET_LEASE_TIME_NAME_0_1_2.toLocalizedString(new Object[] {
 +      Integer.valueOf(DEFAULT_SOCKET_LEASE_TIME), Integer.valueOf(MIN_SOCKET_LEASE_TIME), Integer.valueOf(MAX_SOCKET_LEASE_TIME)
 +    }));
 +
 +    m.put(SOCKET_BUFFER_SIZE, LocalizedStrings.AbstractDistributionConfig_SOCKET_BUFFER_SIZE_NAME_0_1_2.toLocalizedString(new Object[] {
 +      Integer.valueOf(DEFAULT_SOCKET_BUFFER_SIZE), Integer.valueOf(MIN_SOCKET_BUFFER_SIZE), Integer.valueOf(MAX_SOCKET_BUFFER_SIZE)
 +    }));
 +
 +    m.put(CONSERVE_SOCKETS, LocalizedStrings.AbstractDistributionConfig_CONSERVE_SOCKETS_NAME_0.toLocalizedString(Boolean.valueOf(DEFAULT_CONSERVE_SOCKETS)));
 +
 +    m.put(ROLES, LocalizedStrings.AbstractDistributionConfig_ROLES_NAME_0.toLocalizedString(DEFAULT_ROLES));
 +
 +    m.put(BIND_ADDRESS, LocalizedStrings.AbstractDistributionConfig_BIND_ADDRESS_NAME_0.toLocalizedString(DEFAULT_BIND_ADDRESS));
 +
 +    m.put(SERVER_BIND_ADDRESS, LocalizedStrings.AbstractDistributionConfig_SERVER_BIND_ADDRESS_NAME_0.toLocalizedString(DEFAULT_BIND_ADDRESS));
 +
 +    m.put(NAME, "A name that uniquely identifies a member in its distributed system." + " Multiple members in the same distributed system can not have the same name." + " Defaults to \"\".");
 +
 +    m.put(STATISTIC_ARCHIVE_FILE, LocalizedStrings.AbstractDistributionConfig_STATISTIC_ARCHIVE_FILE_NAME_0.toLocalizedString(DEFAULT_STATISTIC_ARCHIVE_FILE));
 +
 +    m.put(STATISTIC_SAMPLE_RATE, LocalizedStrings.AbstractDistributionConfig_STATISTIC_SAMPLE_RATE_NAME_0_1_2.toLocalizedString(new Object[] {
 +      Integer.valueOf(DEFAULT_STATISTIC_SAMPLE_RATE), Integer.valueOf(MIN_STATISTIC_SAMPLE_RATE), Integer.valueOf(MAX_STATISTIC_SAMPLE_RATE)
 +    }));
 +
 +    m.put(STATISTIC_SAMPLING_ENABLED, LocalizedStrings.AbstractDistributionConfig_STATISTIC_SAMPLING_ENABLED_NAME_0.toLocalizedString(Boolean.valueOf(DEFAULT_STATISTIC_SAMPLING_ENABLED)));
 +
 +    m.put(SSL_CLUSTER_ALIAS, LocalizedStrings.AbstractDistributionConfig_CLUSTER_SSL_ALIAS_0.toLocalizedString(Boolean.valueOf(DEFAULT_SSL_ALIAS)));
 +
 +    m.put(CLUSTER_SSL_ENABLED, LocalizedStrings.AbstractDistributionConfig_SSL_ENABLED_NAME_0.toLocalizedString(Boolean.valueOf(DEFAULT_SSL_ENABLED)));
 +
 +    m.put(CLUSTER_SSL_PROTOCOLS, LocalizedStrings.AbstractDistributionConfig_SSL_PROTOCOLS_NAME_0.toLocalizedString(DEFAULT_SSL_PROTOCOLS));
 +
 +    m.put(CLUSTER_SSL_CIPHERS, LocalizedStrings.AbstractDistributionConfig_SSL_CIPHERS_NAME_0.toLocalizedString(DEFAULT_SSL_CIPHERS));
 +
 +    m.put(CLUSTER_SSL_REQUIRE_AUTHENTICATION, LocalizedStrings.AbstractDistributionConfig_SSL_REQUIRE_AUTHENTICATION_NAME.toLocalizedString(Boolean.valueOf(DEFAULT_SSL_REQUIRE_AUTHENTICATION)));
 +
 +    m.put(CLUSTER_SSL_KEYSTORE, "Location of the Java keystore file containing an distributed member's own certificate and private key.");
 +
 +    m.put(CLUSTER_SSL_KEYSTORE_TYPE, "For Java keystore file format, this property has the value jks (or JKS).");
 +
 +    m.put(CLUSTER_SSL_KEYSTORE_PASSWORD, "Password to access the private key from the keystore file specified by javax.net.ssl.keyStore.");
 +
 +    m.put(CLUSTER_SSL_TRUSTSTORE, "Location of the Java keystore file containing the collection of CA certificates trusted by distributed member (trust store).");
 +
 +    m.put(CLUSTER_SSL_TRUSTSTORE_PASSWORD, "Password to unlock the keystore file (store password) specified by  javax.net.ssl.trustStore.");
 +
 +    m.put(MAX_WAIT_TIME_RECONNECT, LocalizedStrings.AbstractDistributionConfig_MAX_WAIT_TIME_FOR_RECONNECT.toLocalizedString());
 +
 +    m.put(MAX_NUM_RECONNECT_TRIES, LocalizedStrings.AbstractDistributionConfig_MAX_NUM_RECONNECT_TRIES.toLocalizedString());
 +
 +    m.put(ASYNC_DISTRIBUTION_TIMEOUT, LocalizedStrings.AbstractDistributionConfig_ASYNC_DISTRIBUTION_TIMEOUT_NAME_0_1_2.toLocalizedString(new Object[] {
 +      Integer.valueOf(DEFAULT_ASYNC_DISTRIBUTION_TIMEOUT), Integer.valueOf(MIN_ASYNC_DISTRIBUTION_TIMEOUT), Integer.valueOf(MAX_ASYNC_DISTRIBUTION_TIMEOUT)
 +    }));
 +
 +
 +    m.put(ASYNC_QUEUE_TIMEOUT, LocalizedStrings.AbstractDistributionConfig_ASYNC_QUEUE_TIMEOUT_NAME_0_1_2.toLocalizedString(new Object[] {
 +      Integer.valueOf(DEFAULT_ASYNC_QUEUE_TIMEOUT), Integer.valueOf(MIN_ASYNC_QUEUE_TIMEOUT), Integer.valueOf(MAX_ASYNC_QUEUE_TIMEOUT)
 +    }));
 +
 +    m.put(ASYNC_MAX_QUEUE_SIZE, LocalizedStrings.AbstractDistributionConfig_ASYNC_MAX_QUEUE_SIZE_NAME_0_1_2.toLocalizedString(new Object[] {
 +      Integer.valueOf(DEFAULT_ASYNC_MAX_QUEUE_SIZE), Integer.valueOf(MIN_ASYNC_MAX_QUEUE_SIZE), Integer.valueOf(MAX_ASYNC_MAX_QUEUE_SIZE)
 +    }));
 +
 +    m.put(START_LOCATOR, LocalizedStrings.AbstractDistributionConfig_START_LOCATOR_NAME.toLocalizedString());
 +
 +    m.put(DURABLE_CLIENT_ID, LocalizedStrings.AbstractDistributionConfig_DURABLE_CLIENT_ID_NAME_0.toLocalizedString(DEFAULT_DURABLE_CLIENT_ID));
 +
 +    m.put(CONFLATE_EVENTS, LocalizedStrings.AbstractDistributionConfig_CLIENT_CONFLATION_PROP_NAME.toLocalizedString());
 +
 +    m.put(DURABLE_CLIENT_TIMEOUT, LocalizedStrings.AbstractDistributionConfig_DURABLE_CLIENT_TIMEOUT_NAME_0.toLocalizedString(Integer.valueOf(DEFAULT_DURABLE_CLIENT_TIMEOUT)));
 +
 +    m.put(SECURITY_CLIENT_AUTH_INIT, LocalizedStrings.AbstractDistributionConfig_SECURITY_CLIENT_AUTH_INIT_NAME_0.toLocalizedString(DEFAULT_SECURITY_CLIENT_AUTH_INIT));
 +
      m.put(ENABLE_NETWORK_PARTITION_DETECTION, "Whether network partitioning detection is enabled");
 -    
 +
      m.put(DISABLE_AUTO_RECONNECT, "Whether auto reconnect is attempted after a network partition");
  
 -    m.put(SECURITY_CLIENT_AUTHENTICATOR,
 -      LocalizedStrings.AbstractDistributionConfig_SECURITY_CLIENT_AUTHENTICATOR_NAME_0
 -        .toLocalizedString(DEFAULT_SECURITY_CLIENT_AUTHENTICATOR));
 +    m.put(SECURITY_CLIENT_AUTHENTICATOR, LocalizedStrings.AbstractDistributionConfig_SECURITY_CLIENT_AUTHENTICATOR_NAME_0.toLocalizedString(DEFAULT_SECURITY_CLIENT_AUTHENTICATOR));
  
-     m.put(SECURITY_CLIENT_DHALGO, LocalizedStrings.AbstractDistributionConfig_SECURITY_CLIENT_DHALGO_NAME_0.toLocalizedString(DEFAULT_SECURITY_CLIENT_DHALGO));
+     m.put(SECURITY_CLIENT_DHALGO,
+       LocalizedStrings.AbstractDistributionConfig_SECURITY_CLIENT_DHALGO_NAME_0
+         .toLocalizedString(DEFAULT_SECURITY_CLIENT_DHALGO));
 -    
++
+     m.put(SECURITY_UDP_DHALGO,
+         LocalizedStrings.AbstractDistributionConfig_SECURITY_UDP_DHALGO_NAME_0
+           .toLocalizedString(DEFAULT_SECURITY_UDP_DHALGO));
  
 -    m.put(SECURITY_PEER_AUTH_INIT,
 -      LocalizedStrings.AbstractDistributionConfig_SECURITY_PEER_AUTH_INIT_NAME_0
 -        .toLocalizedString(DEFAULT_SECURITY_PEER_AUTH_INIT));
 +    m.put(SECURITY_PEER_AUTH_INIT, LocalizedStrings.AbstractDistributionConfig_SECURITY_PEER_AUTH_INIT_NAME_0.toLocalizedString(DEFAULT_SECURITY_PEER_AUTH_INIT));
  
 -    m.put(SECURITY_PEER_AUTHENTICATOR,
 -      LocalizedStrings.AbstractDistributionConfig_SECURITY_PEER_AUTHENTICATOR_NAME_0
 -        .toLocalizedString(DEFAULT_SECURITY_PEER_AUTHENTICATOR));
 +    m.put(SECURITY_PEER_AUTHENTICATOR, LocalizedStrings.AbstractDistributionConfig_SECURITY_PEER_AUTHENTICATOR_NAME_0.toLocalizedString(DEFAULT_SECURITY_PEER_AUTHENTICATOR));
  
 -    m.put(SECURITY_CLIENT_ACCESSOR,
 -      LocalizedStrings.AbstractDistributionConfig_SECURITY_CLIENT_ACCESSOR_NAME_0
 -        .toLocalizedString(DEFAULT_SECURITY_CLIENT_ACCESSOR));
 +    m.put(SECURITY_CLIENT_ACCESSOR, LocalizedStrings.AbstractDistributionConfig_SECURITY_CLIENT_ACCESSOR_NAME_0.toLocalizedString(DEFAULT_SECURITY_CLIENT_ACCESSOR));
  
 -    m.put(SECURITY_CLIENT_ACCESSOR_PP,
 -      LocalizedStrings.AbstractDistributionConfig_SECURITY_CLIENT_ACCESSOR_PP_NAME_0
 -        .toLocalizedString(DEFAULT_SECURITY_CLIENT_ACCESSOR_PP));
 +    m.put(SECURITY_CLIENT_ACCESSOR_PP, LocalizedStrings.AbstractDistributionConfig_SECURITY_CLIENT_ACCESSOR_PP_NAME_0.toLocalizedString(DEFAULT_SECURITY_CLIENT_ACCESSOR_PP));
  
 -    m.put(SECURITY_LOG_LEVEL,
 -      LocalizedStrings.AbstractDistributionConfig_SECURITY_LOG_LEVEL_NAME_0_1
 -        .toLocalizedString( new Object[] {
 -           LogWriterImpl.levelToString(DEFAULT_LOG_LEVEL), 
 -           LogWriterImpl.allowedLogLevels()}));
 +    m.put(SECURITY_LOG_LEVEL, LocalizedStrings.AbstractDistributionConfig_SECURITY_LOG_LEVEL_NAME_0_1.toLocalizedString(new Object[] {
 +      LogWriterImpl.levelToString(DEFAULT_LOG_LEVEL), LogWriterImpl.allowedLogLevels()
 +    }));
  
 -    m.put(SECURITY_LOG_FILE,
 -      LocalizedStrings.AbstractDistributionConfig_SECURITY_LOG_FILE_NAME_0
 -        .toLocalizedString(DEFAULT_SECURITY_LOG_FILE));
 +    m.put(SECURITY_LOG_FILE, LocalizedStrings.AbstractDistributionConfig_SECURITY_LOG_FILE_NAME_0.toLocalizedString(DEFAULT_SECURITY_LOG_FILE));
  
 -    m.put(SECURITY_PEER_VERIFY_MEMBER_TIMEOUT,
 -      LocalizedStrings.AbstractDistributionConfig_SECURITY_PEER_VERIFYMEMBER_TIMEOUT_NAME_0
 -	.toLocalizedString(Integer.valueOf(DEFAULT_SECURITY_PEER_VERIFYMEMBER_TIMEOUT)));
 +    m.put(SECURITY_PEER_VERIFY_MEMBER_TIMEOUT, LocalizedStrings.AbstractDistributionConfig_SECURITY_PEER_VERIFYMEMBER_TIMEOUT_NAME_0.toLocalizedString(Integer.valueOf(DEFAULT_SECURITY_PEER_VERIFYMEMBER_TIMEOUT)));
  
 -    m.put(SECURITY_PREFIX,
 -      LocalizedStrings.AbstractDistributionConfig_SECURITY_PREFIX_NAME
 -        .toLocalizedString());
 +    m.put(SECURITY_PREFIX, LocalizedStrings.AbstractDistributionConfig_SECURITY_PREFIX_NAME.toLocalizedString());
  
 -    m.put(USERDEFINED_PREFIX_NAME,
 -        LocalizedStrings.AbstractDistributionConfig_USERDEFINED_PREFIX_NAME
 -          .toLocalizedString());
 +    m.put(USERDEFINED_PREFIX_NAME, LocalizedStrings.AbstractDistributionConfig_USERDEFINED_PREFIX_NAME.toLocalizedString());
  
 -    m.put(REMOVE_UNRESPONSIVE_CLIENT,
 -        LocalizedStrings.AbstractDistributionConfig_REMOVE_UNRESPONSIVE_CLIENT_PROP_NAME_0
 -          .toLocalizedString(DEFAULT_REMOVE_UNRESPONSIVE_CLIENT));
 +    m.put(REMOVE_UNRESPONSIVE_CLIENT, LocalizedStrings.AbstractDistributionConfig_REMOVE_UNRESPONSIVE_CLIENT_PROP_NAME_0.toLocalizedString(DEFAULT_REMOVE_UNRESPONSIVE_CLIENT));
  
      m.put(DELTA_PROPAGATION, "Whether delta propagation is enabled");
 -    
 -    m.put(REMOTE_LOCATORS,
 -        LocalizedStrings.AbstractDistributionConfig_REMOTE_DISTRIBUTED_SYSTEMS_NAME_0
 -          .toLocalizedString(DEFAULT_REMOTE_LOCATORS));
 -
 -    m.put(DISTRIBUTED_SYSTEM_ID, "An id that uniquely idenitifies this distributed system. " +
 -        "Required when using portable data exchange objects and the WAN." +
 -    		"Must be the same on each member in this distributed system if set.");
 -    m.put(ENFORCE_UNIQUE_HOST, "Whether to require partitioned regions to put " +
 -    		"redundant copies of data on different physical machines");
 -    
 -    m.put(REDUNDANCY_ZONE, "The zone that this member is in. When this is set, " +
 -    		"partitioned regions will not put two copies of the same data in the same zone.");
 -
 -    m.put(GROUPS, "A comma separated list of all the groups this member belongs to." +
 -        " Defaults to \"\".");
 -    
 +
 +    m.put(REMOTE_LOCATORS, LocalizedStrings.AbstractDistributionConfig_REMOTE_DISTRIBUTED_SYSTEMS_NAME_0.toLocalizedString(DEFAULT_REMOTE_LOCATORS));
 +
 +    m.put(DISTRIBUTED_SYSTEM_ID, "An id that uniquely idenitifies this distributed system. " + "Required when using portable data exchange objects and the WAN." + "Must be the same on each member in this distributed system if set.");
 +    m.put(ENFORCE_UNIQUE_HOST, "Whether to require partitioned regions to put " + "redundant copies of data on different physical machines");
 +
 +    m.put(REDUNDANCY_ZONE, "The zone that this member is in. When this is set, " + "partitioned regions will not put two copies of the same data in the same zone.");
 +
 +    m.put(GROUPS, "A comma separated list of all the groups this member belongs to." + " Defaults to \"\".");
 +
      m.put(USER_COMMAND_PACKAGES, "A comma separated list of the names of the packages containing classes that implement user commands.");
 -    
 +
      m.put(JMX_MANAGER, "If true then this member is willing to be a jmx manager. Defaults to false except on a locator.");
      m.put(JMX_MANAGER_START, "If true then the jmx manager will be started when the cache is created. Defaults to false.");
 -    m.put(JMX_MANAGER_SSL, "If true then the jmx manager will only allow SSL clients to connect. Defaults to false. This property is ignored if jmx-manager-port is \"0\".");
      m.put(JMX_MANAGER_SSL_ENABLED, "If true then the jmx manager will only allow SSL clients to connect. Defaults to false. This property is ignored if jmx-manager-port is \"0\".");
 -    m.put(JMX_MANAGER_SSL_CIPHERS, "List of available SSL cipher suites that are to be enabled for JMX Manager. Defaults to \""+DEFAULT_JMX_MANAGER_SSL_CIPHERS+"\" meaning your provider''s defaults.");
 -    m.put(JMX_MANAGER_SSL_PROTOCOLS, "List of available SSL protocols that are to be enabled for JMX Manager. Defaults to \""+DEFAULT_JMX_MANAGER_SSL_PROTOCOLS+"\" meaning defaults of your provider.");
 -    m.put(JMX_MANAGER_SSL_REQUIRE_AUTHENTICATION, "If set to false, ciphers and protocols that permit anonymous JMX Clients are allowed. Defaults to \""+DEFAULT_JMX_MANAGER_SSL_REQUIRE_AUTHENTICATION+"\".");
 -    m.put(JMX_MANAGER_SSL_KEYSTORE,"Location of the Java keystore file containing jmx manager's own certificate and private key.");
 +    m.put(SSL_JMX_MANAGER_ALIAS, LocalizedStrings.AbstractDistributionConfig_JMX_MANAGER_SSL_ALIAS_0.toLocalizedString(Boolean.valueOf(DEFAULT_SSL_ALIAS)));
 +    m.put(JMX_MANAGER_SSL_CIPHERS, "List of available SSL cipher suites that are to be enabled for JMX Manager. Defaults to \"" + DEFAULT_JMX_MANAGER_SSL_CIPHERS + "\" meaning your provider''s defaults.");
 +    m.put(JMX_MANAGER_SSL_PROTOCOLS, "List of available SSL protocols that are to be enabled for JMX Manager. Defaults to \"" + DEFAULT_JMX_MANAGER_SSL_PROTOCOLS + "\" meaning defaults of your provider.");
 +    m.put(JMX_MANAGER_SSL_REQUIRE_AUTHENTICATION, "If set to false, ciphers and protocols that permit anonymous JMX Clients are allowed. Defaults to \"" + DEFAULT_JMX_MANAGER_SSL_REQUIRE_AUTHENTICATION + "\".");
 +    m.put(JMX_MANAGER_SSL_KEYSTORE, "Location of the Java keystore file containing jmx manager's own certificate and private key.");
      m.put(JMX_MANAGER_SSL_KEYSTORE_TYPE, "For Java keystore file format, this property has the value jks (or JKS).");
 -    m.put(JMX_MANAGER_SSL_KEYSTORE_PASSWORD,"Password to access the private key from the keystore file specified by javax.net.ssl.keyStore. ");
 -    m.put(JMX_MANAGER_SSL_TRUSTSTORE,"Location of the Java keystore file containing the collection of CA certificates trusted by jmx manager.");
 -    m.put(JMX_MANAGER_SSL_TRUSTSTORE_PASSWORD,"Password to unlock the keystore file (store password) specified by  javax.net.ssl.trustStore.");
 -    
 +    m.put(JMX_MANAGER_SSL_KEYSTORE_PASSWORD, "Password to access the private key from the keystore file specified by javax.net.ssl.keyStore. ");
 +    m.put(JMX_MANAGER_SSL_TRUSTSTORE, "Location of the Java keystore file containing the collection of CA certificates trusted by jmx manager.");
 +    m.put(JMX_MANAGER_SSL_TRUSTSTORE_PASSWORD, "Password to unlock the keystore file (store password) specified by  javax.net.ssl.trustStore.");
 +
      m.put(JMX_MANAGER_PORT, "The port the jmx manager will listen on. Default is \"" + DEFAULT_JMX_MANAGER_PORT + "\". Set to zero to disable GemFire's creation of a jmx listening port.");
      m.put(JMX_MANAGER_BIND_ADDRESS, "The address the jmx manager will listen on for remote connections. Default is \"\" which causes the jmx manager to listen on the host's default address. This property is ignored if jmx-manager-port is \"0\".");
      m.put(JMX_MANAGER_HOSTNAME_FOR_CLIENTS, "The hostname that will be given to clients when they ask a locator for the location of this jmx manager. Default is \"\" which causes the locator to report the jmx manager's actual ip address as its location. This property is ignored if jmx-manager-port is \"0\".");

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/a3a5a04c/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionConfig.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/a3a5a04c/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionConfigImpl.java
----------------------------------------------------------------------
diff --cc geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionConfigImpl.java
index 23569a2,2ebb7d0..1ac92d0
--- a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionConfigImpl.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionConfigImpl.java
@@@ -262,68 -198,47 +262,71 @@@ public class DistributionConfigImpl ext
    private int maxNumReconnectTries = DEFAULT_MAX_NUM_RECONNECT_TRIES;
  
  
 -  protected int asyncDistributionTimeout = DEFAULT_ASYNC_DISTRIBUTION_TIMEOUT;
 -  protected int asyncQueueTimeout = DEFAULT_ASYNC_QUEUE_TIMEOUT;
 -  protected int asyncMaxQueueSize = DEFAULT_ASYNC_MAX_QUEUE_SIZE;
 +  private int asyncDistributionTimeout = DEFAULT_ASYNC_DISTRIBUTION_TIMEOUT;
 +  private int asyncQueueTimeout = DEFAULT_ASYNC_QUEUE_TIMEOUT;
 +  private int asyncMaxQueueSize = DEFAULT_ASYNC_MAX_QUEUE_SIZE;
  
 -  /** @since GemFire 5.7 */
 +  /**
 +   * @since GemFire 5.7
 +   */
    private String clientConflation = CLIENT_CONFLATION_PROP_VALUE_DEFAULT;
  
 -  /** The id of the durable client */
 +  /**
 +   * The id of the durable client
 +   */
    private String durableClientId = DEFAULT_DURABLE_CLIENT_ID;
  
 -  /** The timeout of the durable client */
 +  /**
 +   * The timeout of the durable client
 +   */
    private int durableClientTimeout = DEFAULT_DURABLE_CLIENT_TIMEOUT;
  
 -  /** The client authentication initialization method name*/
 +  /**
 +   * The client authentication initialization method name
 +   */
    private String securityClientAuthInit = DEFAULT_SECURITY_CLIENT_AUTH_INIT;
  
 -  /** The client authenticating method name*/
 +  /**
 +   * The client authenticating method name
 +   */
    private String securityClientAuthenticator = DEFAULT_SECURITY_CLIENT_AUTHENTICATOR;
  
 -  /** The security manager class name*/
 +  /**
 +   * The security manager class name
 +   */
    private String securityManager = DEFAULT_SECURITY_MANAGER;
  
 -  /** The post processor class name*/
 +  /**
 +   * The post processor class name
 +   */
    private String postProcessor = DEFAULT_SECURITY_POST_PROCESSOR;
  
 -  /** The client Diffie-Hellman method name*/
 +  /**
 +   * The client Diffie-Hellman method name
 +   */
    private String securityClientDHAlgo = DEFAULT_SECURITY_CLIENT_DHALGO;
+   
+   /** The udp Diffie-Hellman method name*/
+   private String securityUDPDHAlgo = DEFAULT_SECURITY_UDP_DHALGO;
  
 -  /** The peer authentication initialization method name*/
 +  /**
 +   * The peer authentication initialization method name
 +   */
    private String securityPeerAuthInit = DEFAULT_SECURITY_PEER_AUTH_INIT;
  
 -  /** The peer authenticating method name*/
 +  /**
 +   * The peer authenticating method name
 +   */
    private String securityPeerAuthenticator = DEFAULT_SECURITY_PEER_AUTHENTICATOR;
  
 -  /** The client authorization method name*/
 +  /**
 +   * The client authorization method name
 +   */
    private String securityClientAccessor = DEFAULT_SECURITY_CLIENT_ACCESSOR;
  
 -  /** The post-processing client authorization method name*/
 +  /**
 +   * The post-processing client authorization method name
 +   */
    private String securityClientAccessorPP = DEFAULT_SECURITY_CLIENT_ACCESSOR_PP;
  
    /**
@@@ -2114,10 -1971,18 +2118,18 @@@
    public String getSecurityClientDHAlgo() {
      return securityClientDHAlgo;
    }
- 
+   
    public void setSecurityClientDHAlgo(String value) {
 -    securityClientDHAlgo = (String)checkAttribute(SECURITY_CLIENT_DHALGO, value);
 +    securityClientDHAlgo = (String) value;
    }
+   
+   public String getSecurityUDPDHAlgo() {
+     return securityUDPDHAlgo;
+   }
+ 
+   public void setSecurityUDPDHAlgo(String value) {
+     securityUDPDHAlgo = (String)checkAttribute(SECURITY_UDP_DHALGO, value);
+   }
  
    public String getSecurityPeerAuthInit() {
      return securityPeerAuthInit;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/a3a5a04c/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/InternalLocator.java
----------------------------------------------------------------------
diff --cc geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/InternalLocator.java
index 8511d8b,026efb9..0125ef2
--- a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/InternalLocator.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/InternalLocator.java
@@@ -621,21 -643,24 +621,23 @@@ public class InternalLocator extends Lo
      // coordinator - e.g., security and network-partition detection
      boolean locatorsAreCoordinators = false;
      boolean networkPartitionDetectionEnabled = this.config.getEnableNetworkPartitionDetection();
+     String securityUDPDHAlgo = this.config.getSecurityUDPDHAlgo();
      if (networkPartitionDetectionEnabled) {
        locatorsAreCoordinators = true;
 -    }
 -    else {
 +    } else {
        // check if security is enabled
        String prop = this.config.getSecurityPeerAuthInit();
 -      locatorsAreCoordinators =  (prop != null && prop.length() > 0);
 +      locatorsAreCoordinators = (prop != null && prop.length() > 0);
        if (!locatorsAreCoordinators) {
          locatorsAreCoordinators = Boolean.getBoolean(LOCATORS_PREFERRED_AS_COORDINATORS);
        }
      }
  
-     this.locatorImpl = MemberFactory.newLocatorHandler(this.bindAddress, this.stateFile, locatorsProp, locatorsAreCoordinators, networkPartitionDetectionEnabled, stats);
+     this.locatorImpl = MemberFactory.newLocatorHandler(this.bindAddress, this.stateFile,
+         locatorsProp, locatorsAreCoordinators, networkPartitionDetectionEnabled, stats, securityUDPDHAlgo);
      this.handler.addHandler(PeerLocatorRequest.class, this.locatorImpl);
      peerLocator = true;
 -    if(!server.isAlive()) {
 +    if (!server.isAlive()) {
        startTcpServer();
      }
    }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/a3a5a04c/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/LonerDistributionManager.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/a3a5a04c/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/InternalDistributedMember.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/a3a5a04c/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/GMSMemberFactory.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/a3a5a04c/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/locator/GMSLocator.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/a3a5a04c/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/membership/GMSJoinLeave.java
----------------------------------------------------------------------
diff --cc geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/membership/GMSJoinLeave.java
index 3800b1d,1c6cf16..118c62c
--- a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/membership/GMSJoinLeave.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/membership/GMSJoinLeave.java
@@@ -37,8 -38,8 +38,9 @@@ import com.gemstone.gemfire.distributed
  import com.gemstone.gemfire.distributed.internal.tcpserver.TcpClient;
  import com.gemstone.gemfire.internal.Version;
  import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
 +import com.gemstone.gemfire.internal.net.*;
  import com.gemstone.gemfire.security.AuthenticationFailedException;
+ 
  import org.apache.logging.log4j.Logger;
  
  import java.io.IOException;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/a3a5a04c/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/messenger/JGroupsMessenger.java
----------------------------------------------------------------------
diff --cc geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/messenger/JGroupsMessenger.java
index d229f9d,ca23639..310c1ad
--- a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/messenger/JGroupsMessenger.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/messenger/JGroupsMessenger.java
@@@ -38,33 -97,10 +97,11 @@@ import com.gemstone.gemfire.internal.ca
  import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
  import com.gemstone.gemfire.internal.logging.log4j.AlertAppender;
  import com.gemstone.gemfire.internal.logging.log4j.LocalizedMessage;
 +import com.gemstone.gemfire.internal.net.SocketCreator;
  import com.gemstone.gemfire.internal.tcp.MemberShunnedException;
- import it.unimi.dsi.fastutil.ints.Int2ObjectOpenHashMap;
- import org.apache.logging.log4j.Logger;
- import org.jgroups.*;
- import org.jgroups.Message.Flag;
- import org.jgroups.Message.TransientFlag;
- import org.jgroups.conf.ClassConfigurator;
- import org.jgroups.protocols.UDP;
- import org.jgroups.protocols.pbcast.NAKACK2;
- import org.jgroups.stack.IpAddress;
- import org.jgroups.util.Digest;
- import org.jgroups.util.UUID;
  
- import java.io.*;
- import java.lang.reflect.Field;
- import java.lang.reflect.InvocationTargetException;
- import java.lang.reflect.Method;
- import java.net.UnknownHostException;
- import java.util.*;
- import java.util.concurrent.ConcurrentHashMap;
- import java.util.concurrent.atomic.AtomicLong;
- import java.util.stream.*;
+ import it.unimi.dsi.fastutil.ints.Int2ObjectOpenHashMap;
  
- import static com.gemstone.gemfire.distributed.internal.membership.gms.GMSUtil.replaceStrings;
- import static com.gemstone.gemfire.internal.DataSerializableFixedID.JOIN_REQUEST;
- import static com.gemstone.gemfire.internal.DataSerializableFixedID.JOIN_RESPONSE;
  
  @SuppressWarnings("StatementWithEmptyBody")
  public class JGroupsMessenger implements Messenger {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/a3a5a04c/geode-core/src/main/java/com/gemstone/gemfire/internal/i18n/LocalizedStrings.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/a3a5a04c/geode-core/src/test/java/com/gemstone/gemfire/cache30/DistributedMulticastRegionDUnitTest.java
----------------------------------------------------------------------
diff --cc geode-core/src/test/java/com/gemstone/gemfire/cache30/DistributedMulticastRegionDUnitTest.java
index 5efd5ce,6132276..1dac980
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache30/DistributedMulticastRegionDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache30/DistributedMulticastRegionDUnitTest.java
@@@ -219,27 -255,42 +221,41 @@@ public class DistributedMulticastRegion
      p.put(MCAST_TTL, mcastttl);
      p.put(LOCATORS, "localhost[" + locatorPort + "]");
      p.put(LOG_LEVEL, "info");
+     addDSProps(p);
      return p;
+   } 
+   
+   protected void addDSProps(Properties p) {
    }
 -  
 +
-   private void validateMulticastOpsAfterRegionOps() {
+   protected void validateMulticastOpsAfterRegionOps() {
      int writes = getGemfireCache().getDistributionManager().getStats().getMcastWrites();
      int reads = getGemfireCache().getDistributionManager().getStats().getMcastReads();
-     assertTrue("Should have multicast writes or reads. Writes=  " + writes + " ,read= " + reads, writes > 0 || reads > 0);
+     assertTrue("Should have multicast writes or reads. Writes=  " + writes +  " ,read= " + reads, 
+         writes > 0 || reads > 0);
 -    
++
+     validateUDPEncryptionStats();
+   }
 -  
++
+   protected void validateUDPEncryptionStats() {
+     long encrptTime = getGemfireCache().getDistributionManager().getStats().getUDPMsgEncryptionTiime();
+     long decryptTime = getGemfireCache().getDistributionManager().getStats().getUDPMsgDecryptionTime();
 -    assertTrue("Should have multicast writes or reads. encrptTime=  " + encrptTime +  " ,decryptTime= " + decryptTime, 
++    assertTrue("Should have multicast writes or reads. encrptTime=  " + encrptTime +  " ,decryptTime= " + decryptTime,
+         encrptTime == 0 && decryptTime == 0);
    }
 -  
 +
    private void validateMulticastOpsBeforeRegionOps() {
      int writes = getGemfireCache().getDistributionManager().getStats().getMcastWrites();
      int reads = getGemfireCache().getDistributionManager().getStats().getMcastReads();
      int total = writes + reads;
 -    assertTrue("Should not have any multicast writes or reads before region ops. Writes=  " + writes +  " ,read= " + reads, 
 -        total == 0);
 +    assertTrue("Should not have any multicast writes or reads before region ops. Writes=  " + writes + " ,read= " + reads, total == 0);
    }
 -  
 +
    private int startLocator() {
-     final int[] ports = AvailablePortHelper.getRandomAvailableTCPPorts(3);
-     final int locatorPort = ports[0];
+   final int [] ports = AvailablePortHelper.getRandomAvailableTCPPorts(3);
+   final int locatorPort = ports[0];
 -  
 +
-     VM locator1Vm = Host.getHost(0).getVM(locatorVM);
+   VM locator1Vm = Host.getHost(0).getVM(locatorVM);;
      locator1Vm.invoke(new SerializableCallable() {
        @Override
        public Object call() {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/a3a5a04c/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorDUnitTest.java
----------------------------------------------------------------------
diff --cc geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorDUnitTest.java
index 4a82789,81473da..61d2e91
--- a/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorDUnitTest.java
@@@ -92,9 -93,10 +92,9 @@@ public class LocatorDUnitTest extends J
  
    private static final String WAIT2_MS_NAME = "LocatorDUnitTest.WAIT2_MS";
    private static final int WAIT2_MS_DEFAULT = 5000; // 2000 -- see bug 36470
 -  private static final int WAIT2_MS
 -      = Integer.getInteger(WAIT2_MS_NAME, WAIT2_MS_DEFAULT).intValue();
 +  private static final int WAIT2_MS = Integer.getInteger(WAIT2_MS_NAME, WAIT2_MS_DEFAULT).intValue();
  
-   private int port1;
+   protected int port1;
    private int port2;
  
    @Override
@@@ -130,7 -132,12 +130,12 @@@
        system = null;
      }
    }
 -  
 -  //for child classes 
 +
++  //for child classes
+   protected void addDSProps(Properties p) {
 -    
++
+   }
+ 
    ////////  Test Methods
  
    /**
@@@ -161,9 -168,11 +166,10 @@@
      properties.put(SECURITY_PEER_AUTHENTICATOR, "com.gemstone.gemfire.distributed.MyAuthenticator.create");
      properties.put(ENABLE_CLUSTER_CONFIGURATION, "false");
      properties.put(USE_CLUSTER_CONFIGURATION, "false");
+     addDSProps(properties);
      system = (InternalDistributedSystem) DistributedSystem.connect(properties);
      InternalDistributedMember mbr = system.getDistributedMember();
 -    assertEquals("expected the VM to have NORMAL vmKind",
 -        DistributionManager.NORMAL_DM_TYPE, system.getDistributedMember().getVmKind());
 +    assertEquals("expected the VM to have NORMAL vmKind", DistributionManager.NORMAL_DM_TYPE, system.getDistributedMember().getVmKind());
  
      properties.remove(START_LOCATOR);
      properties.put(LOG_LEVEL, LogWriterUtils.getDUnitLogLevel());
@@@ -292,143 -304,89 +298,143 @@@
      properties.put(MEMBER_TIMEOUT, "2000");
      properties.put(LOG_LEVEL, LogWriterUtils.getDUnitLogLevel());
      properties.put(ENABLE_CLUSTER_CONFIGURATION, "false");
--
+     addDSProps(properties);
 -    SerializableCallable startLocator1 = new SerializableCallable("start locator1") {
 -      @Override
 -      public Object call() throws Exception {
 -        try {
 -          System.setProperty("p2p.joinTimeout", "5000"); // set a short join timeout.  default is 17000ms
 -          Locator myLocator = Locator.startLocatorAndDS(port1, new File(""), properties);
 -        } catch (SystemConnectException e) {
 -          return Boolean.FALSE;
 -        } catch (GemFireConfigException e) {
 -          return Boolean.FALSE;
 -        } finally {
 -          System.getProperties().remove("p2p.joinTimeout");
 -        }
 -        return Boolean.TRUE;
 +    try {
 +      loc2.invoke("startLocator2", () -> startLocatorWithPortAndProperties(port2, properties));
 +      loc1.invoke("startLocator1", () -> startLocatorWithPortAndProperties(port1, properties));
 +    } finally {
 +      try {
 +        // verify that they found each other
 +        loc2.invoke("verifyLocatorNotInSplitBrain", () -> verifyLocatorNotInSplitBrain(2));
 +        loc1.invoke("verifyLocatorNotInSplitBrain", () -> verifyLocatorNotInSplitBrain(2));
 +      } finally {
 +        loc2.invoke("stop locator", () -> stopLocator());
 +        loc1.invoke("stop locator", () -> stopLocator());
        }
 -    };
 -    SerializableCallable startLocator2 = new SerializableCallable("start locator2") {
 -      @Override
 -      public Object call() throws Exception {
 -        try {
 -          System.setProperty("p2p.joinTimeout", "5000"); // set a short join timeout.  default is 17000ms
 -          Locator myLocator = Locator.startLocatorAndDS(port2, new File(""), properties);
 -        } catch (SystemConnectException e) {
 -          return Boolean.FALSE;
 -        } finally {
 -          System.getProperties().remove("p2p.joinTimeout");
 -        }
 -        return Boolean.TRUE;
 +    }
 +  }
 +
 +  private Boolean startLocatorWithPortAndProperties(final int port, final Properties properties) throws IOException {
 +    try {
 +      System.setProperty("p2p.joinTimeout", "5000"); // set a short join timeout.  default is 17000ms
 +      Locator.startLocatorAndDS(port, new File(""), properties);
 +    } catch (SystemConnectException e) {
 +      return Boolean.FALSE;
 +    } catch (GemFireConfigException e) {
 +      return Boolean.FALSE;
 +    } finally {
 +      System.getProperties().remove("p2p.joinTimeout");
 +    }
 +    return Boolean.TRUE;
 +  }
 +
 +  private String getSingleKeyKeystore() {
 +    return TestUtil.getResourcePath(getClass(), "/ssl/trusted.keystore");
 +  }
 +
 +
 +  private String getMultiKeyKeystore() {
 +    return TestUtil.getResourcePath(getClass(), "/com/gemstone/gemfire/internal/net/multiKey.jks");
 +  }
 +
 +  private String getMultiKeyTruststore() {
 +    return TestUtil.getResourcePath(getClass(), "/com/gemstone/gemfire/internal/net/multiKeyTrust.jks");
 +  }
 +
 +  @Test
 +  public void testStartTwoLocatorsWithSingleKeystoreSSL() throws Exception {
 +    disconnectAllFromDS();
 +    Host host = Host.getHost(0);
 +    VM loc1 = host.getVM(1);
 +    VM loc2 = host.getVM(2);
 +
 +    int ports[] = AvailablePortHelper.getRandomAvailableTCPPorts(2);
 +    final int port1 = ports[0];
 +    this.port1 = port1;
 +    final int port2 = ports[1];
 +    this.port2 = port2; // for cleanup in tearDown2
 +    DistributedTestUtils.deleteLocatorStateFile(port1);
 +    DistributedTestUtils.deleteLocatorStateFile(port2);
 +    final String host0 = NetworkUtils.getServerHostName(host);
 +    final String locators = host0 + "[" + port1 + "]," + host0 + "[" + port2 + "]";
 +    final Properties properties = new Properties();
 +    properties.put(MCAST_PORT, "0");
 +    properties.put(LOCATORS, locators);
 +    properties.put(ENABLE_NETWORK_PARTITION_DETECTION, "false");
 +    properties.put(DISABLE_AUTO_RECONNECT, "true");
 +    properties.put(MEMBER_TIMEOUT, "2000");
 +    properties.put(LOG_LEVEL, LogWriterUtils.getDUnitLogLevel());
 +    properties.put(ENABLE_CLUSTER_CONFIGURATION, "false");
 +    properties.put(SSL_CIPHERS, "any");
 +    properties.put(SSL_PROTOCOLS, "any");
 +    properties.put(SSL_KEYSTORE, getSingleKeyKeystore());
 +    properties.put(SSL_KEYSTORE_PASSWORD, "password");
 +    properties.put(SSL_KEYSTORE_TYPE, "JKS");
 +    properties.put(SSL_TRUSTSTORE, getSingleKeyKeystore());
 +    properties.put(SSL_TRUSTSTORE_PASSWORD, "password");
 +    properties.put(SSL_ENABLED_COMPONENTS, SecurableComponent.LOCATOR.getConstant());
 +
 +    try {
 +      loc2.invoke("startLocator2", () -> startLocatorWithPortAndProperties(port2, properties));
 +      loc1.invoke("startLocator1", () -> startLocatorWithPortAndProperties(port1, properties));
 +    } finally {
 +      try {
 +        // verify that they found each other
 +        loc2.invoke("verifyLocatorNotInSplitBrain", () -> verifyLocatorNotInSplitBrain(2));
 +        loc1.invoke("verifyLocatorNotInSplitBrain", () -> verifyLocatorNotInSplitBrain(2));
 +      } finally {
 +        loc2.invoke("stop locator", () -> stopLocator());
 +        loc1.invoke("stop locator", () -> stopLocator());
        }
 -    };
 -    AsyncInvocation async1 = null;
 -    AsyncInvocation async2 = null;
 +    }
 +  }
 +
 +  @Test
 +  public void testStartTwoLocatorsWithMultiKeystoreSSL() throws Exception {
 +    disconnectAllFromDS();
 +    Host host = Host.getHost(0);
 +    VM loc1 = host.getVM(1);
 +    VM loc2 = host.getVM(2);
 +
 +    int ports[] = AvailablePortHelper.getRandomAvailableTCPPorts(2);
 +    final int port1 = ports[0];
 +    this.port1 = port1;
 +    final int port2 = ports[1];
 +    this.port2 = port2; // for cleanup in tearDown2
 +    DistributedTestUtils.deleteLocatorStateFile(port1);
 +    DistributedTestUtils.deleteLocatorStateFile(port2);
 +    final String host0 = NetworkUtils.getServerHostName(host);
 +    final String locators = host0 + "[" + port1 + "]," + host0 + "[" + port2 + "]";
 +    final Properties properties = new Properties();
 +    properties.put(MCAST_PORT, "0");
 +    properties.put(LOCATORS, locators);
 +    properties.put(ENABLE_NETWORK_PARTITION_DETECTION, "false");
 +    properties.put(DISABLE_AUTO_RECONNECT, "true");
 +    properties.put(MEMBER_TIMEOUT, "2000");
 +    properties.put(LOG_LEVEL, LogWriterUtils.getDUnitLogLevel());
 +    properties.put(ENABLE_CLUSTER_CONFIGURATION, "false");
 +    properties.put(SSL_CIPHERS, "any");
 +    properties.put(SSL_PROTOCOLS, "any");
 +    properties.put(SSL_KEYSTORE, getMultiKeyKeystore());
 +    properties.put(SSL_KEYSTORE_PASSWORD, "password");
 +    properties.put(SSL_KEYSTORE_TYPE, "JKS");
 +    properties.put(SSL_TRUSTSTORE, getMultiKeyTruststore());
 +    properties.put(SSL_TRUSTSTORE_PASSWORD, "password");
 +    properties.put(SSL_LOCATOR_ALIAS, "locatorkey");
 +    properties.put(SSL_ENABLED_COMPONENTS, SecurableComponent.LOCATOR.getConstant());
 +
 +
      try {
 -      async2 = loc2.invokeAsync(startLocator2);
 -      Wait.pause(2000);
 -      async1 = loc1.invokeAsync(startLocator1);
 +      loc2.invoke("startLocator2", () -> startLocatorWithPortAndProperties(port2, properties));
 +      loc1.invoke("startLocator1", () -> startLocatorWithPortAndProperties(port1, properties));
      } finally {
        try {
 -        if (async1 != null) {
 -          async1.join(45000);
 -          if (async1.isAlive()) {
 -            ThreadUtils.dumpAllStacks();
 -          }
 -          if (async2 != null) {
 -            async2.join();
 -            Object result1 = async1.getReturnValue();
 -            if (result1 instanceof Exception) {
 -              throw (Exception) result1;
 -            }
 -            Object result2 = async2.getReturnValue();
 -            if (result2 instanceof Exception) {
 -              throw (Exception) result2;
 -            }
 -            // verify that they found each other
 -            SerializableCallable verify = new SerializableCallable("verify no split-brain") {
 -              public Object call() {
 -                InternalDistributedSystem sys = InternalDistributedSystem.getAnyInstance();
 -                if (sys == null) {
 -                  fail("no distributed system found");
 -                }
 -                Assert.assertTrue(sys.getDM().getViewMembers().size() == 2,
 -                    "expected 2 members but found " + sys.getDM().getViewMembers().size()
 -                );
 -                return true;
 -              }
 -            };
 -            loc2.invoke(verify);
 -            loc1.invoke(verify);
 -          }
 -        }
 +        // verify that they found each other
 +        loc2.invoke("verifyLocatorNotInSplitBrain", () -> verifyLocatorNotInSplitBrain(2));
 +        loc1.invoke("verifyLocatorNotInSplitBrain", () -> verifyLocatorNotInSplitBrain(2));
        } finally {
 -        SerializableRunnable r = new SerializableRunnable("stop locator") {
 -          public void run() {
 -            Locator loc = Locator.getLocator();
 -            if (loc != null) {
 -              loc.stop();
 -            }
 -          }
 -        };
 -        loc2.invoke(r);
 -        loc1.invoke(r);
 +        loc2.invoke("stop locator", () -> stopLocator());
 +        loc1.invoke("stop locator", () -> stopLocator());
        }
      }
    }
@@@ -1151,20 -952,23 +1161,21 @@@
      properties.put(MEMBER_TIMEOUT, "2000");
      properties.put(ENABLE_CLUSTER_CONFIGURATION, "false");
  
+     addDSProps(properties);
 -    SerializableRunnable disconnect =
 -        new SerializableRunnable("Disconnect from " + locators) {
 -          public void run() {
 -            DistributedSystem sys = InternalDistributedSystem.getAnyInstance();
 -            if (sys != null && sys.isConnected()) {
 -              sys.disconnect();
 -            }
 -            MembershipManagerHelper.inhibitForcedDisconnectLogging(false);
 -          }
 -        };
 -    SerializableRunnable expectedException =
 -        new SerializableRunnable("Add expected exceptions") {
 -          public void run() {
 -            MembershipManagerHelper.inhibitForcedDisconnectLogging(true);
 -          }
 -        };
 +    SerializableRunnable disconnect = new SerializableRunnable("Disconnect from " + locators) {
 +      public void run() {
 +        DistributedSystem sys = InternalDistributedSystem.getAnyInstance();
 +        if (sys != null && sys.isConnected()) {
 +          sys.disconnect();
 +        }
 +        MembershipManagerHelper.inhibitForcedDisconnectLogging(false);
 +      }
 +    };
 +    SerializableRunnable expectedException = new SerializableRunnable("Add expected exceptions") {
 +      public void run() {
 +        MembershipManagerHelper.inhibitForcedDisconnectLogging(true);
 +      }
 +    };
      try {
        final String uname = getUniqueName();
        locvm.invoke(new SerializableRunnable() {
@@@ -1253,11 -1066,15 +1264,12 @@@
      props.setProperty(MCAST_PORT, "0");
      props.setProperty(LOCATORS, locators);
  
+     addDSProps(props);
      final String expected = "java.net.ConnectException";
 -    final String addExpected =
 -        "<ExpectedException action=add>" + expected + "</ExpectedException>";
 -    final String removeExpected =
 -        "<ExpectedException action=remove>" + expected + "</ExpectedException>";
 +    final String addExpected = "<ExpectedException action=add>" + expected + "</ExpectedException>";
 +    final String removeExpected = "<ExpectedException action=remove>" + expected + "</ExpectedException>";
  
 -    LogWriter bgexecLogger =
 -        new LocalLogWriter(InternalLogWriter.ALL_LEVEL, System.out);
 +    LogWriter bgexecLogger = new LocalLogWriter(InternalLogWriter.ALL_LEVEL, System.out);
      bgexecLogger.info(addExpected);
  
      boolean exceptionOccurred = true;
@@@ -1321,6 -1139,7 +1333,7 @@@
            locProps.setProperty(MEMBER_TIMEOUT, "1000");
            locProps.put(ENABLE_CLUSTER_CONFIGURATION, "false");
  
 -          addDSProps(locProps);  
++          addDSProps(locProps);
            Locator.startLocatorAndDS(port, logFile, locProps);
          } catch (IOException ex) {
            com.gemstone.gemfire.test.dunit.Assert.fail("While starting locator on port " + port, ex);
@@@ -1538,21 -1374,44 +1556,22 @@@
      dsProps.setProperty(LOCATORS, locators);
      dsProps.setProperty(MCAST_PORT, "0");
      dsProps.setProperty(ENABLE_CLUSTER_CONFIGURATION, "false");
 -    addDSProps(dsProps);
 -    vm0.invoke(new SerializableRunnable("Start locator on " + port1) {
 -      public void run() {
 -        File logFile = new File("");
 -        try {
 -          Locator.startLocatorAndDS(port1, logFile, dsProps);
 -        } catch (IOException ex) {
 -          com.gemstone.gemfire.test.dunit.Assert.fail("While starting locator on port " + port1, ex);
 -        }
 -      }
 -    });
 -    try {
  
 -      //try { Thread.currentThread().sleep(4000); } catch (InterruptedException ie) { }
 -
 -      vm3.invoke(new SerializableRunnable("Start locator on " + port2) {
 -        public void run() {
 -          File logFile = new File("");
 -          try {
 -            Locator.startLocatorAndDS(port2, logFile, dsProps);
 +    vm0.invoke("start Locator1", () -> startLocator(port1, dsProps));
 +    try {
  
 -          } catch (IOException ex) {
 -            com.gemstone.gemfire.test.dunit.Assert.fail("While starting locator on port " + port2, ex);
 -          }
 -        }
 -      });
 +      vm3.invoke("Start locator on " + port2, () -> startLocator(port2, dsProps));
        try {
  
 -        SerializableRunnable connect =
 -            new SerializableRunnable("Connect to " + locators) {
 -              public void run() {
 -                Properties props = new Properties();
 -                props.setProperty(MCAST_PORT, "0");
 -                props.setProperty(LOCATORS, locators);
 -                addDSProps(props);
 -                DistributedSystem.connect(props);
 -              }
 -            };
 +        SerializableRunnable connect = new SerializableRunnable("Connect to " + locators) {
 +          public void run() {
 +            Properties props = new Properties();
 +            props.setProperty(MCAST_PORT, "0");
 +            props.setProperty(LOCATORS, locators);
++            addDSProps(properties);
 +            DistributedSystem.connect(props);
 +          }
 +        };
          vm1.invoke(connect);
          vm2.invoke(connect);
  
@@@ -1605,7 -1465,14 +1625,14 @@@
        }
      };
    }
 -  
 +
+   public void testLoop() throws Exception {
+     for(int i=0; i < 200; i++) {
+       testMultipleLocatorsRestartingAtSameTime();
+       tearDown();
+       setUp();
+     }
+   }
    /**
     * Tests starting multiple locators at the same time and ensuring that the locators
     * end up only have 1 master.
@@@ -1869,17 -1744,19 +1899,18 @@@
        }
      });
  
 -    SerializableRunnable connect =
 -        new SerializableRunnable("Connect to " + locators) {
 -          public void run() {
 -            Properties props = new Properties();
 -            props.setProperty(MCAST_PORT, String.valueOf(mcastport));
 -            props.setProperty(LOCATORS, locators);
 -            props.setProperty(LOG_LEVEL, LogWriterUtils.getDUnitLogLevel());
 -            props.setProperty(MCAST_TTL, "0");
 -            props.setProperty(ENABLE_NETWORK_PARTITION_DETECTION, "true");
 -            addDSProps(props);
 -            DistributedSystem.connect(props);
 -          }
 -        };
 +    SerializableRunnable connect = new SerializableRunnable("Connect to " + locators) {
 +      public void run() {
 +        Properties props = new Properties();
 +        props.setProperty(MCAST_PORT, String.valueOf(mcastport));
 +        props.setProperty(LOCATORS, locators);
 +        props.setProperty(LOG_LEVEL, LogWriterUtils.getDUnitLogLevel());
 +        props.setProperty(MCAST_TTL, "0");
 +        props.setProperty(ENABLE_NETWORK_PARTITION_DETECTION, "true");
++        addDSProps(properties);
 +        DistributedSystem.connect(props);
 +      }
 +    };
      try {
        vm1.invoke(connect);
        vm2.invoke(connect);

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/a3a5a04c/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/DistributionConfigJUnitTest.java
----------------------------------------------------------------------
diff --cc geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/DistributionConfigJUnitTest.java
index 3680a39,2b8bd14..f262e98
--- a/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/DistributionConfigJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/DistributionConfigJUnitTest.java
@@@ -81,7 -81,7 +81,7 @@@ public class DistributionConfigJUnitTes
    @Test
    public void testGetAttributeNames() {
      String[] attNames = AbstractDistributionConfig._getAttNames();
-     assertEquals(attNames.length, 156);
 -    assertEquals(attNames.length, 145);
++    assertEquals(attNames.length, 157);
  
      List boolList = new ArrayList();
      List intList = new ArrayList();

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/a3a5a04c/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/MembershipJUnitTest.java
----------------------------------------------------------------------
diff --cc geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/MembershipJUnitTest.java
index 996fbf6,c30a441..26c4965
--- a/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/MembershipJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/MembershipJUnitTest.java
@@@ -27,9 -47,10 +47,10 @@@ import com.gemstone.gemfire.distributed
  import com.gemstone.gemfire.distributed.internal.membership.gms.messages.*;
  import com.gemstone.gemfire.distributed.internal.membership.gms.mgr.GMSMembershipManager;
  import com.gemstone.gemfire.internal.AvailablePortHelper;
 -import com.gemstone.gemfire.internal.SocketCreator;
 +import com.gemstone.gemfire.internal.net.SocketCreator;
  import com.gemstone.gemfire.internal.admin.remote.RemoteTransportConfig;
  import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
+ 
  import org.apache.logging.log4j.Level;
  import org.junit.AfterClass;
  import org.junit.BeforeClass;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/a3a5a04c/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/gms/locator/GMSLocatorRecoveryJUnitTest.java
----------------------------------------------------------------------