1 Reply Latest reply: Sep 18, 2007 12:15 PM by Dimitris Andreadis RSS

    Potential Spec violation in TimerService

    Matt Kleiderman Newbie

      Here's the body of org.jboss.ejb.txtimer.TimerServiceImpl's createTimer method:

       if (initialExpiration == null)
       throw new IllegalArgumentException("initial expiration is null");
       if (intervalDuration < 0)
       throw new IllegalArgumentException("interval duration is negative");
       String timerId = timerIdGenerator.nextTimerId();
       TimerImpl timer = new TimerImpl(this, timerId, timedObjectId, timedObjectInvoker, info);
       persistencePolicy.insertTimer(timerId, timedObjectId, initialExpiration, intervalDuration, info);
       timer.startTimer(initialExpiration, intervalDuration);
       return timer;
       catch (Exception e)
       log.error("Cannot create txtimer", e);
       return null;

      The Sun API documentation for this method says to throw javax.ejb.EJBException if the method fails due to a system-level failure, not return null.

      Should I file this in Jira?

      - Matt Kleiderman