Example #1
0
 public V3Serializer(LockssDaemon daemon) throws PollSerializerException {
   this.daemon = daemon;
   Configuration config = CurrentConfig.getCurrentConfig();
   File stateDir = PollUtil.ensurePollStateRoot();
   if (!FileUtil.ensureDirExists(stateDir)) {
     throw new PollSerializerException("Could not create state directory " + stateDir);
   }
   try {
     this.pollDir = FileUtil.createTempDir("pollstate-", "", stateDir);
   } catch (IOException ex) {
     throw new PollSerializerException("Cannot create temp dir in state directory" + stateDir, ex);
   }
 }
 /** Set the session timeout to the configured value */
 protected void setSessionTimeout(HttpSession session) {
   Configuration config = CurrentConfig.getCurrentConfig();
   setSessionTimeout(
       session, config.getTimeInterval(PARAM_UI_SESSION_TIMEOUT, DEFAULT_UI_SESSION_TIMEOUT));
 }