コード例 #1
0
  public static cfApplicationManager init(xmlCFML config) {
    cfApplicationManager appManager = new cfApplicationManager();
    appManager.engineAdminUpdate(config);
    cfEngine.registerEngineListener(appManager);
    cfEngine.thisPlatform.timerSetListenerMinute(appManager, 5);

    cf5ClientData = config.getBoolean("server.cfapplication.cf5clientdata", false);
    if (cf5ClientData) {
      cfEngine.log("ColdFusion-compatible CLIENT data enabled");
      cftokenUUID =
          config.getBoolean("server.cfapplication.cftokenuuid", false); // default to false
    } else {
      cftokenUUID = config.getBoolean("server.cfapplication.cftokenuuid", true); // default to true
    }

    // Initialise this watchdog that will look for the deletion of the client data
    new cfClientDataManager();

    return appManager;
  }
コード例 #2
0
  public void engineAdminUpdate(xmlCFML config) {

    // Defaults to store the client data using COOKIES
    defaultClientStorage =
        config.getString("server.cfapplication.clientstorage", DEFAULT_CLIENT_STORAGE);
    if (defaultClientStorage.equalsIgnoreCase("REGISTRY")) {
      cfEngine.log(
          "ERROR:  Registry can no longer be used to store client data.  Cookies will be used instead.");

      defaultClientStorage = DEFAULT_CLIENT_STORAGE;
      config.setData("server.cfapplication.clientstorage", DEFAULT_CLIENT_STORAGE);
      try {
        cfEngine.writeXmlFile(config, false);
      } catch (cfmRunTimeException rte) {
        cfEngine.log("ERROR:  failed to change registry to cookie in bluedragon.xml.");
      }
    }

    clientGlobalUpdateDisabled =
        config.getBoolean("server.cfapplication.clientglobalupdatesdisabled", false);
    if (clientGlobalUpdateDisabled) {
      cfEngine.log("Global client variable updates disabled");
    }

    // Defaults to not use the J2EE Session management
    bJ2EESessionManagement =
        config.getBoolean(
            "server.cfapplication.j2eesession",
            Boolean.valueOf(DEFAULT_J2EE_SESSION).booleanValue());

    if (bJ2EESessionManagement) {
      /*
       * Set to -1 so it will default to the session timeout value
       * configured in the J2EE web app's web.xml file
       */
      sessionTimeOut = "-1";
    } else {
      // Defaults to 20 minutes, expressed as a fraction of 1 day
      sessionTimeOut =
          config.getString("server.cfapplication.sessiontimeout", DEFAULT_SESSION_TIMEOUT);
    }
    sessionTimeOutData = null;

    // Defaults to 2 days
    applicationTimeOut =
        config.getString("server.cfapplication.applicationtimeout", DEFAULT_APPLICATION_TIMEOUT);
    applicationTimeOutData = null;

    cfEngine.log(
        "cfApplicationManager.DefaultClientStorage=["
            + defaultClientStorage
            + "]; J2EE Sessions="
            + bJ2EESessionManagement);
  }