geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From u..@apache.org
Subject incubator-geode git commit: GEODE-420: Bug fixes from precheckin
Date Wed, 24 Aug 2016 21:51:07 GMT
Repository: incubator-geode
Updated Branches:
  refs/heads/feature/GEODE-420 255202891 -> 7addcd953


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/feature/GEODE-420
Commit: 7addcd9538ec3c7742e468e70c306c45eaaedd3e
Parents: 2552028
Author: Udo Kohlmeyer <ukohlmeyer@pivotal.io>
Authored: Thu Aug 25 07:50:58 2016 +1000
Committer: Udo Kohlmeyer <ukohlmeyer@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


Mime
View raw message