i have found the problem. it was related with persistence of the timers. when a 
timer is created, it is stored (using DefaultDS) and reloaded at each jboss 
start. my solution is to cancel all the bean related timers befoare i create a 
new one:


  |     public void createTimer() {
  |             // Get TimerService
  |             TimerService ts = sessionContext.getTimerService();
  |             
  |             // Cancel previous timers
  |             for (Object o : ts.getTimers()) {
  |                     ((Timer)o).cancel();
  |             }
  |             
  |             // Create new timer
  |             Timer t = ts.createTimer(new Date(System.currentTimeMillis()
  |                             + INTERVAL_DURATION), INTERVAL_DURATION, "ots");
  |             logger.debug("timer created");
  |             logger.debug("total timers: " + ts.getTimers().size());
  |     }
  | 

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4044654#4044654

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4044654
_______________________________________________
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to