3 Replies Latest reply on Sep 26, 2006 5:40 AM by galo.navarro

    ejb3 timers persistence

    wejaeger

      Hello,

      i just upgraded from 4.0.4RC1 to 4.0.4.GA-ejb3.

      One of my applications is using a ejb3 SLSB as timer.

      After succesfully starting the timer I shutdown the server. After restarting, the timer entriy is no longer in the database.

      To me it seems as if timer services are no longer persistent across server shutdowns.

      The unchanged application workes fine with version 4.0.4RC1.

      Is it a bug or did I miss something ?

        • 1. Re: ejb3 timers persistence
          jagthedrummer

           

          "werner.jaeger" wrote:

          After succesfully starting the timer I shutdown the server. After restarting, the timer entriy is no longer in the database.


          I'm trying to do the same thing. I can see the entry in the db when the timer is created, but when I shut down JBoss and look in the db again, the entry for the timer is gone. It looks like the table is getting wiped out when the server shuts down.

          Is there a way to change this behavior? So far I like everything about the Timer implementation except this, and it's a pretty big show stopper. It's hard to depend on a timer service that can't even survive a server shut down.

          Jeremy


          • 2. Re: ejb3 timers persistence
            galo.navarro

            I posted the same question a few days ago, it seems persistence is to be supported in the next major release.

            I'm getting around the problem with a scheduler service. This goes to the jboss-service.xml file

             <mbean code="org.jboss.varia.scheduler.Scheduler" name="jboss:custom=Scheduler">
             <attribute name="StartAtStartup">true</attribute>
             <attribute name="SchedulableMBean">jboss:custom=MyBean</attribute>
             <attribute name="SchedulableMBeanMethod">process()</attribute>
             <attribute name="InitialStartDate">NOW</attribute>
             <attribute name="SchedulePeriod">60000</attribute>
             <attribute name="InitialRepetitions">-1</attribute>
             </mbean>
            


            and process() is run every minute on MyBean

            I believe this can be configured to run methods on a simple POJO etc. but haven't tried. Let me know if you need more details and I will post a couple of links.

            • 3. Re: ejb3 timers persistence
              galo.navarro

              Durability rather than persistence. Anyway, this was my post http://www.jboss.com/index.html?module=bb&op=viewtopic&t=89747