0 Replies Latest reply on Feb 7, 2006 4:13 PM by fisherv

    Duplicate EJB timer ids - (if target ejb timed object is dif

    fisherv

      Hi All,

      I'm using JBoss 4.0.2, with Java 5. Creating EJBTimers and getting the ejbTimeout call at the appropriate time is works fine.

      I've just set myself up to have multiple timers for multiple Stateless Session EJBs - each bean implements TimedObject (i.e., implements ejbTimeout method). A timer is automatically associated to the EJB TimedObject that creates it. I assume this is a function of the TimerService. So, if EJB A creates timer A, when timer A expires, only EJB A will be called.

      When I start up the app and initialize my timers, the timerid's appearing in the TIMERS table start at 1 for each of the two different EJBs that will be receiving the ejbTimeout callbacks. Here's an example of the content of TIMERS table (leaving off the last two columns because they're too big and not relevant):

      TIMERID TARGETID INITIALDATE TIMERINTERVAL
      1 [target=jboss.j2ee:jndiName=cc/OTARefreshController,service=EJB] 2/7/2006 4:00:00.000000 PM 3600000
      1 [target=jboss.j2ee:jndiName=cc/NotificationController,service=EJB] 2/9/2006 4:00:00.000000 AM 1209600000
      2 [target=jboss.j2ee:jndiName=cc/OTARefreshController,service=EJB] 2/8/2006 4:00:00.000000 AM 86400000
      2 [target=jboss.j2ee:jndiName=cc/NotificationController,service=EJB] 2/13/2006 1:00:00.000000 AM 604800000

      Is this safe/ok/intended? I'd prefer TIMERID to be unique. (Because of the bug with cancelTimer not killing the timer, I've been using the TimerId to delete a timer myself until we upgrade JBoss.) Not sure if there is a way for me to control/configure this.

      Dimitris has said that a lot of timer fixes are in 4.0.3 and 4.0.4, and we'll probably move to 4.0.3 soon.

      Thanks,
      Vick Fisher