public TimerImpl loadAutoTimer(ScheduleExpression schedule, TimerConfig timerConfig, Method timeoutMethod) { return this.createCalendarTimer(schedule, timerConfig.getInfo(), timerConfig.isPersistent(), timeoutMethod); }
/** * {@inheritDoc} */ @Override public Timer createSingleActionTimer(long duration, TimerConfig timerConfig) throws IllegalArgumentException, IllegalStateException, EJBException { assertTimerServiceState(); if (duration < 0) throw EJB3_TIMER_LOGGER.invalidDurationActionTimer(); return createTimer(new Date(System.currentTimeMillis() + duration), 0, timerConfig.getInfo(), timerConfig .isPersistent()); }
/** * {@inheritDoc} */ @Override public Timer createCalendarTimer(ScheduleExpression schedule, TimerConfig timerConfig) throws IllegalArgumentException, IllegalStateException, EJBException { assertTimerServiceState(); Serializable info = timerConfig == null ? null : timerConfig.getInfo(); boolean persistent = timerConfig == null || timerConfig.isPersistent(); return this.createCalendarTimer(schedule, info, persistent, null); }
/** * {@inheritDoc} */ @Override public Timer createSingleActionTimer(Date expiration, TimerConfig timerConfig) throws IllegalArgumentException, IllegalStateException, EJBException { assertTimerServiceState(); if (expiration == null) { throw EJB3_TIMER_LOGGER.expirationIsNull(); } if (expiration.getTime() < 0) { throw EJB3_TIMER_LOGGER.invalidExpirationActionTimer(); } return this.createTimer(expiration, 0, timerConfig.getInfo(), timerConfig.isPersistent()); }
/** * {@inheritDoc} */ @Override public Timer createIntervalTimer(Date initialExpiration, long intervalDuration, TimerConfig timerConfig) throws IllegalArgumentException, IllegalStateException, EJBException { assertTimerServiceState(); if (initialExpiration == null) { throw EJB3_TIMER_LOGGER.initialExpirationIsNullCreatingTimer(); } if (initialExpiration.getTime() < 0) { throw EJB3_TIMER_LOGGER.invalidInitialExpiration("initialExpiration.getTime()"); } if (intervalDuration < 0) { throw EJB3_TIMER_LOGGER.invalidInitialExpiration("intervalDuration"); } return this.createTimer(initialExpiration, intervalDuration, timerConfig.getInfo(), timerConfig.isPersistent()); }
if (this.doesScheduleMatch(calendarTimer.getScheduleExpression(), timer.getScheduleExpression()) && timer.getTimerConfig().isPersistent()) { it.remove(); found = true;
public TimerImpl loadAutoTimer(ScheduleExpression schedule, TimerConfig timerConfig, Method timeoutMethod) { return this.createCalendarTimer(schedule, timerConfig.getInfo(), timerConfig.isPersistent(), timeoutMethod); }
public TimerData(final long id, final EjbTimerServiceImpl timerService, final String deploymentId, final Object primaryKey, final Method timeoutMethod, final TimerConfig timerConfig) { this.id = id; this.timerService = timerService; this.deploymentId = deploymentId; this.primaryKey = primaryKey; this.info = timerConfig == null ? null : timerConfig.getInfo(); this.persistent = timerConfig == null || timerConfig.isPersistent(); this.timer = new TimerImpl(this); this.timeoutMethod = timeoutMethod; }
public TimerData(final long id, final EjbTimerServiceImpl timerService, final String deploymentId, final Object primaryKey, final Method timeoutMethod, final TimerConfig timerConfig) { this.id = id; this.timerService = timerService; this.deploymentId = deploymentId; this.primaryKey = primaryKey; this.info = timerConfig == null ? null : timerConfig.getInfo(); this.persistent = timerConfig == null || timerConfig.isPersistent(); this.timer = new TimerImpl(this); this.timeoutMethod = timeoutMethod; }
/** * {@inheritDoc} */ @Override public Timer createSingleActionTimer(long duration, TimerConfig timerConfig) throws IllegalArgumentException, IllegalStateException, EJBException { assertTimerServiceState(); if (duration < 0) throw MESSAGES.invalidDurationActionTimer(); return createTimer(new Date(System.currentTimeMillis() + duration), 0, timerConfig.getInfo(), timerConfig .isPersistent()); }
/** * {@inheritDoc} */ @Override public Timer createCalendarTimer(ScheduleExpression schedule, TimerConfig timerConfig) throws IllegalArgumentException, IllegalStateException, EJBException { assertTimerServiceState(); Serializable info = timerConfig == null ? null : timerConfig.getInfo(); boolean persistent = timerConfig == null || timerConfig.isPersistent(); return this.createCalendarTimer(schedule, info, persistent, null); }
/** * @param timedObjectPrimaryKey can be null if timed object is not an entity bean. */ protected void _createTimer(TimerPrimaryKey timerId, long containerId, long applicationId, Object timedObjectPrimaryKey, String server_name, Date initialExpiration, long intervalDuration, EJBTimerSchedule schedule, TimerConfig timerConfig) throws Exception { if (timerConfig.isPersistent()) { // TODO throw new CreateException("Persistent timers are not supported in this setup"); } else { addTimerSynchronization(null, timerId.getTimerId(), initialExpiration, containerId, ownerIdOfThisServer_, false); } }
/** * {@inheritDoc} */ @Override public Timer createSingleActionTimer(Date expiration, TimerConfig timerConfig) throws IllegalArgumentException, IllegalStateException, EJBException { assertTimerServiceState(); if (expiration == null) { throw MESSAGES.expirationIsNull(); } if (expiration.getTime() < 0) { throw MESSAGES.invalidExpirationActionTimer(); } return this.createTimer(expiration, 0, timerConfig.getInfo(), timerConfig.isPersistent()); }
/** * {@inheritDoc} */ @Override public Timer createIntervalTimer(Date initialExpiration, long intervalDuration, TimerConfig timerConfig) throws IllegalArgumentException, IllegalStateException, EJBException { assertTimerServiceState(); if (initialExpiration == null) { throw MESSAGES.initialExpirationIsNullCreatingTimer(); } if (initialExpiration.getTime() < 0) { throw MESSAGES.invalidInitialExpiration("initialExpiration.getTime()"); } if (intervalDuration < 0) { throw MESSAGES.invalidInitialExpiration("intervalDuration"); } return this.createTimer(initialExpiration, intervalDuration, timerConfig.getInfo(), timerConfig.isPersistent()); }
throws Exception { try { if (timerConfig.isPersistent()) { timerLocal_.createTimer(timerId.getTimerId(), containerId, applicationId, server_name, timedObjectPrimaryKey,
if (this.doesScheduleMatch(entity.getScheduleExpression(), timer.getScheduleExpression()) && timer.getTimerConfig().isPersistent()) { it.remove(); found = true;
timedObjectPrimaryKey, schedule, timerConfig.getInfo(), timerConfig.isPersistent()); if (timerConfig.isPersistent()) { timerLocal_.createTimer(timerId.getTimerId(), containerId, applicationId, server_name, timedObjectPrimaryKey,
timedObjectPrimaryKey, schedule, timerConfig.getInfo(), timerConfig.isPersistent());
" ::info=" + timerConfig.getInfo() + " ::schedule=" + timer.getSchedule() + " ::persistent=" + timerConfig.isPersistent() + " ::initialExpiration=" + initialExpiration + " ::intervalDuration=" + intervalDuration +
" ::info=" + timerConfig.getInfo() + " ::schedule=" + timer.getSchedule() + " ::persistent=" + timerConfig.isPersistent() + " ::initialExpiration=" + initialExpiration + " ::intervalDuration=" + intervalDuration +