2 Replies Latest reply on Dec 20, 2007 9:57 AM by monk2005

    EJB timers in a @Service EJB

    icruz

      Hello,

      (moved from JBoss/EJB forum)

      I have a problem with JBoss 4.2.1GA. I have a @Service EJB, in start() method I create a EJB timer, and it works.

      The first problem is when I shutdown jboss, in the stop() method of the Service EJB I call the method timer.cancel(), and it throws an exception with the message "timer was canceled", but the timer remains in the MySQL (if I call stop() from the JMX console, it is cancelled correctly)

      The second problem is when I restart jboss after that. In the start() method of my service EJB, the function timerService.getTimers() returns an empty collection (even the timer *is* in the database), and when I try to create the timer it fails with a "duplicate key" exception from MySQL driver

      Thanks in advance,
      Isaac