private static void validateUsabilityOfSecurityCallbacks(
      InternalDistributedSystem internalDistributedSystem, CacheConfig cacheConfig)
      throws GemFireSecurityException {
    if (internalDistributedSystem == null) {
      return;
    }
    // pre-existing DistributedSystem already has an incompatible SecurityService in use
    if (cacheConfig.getSecurityManager() != null) {
      throw new GemFireSecurityException(
          "Existing DistributedSystem connection cannot use specified SecurityManager");
    }
    if (cacheConfig.getPostProcessor() != null) {
      throw new GemFireSecurityException(
          "Existing DistributedSystem connection cannot use specified PostProcessor");
    }
  }
if existing DistributedSystem connection cannot use specified SecurityManager or
PostProcessor.
geode-core/src/main/java/org/apache/geode/internal/cache/InternalCacheBuilder.java