Package org.jboss.ejb3.timerservice.mk2

Examples of org.jboss.ejb3.timerservice.mk2.TimerServiceImpl$Task


        super(calendarTimer);
    }

    @Override
    protected void callTimeout() throws Exception {
        CalendarTimer calendarTimer = this.getTimer();

        // if we have any more schedules remaining, then schedule a new task
        if (calendarTimer.getNextExpiration() != null && !calendarTimer.isInRetry()) {
            calendarTimer.scheduleTimeout();
        }

        // finally invoke the timeout method through the invoker
        if (calendarTimer.isAutoTimer()) {
            TimedObjectInvoker invoker = this.timerService.getInvoker();
            if (!(invoker instanceof MultiTimeoutMethodTimedObjectInvoker)) {
                String msg = "Cannot invoke timeout method because timer: " + calendarTimer
                        + " is an auto timer, but invoker is not of type" + MultiTimeoutMethodTimedObjectInvoker.class;
                logger.error(msg);
                throw new RuntimeException(msg);
            }
            // call the timeout method
            ((MultiTimeoutMethodTimedObjectInvoker) invoker).callTimeout(calendarTimer, calendarTimer.getTimeoutMethod());
        } else {
            this.timerService.getInvoker().callTimeout(calendarTimer);
        }
    }
View Full Code Here


        final String path = this.path.getOptionalValue();
        if (path != null) {
            timerPersistence = new FileTimerPersistence(transactionManagerInjectedValue.getValue(), transactionSynchronizationRegistryInjectedValue.getValue(), new File(path + File.separatorChar + name), true, module.getModuleLoader());
            timerPersistence.start();
        }
        timerServiceFactory = new TimerServiceFactoryImpl(timerPersistence, transactionManagerInjectedValue.getValue(), executorService);
    }
View Full Code Here

      }
   }

   protected void postTimeoutProcessing()
   {
      TimerState timerState = this.timer.getState();
      if (timerState == TimerState.IN_TIMEOUT || timerState == TimerState.RETRY_TIMEOUT)
      {
         if (this.timer.getInterval() == 0)
         {
            this.timer.expireTimer();
View Full Code Here

   @Override
   protected void postTimeoutProcessing()
   {
      CalendarTimer calendarTimer = this.getTimer();
      TimerState timerState = calendarTimer.getState();
      if (timerState == TimerState.IN_TIMEOUT || timerState == TimerState.RETRY_TIMEOUT)
      {
         if (calendarTimer.getNextExpiration() == null)
         {
            calendarTimer.expireTimer();
View Full Code Here

    }

    @Override
    protected void postTimeoutProcessing() {
        CalendarTimer calendarTimer = this.getTimer();
        TimerState timerState = calendarTimer.getState();
        if (timerState == TimerState.IN_TIMEOUT || timerState == TimerState.RETRY_TIMEOUT) {
            if (calendarTimer.getNextExpiration() == null) {
                calendarTimer.expireTimer();
            } else {
                calendarTimer.setTimerState(TimerState.ACTIVE);
View Full Code Here

            logger.info("Timer is not active, skipping retry of timer: " + this.timer);
        }
    }

    protected void postTimeoutProcessing() {
        TimerState timerState = this.timer.getState();
        if (timerState == TimerState.IN_TIMEOUT || timerState == TimerState.RETRY_TIMEOUT) {
            if (this.timer.getInterval() == 0) {
                this.timer.expireTimer();
            } else {
                this.timer.setTimerState(TimerState.ACTIVE);
View Full Code Here

    * Creates and return a new persistent state of this timer
    */
   @Override
   protected TimerEntity createPersistentState()
   {
      return new CalendarTimerEntity(this);
   }
View Full Code Here

      for (TimerEntity persistedTimer : persistedTimers)
      {
         TimerImpl activeTimer = null;
         if (persistedTimer.isCalendarTimer())
         {
            CalendarTimerEntity calendarTimerEntity = (CalendarTimerEntity) persistedTimer;
            // create a timer instance from the persisted calendar timer
            activeTimer = new CalendarTimer(calendarTimerEntity, this);
         }
         else
         {
View Full Code Here

      for (TimerEntity persistedTimer : persistedTimers)
      {
         TimerImpl activeTimer = null;
         if (persistedTimer.isCalendarTimer())
         {
            CalendarTimerEntity calendarTimerEntity = (CalendarTimerEntity) persistedTimer;
            // create a timer instance from the persisted calendar timer
            activeTimer = new CalendarTimer(calendarTimerEntity, this);
         }
         else
         {
View Full Code Here

    * Creates and return a new persistent state of this timer
    */
   @Override
   protected TimerEntity createPersistentState()
   {
      return new CalendarTimerEntity(this);
   }
View Full Code Here

TOP

Related Classes of org.jboss.ejb3.timerservice.mk2.TimerServiceImpl$Task

Copyright © 2018 www.massapicom. 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.