public void contextInitialized(ContextRefreshedEvent event) {
    logger.info(resourceBundle.getString("LOG_MSG_CONTEXT_INITIALIZED"));

    loadPulseVersionDetails();

    logger.info(resourceBundle.getString("LOG_MSG_CHECK_APP_RUNNING_MODE"));

    if (isEmbedded) {
      // jmx connection parameters
      logger.info(resourceBundle.getString("LOG_MSG_APP_RUNNING_EMBEDDED_MODE"));
      repository.setJmxUseLocator(false);
      repository.setHost(System.getProperty(PulseConstants.SYSTEM_PROPERTY_PULSE_HOST,
          PulseConstants.GEMFIRE_DEFAULT_HOST));
      repository.setPort(System.getProperty(PulseConstants.SYSTEM_PROPERTY_PULSE_PORT,
          PulseConstants.GEMFIRE_DEFAULT_PORT));

      repository.setUseSSLManager(
          Boolean.parseBoolean(
              System.getProperty(PulseConstants.SYSTEM_PROPERTY_PULSE_USESSL_MANAGER)));
      repository.setUseSSLLocator(
          Boolean.parseBoolean(
              System.getProperty(PulseConstants.SYSTEM_PROPERTY_PULSE_USESSL_LOCATOR)));

      WebApplicationContext applicationContext =
          (WebApplicationContext) event.getApplicationContext();
      ServletContext servletContext = applicationContext.getServletContext();

      Object sslProperties =
          servletContext.getAttribute(GEODE_SSLCONFIG_SERVLET_CONTEXT_PARAM);
      if (sslProperties instanceof Properties) {
        repository.setJavaSslProperties((Properties) sslProperties);
      }
    } else {
      // jmx connection parameters
      logger.info(resourceBundle.getString("LOG_MSG_APP_RUNNING_NONEMBEDDED_MODE"));

      // Load Pulse Properties
      Properties pulseProperties =
          propertiesFileLoader.loadProperties(PulseConstants.PULSE_PROPERTIES_FILE, resourceBundle);

      repository.setJmxUseLocator(Boolean.valueOf(
          pulseProperties.getProperty(PulseConstants.APPLICATION_PROPERTY_PULSE_USELOCATOR)));
      repository.setHost(pulseProperties.getProperty(PulseConstants.APPLICATION_PROPERTY_PULSE_HOST,
          PulseConstants.GEMFIRE_DEFAULT_HOST));
      repository.setPort(pulseProperties.getProperty(PulseConstants.APPLICATION_PROPERTY_PULSE_PORT,
          PulseConstants.GEMFIRE_DEFAULT_PORT));

      // SSL
      repository.setUseSSLManager(Boolean.parseBoolean(pulseProperties
          .getProperty(PulseConstants.SYSTEM_PROPERTY_PULSE_USESSL_MANAGER, "false")));
      repository.setUseSSLLocator(Boolean.parseBoolean(pulseProperties
          .getProperty(PulseConstants.SYSTEM_PROPERTY_PULSE_USESSL_LOCATOR, "false")));

      // load pulse security properties
      Properties pulseSecurityProperties =
          propertiesFileLoader
              .loadProperties(PulseConstants.PULSE_SECURITY_PROPERTIES_FILE, resourceBundle);

      // set the ssl related properties found in pulsesecurity.properties
      if (!pulseSecurityProperties.isEmpty()) {
        Set<Entry<Object, Object>> entrySet = pulseSecurityProperties.entrySet();
        for (Entry<Object, Object> entry : entrySet) {
          String key = (String) entry.getKey();
          if (key.startsWith("javax.net.ssl.")) {
            String val = (String) entry.getValue();
            System.setProperty(key, val);
          }
        }

        repository.setJavaSslProperties(pulseSecurityProperties);
      }
    }
  }
This class is used for checking the application running mode i.e. Embedded or not

@since GemFire version 7.0.Beta 2012-09-23
geode-pulse/src/main/java/org/apache/geode/tools/pulse/internal/PulseAppListener.java