public void init() { if (schedulingService != null) { // set to run once per hour schedulingService.addScheduledJob(3600000, new ReaperJob()); } else { log.warn("Session reaper job was not scheduled"); } }
/** Starts measurement. */ public void startRoundTripMeasurement() { if (pingInterval <= 0) { // Ghost detection code disabled return; } getWriteLock().lock(); try { if (keepAliveJobName == null) { // log.debug("Scope null = {}", (scope == null)); // log.debug("getScope null = {}", (getScope() == null)); // log.debug("Context null = {}", (scope.getContext() == null)); // ISchedulingService schedulingService = (ISchedulingService) // scope.getContext().getBean(ISchedulingService.BEAN_NAME); keepAliveJobName = schedulingService.addScheduledJob(pingInterval, new KeepAliveJob()); } log.debug("Keep alive job name {} for client id {}", keepAliveJobName, getId()); } finally { getWriteLock().unlock(); } }
/** Starts measurement. */ public void startRoundTripMeasurement() { if (pingInterval > 0 && keepAliveJobName == null) { keepAliveJobName = schedulingService.addScheduledJob(pingInterval, new KeepAliveJob()); log.debug("Keep alive job name {} for client id {}", keepAliveJobName, getId()); } }