0 Replies Latest reply on Jun 6, 2006 7:40 PM by Maksym Gryevtsov

    Scheduler bug

    Maksym Gryevtsov Newbie

      When timer's action tries to end the token it linked to, the scheduler is crashed with Hibernate ObjectNotFound exception due to the token ending removes all timers.

      I rewrite SchedulerSession to avoid it(not perfect but workable):

       public void saveTimer(Timer timer) {
       try {
       // if (session.get(timer.getClass(), timer.getId()) != null)
       session.save(timer);
       } catch (ObjectNotFoundException e) {
       log.debug("timer can't be saved; ignore it");
       } catch (Exception e) {
       log.error(e);
       // jbpmSession.handleException();
       throw new JbpmException("couldn't save timer '" + timer
       + "' to the database", e);
       }
       }
      
       public Iterator findTimersByDueDate() {
       List buffer = new ArrayList();
       CollectionUtils.addAll(buffer, super.findTimersByDueDate());
       return buffer.iterator();
       }
      
      


      Should I post it as bug in JIRA?

      Maksym