3 Replies Latest reply on Jun 14, 2011 7:15 AM by jaikiran

    EJBTimer service persistence

    infodavid

      Hi all,

       

      I would like to use two different types of EJBTimer services in the same application. One persisted into a database using the right policy and a second way, without persistence.

       

      Actually, all the timers are persisted but for some of them, it's not a strong constraint (they are initialized on application deployment).

       

      I use JBoss 5.1.0.GA

       

      Thanks for help,

      david

        • 1. Re: EJBTimer service persistence
          wdfink

          For EJB timer you have only one configuration.

          So if you start a timer with the application initialization you might want to have a invocation if the application is down at this time.

          • 2. Re: EJBTimer service persistence
            infodavid

            Hi,

             

            Some timers are removed on startup before the initialization. That's why there is not need to persist them.

            Not possible to have more than one service for EJBTimers ? One with a persistent strategy and a second with in memory persistence ?

            • 3. Re: EJBTimer service persistence
              jaikiran

              The spec mandates that the timers created by the EJB timerservice be persistent by default. However, it also allows to create non-persistent timers. So you just have to use the right API on javax.ejb.TimerService to create the right type of timer, to disable persistence. There's currently no way to do that globally at the server level.