0 Replies Latest reply on Nov 30, 2015 4:42 PM by skionsnow

    Interval timer giving JBAS014143 error

    skionsnow

      I have an 30 second interval timer in my application which had been running for several weeks without incident.  I have a log entry that indicates that the prior execution of this timer is still running.  I have log entries that indicate that the timer action has completed within several milliseconds.  When the timer fires, I spin off an asynchronous action(timerAction.jcmTimerAction) and then return:

       

      @Timeout

        @TransactionAttribute(TransactionAttributeType.NEVER)

        public void timeoutHandler(Timer timer) {

        LOGGER.debug("HA Timer Action Start");

        timerAction.jcmTimerAction();

        LOGGER.debug("HA Timer Action Done");

        }

       

      I see this in the log for the last timer that executes as expected. 

      2015/11/28-21:49:47,474 DEBUG [] [c.t.t.j.h.t.JcmTimerMBean] (EJB default - 5) HA Timer Action Start

      2015/11/28-21:49:47,474 DEBUG [] [c.t.t.j.h.t.JcmTimerMBean] (EJB default - 5) HA Timer Action Done

      2015/11/28-21:49:47,669 DEBUG [] [c.t.t.j.h.t.JcmTimerMBean] (EJB default - 7) Timer's received 79 processed = 79 max = 104  (This is the last log in the asynchronous action).

       

      2015/11/28-21:50:47,471 WARN  [] [o.j.a.ejb3] (EJB default - 6) JBAS014143: A previous execution of timer [sdp-jcm-ear.sdp-jcm-ha-timer.JcmTimerMBean 6d7c2c6b-60b1-4de0-a47e-dfb4c9f30496] is still in progress, skipping this overlapping scheduled execution at: Sat Nov 28 21:50:47 GMT+00:00 2015

       

      I have subsequently rewritten this code to no longer use an interval timer, it instead creates a new single action timer each time the timer hander is invoked.  I still would ,like to understand what might be happening here and if I am likely to see the same behavior with the new single action timer mechanism below.

      @Timeout

        @TransactionAttribute(TransactionAttributeType.NEVER)

        public void timeoutHandler(Timer timer) {

        long expiration = defaultExpiration;

        if ((propertiesMap != null) && (propertiesMap.getInfo(PropertiesInfo.SYSTEM_PROPERTIES) != null)) {

        expiration = propertiesMap.getInfo(PropertiesInfo.SYSTEM_PROPERTIES).getHaTimerInterval();

        }

        try {

        timerAction.jcmTimerAction();

        } catch(Exception e) {

        // Eat any exception and restart timer

        LOGGER.error("JCM timer action failure", e);

        }

        timerService.createSingleActionTimer(expiration, timerConfig);

        }