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()); }
/** * Create a calendar-based timer based on the input schedule expression. * * @param schedule * A schedule expression describing the timeouts for this timer. * @param timerConfig * Timer configuration. * @return The newly created Timer. * @throws IllegalArgumentException * If Schedule represents an invalid schedule expression. * @throws IllegalStateException * If this method is invoked while the instance is in a state that * does not allow access to this method. * @throws EJBException * If this method could not complete due to a system-level failure. */ @Override public Timer createCalendarTimer(ScheduleExpression schedule, TimerConfig timerConfig) throws IllegalArgumentException, IllegalStateException, EJBException { Serializable info = null; if (timerConfig != null) info = timerConfig.getInfo(); return createScheduledTimer(schedule, info); }
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; }
/** * {@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()); }
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; }
info = timerConfig.getInfo();
/** * {@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); }
info = timerConfig.getInfo();
info = timerConfig.getInfo();
info = timerConfig.getInfo();
/** * {@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()); }
new Object[] { String.valueOf(containerId), timedObjectPrimaryKey, timerConfig.getInfo() }); logger.log(Level.SEVERE, "", e);
timer = new TimerState (timerId, containerId, applicationId, ownerId, timedObjectPrimaryKey, initialExpiration, intervalDuration, schedule, timerConfig.getInfo()); } catch(IOException ioe) { CreateException ce = new CreateException(); " ::applicationId=" + timer.getApplicationId() + " ::timedObjectPK=" + timedObjectPrimaryKey + " ::info=" + timerConfig.getInfo() + " ::schedule=" + timer.getSchedule() + " ::persistent=" + timerConfig.isPersistent() +
timer = new TimerState (timerId, containerId, applicationId, ownerId, timedObjectPrimaryKey, initialExpiration, intervalDuration, schedule, timerConfig.getInfo()); } catch(IOException ioe) { CreateException ce = new CreateException(); " ::applicationId=" + timer.getApplicationId() + " ::timedObjectPK=" + timedObjectPrimaryKey + " ::info=" + timerConfig.getInfo() + " ::schedule=" + timer.getSchedule() + " ::persistent=" + timerConfig.isPersistent() +