Package com.webobjects.appserver

Examples of com.webobjects.appserver.WOTimer.schedule()


        NSLog.out.appendln("Instance will live " + timeToLive + " seconds.");
        // add a fudge factor of around 10 minutes
        timeToLive += Math.random() * 600;
        NSTimestamp exitDate = (new NSTimestamp()).timestampByAddingGregorianUnits(0, 0, 0, 0, 0, timeToLive);
        WOTimer t = new WOTimer(exitDate, 0, this, "killInstance", null, null, false);
        t.schedule();
      }
      int timeToDie = ERXProperties.intForKey("ERTimeToDie");
      if (timeToDie > 0) {
        log.info("Instance will not live past " + timeToDie + ":00.");
        NSLog.out.appendln("Instance will not live past " + timeToDie + ":00.");
View Full Code Here


        // adding up to 1 hour
        s += (Math.random() * 3600);
 
        NSTimestamp stopDate = now.timestampByAddingGregorianUnits(0, 0, 0, 0, 0, s);
        WOTimer t = new WOTimer(stopDate, 0, this, "startRefusingSessions", null, null, false);
        t.schedule();
      }
      super.run();
    }
    catch (RuntimeException t) {
      if (ERXApplication._wasMainInvoked) {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.