2 Replies Latest reply on Feb 29, 2012 1:35 PM by Avor Nadal

    TimerService.getTimers () returns an empty collection. Is it a bug?

    Avor Nadal Newbie

      Hello everybody:

       

      I'm still a newbie of Java EE, but something which worked for me in JBoss AS 5 is not working in JBoss AS 7 any longer. On the one hand, I inject the TimerService into a statless session bean this way:

       

         @Resource

         private TimerService timerService;

       

       

      On the other hand, into a method where I want to list which Timers have been registered, I do:

       

      Collection <Timer> timers = timerService.getTimers ();

       

      Even though I've registered one or more Timers succesfully (I know it because I've set a log to check this), this sentence always returns an empty collection. Is this a bug or an expected behaviour?

       

      Thank you.