5 Replies Latest reply on Apr 12, 2013 3:04 AM by tomasg1

    Where are timers persisted in the filesystem?

    thebravedave

      Hello, I posted before a question asking how to turn off ejb-timer persistance in the file system.

      https://community.jboss.org/message/742881#742881

      Nobody answered.

      If I can't do this I would like to manually delete the files that hold the timer persistance in the filesystem everytime I restart or start Jboss 7.

      I'm using Jboss 7.1.1.Final.

       

      Does anyone know where the files ejb-timers are persisted to in the filesystem so I can manually delete them since no one knows how to configure the timers to not persist in the filesystem?

       

      Please help me.

       

      David

        • 1. Re: Where are timers persisted in the filesystem?
          kazaag

          If you want to restart jboss in fresh mode you can delete the data and tmp folder (in standalone folder in standalone mode, I don't know where it is where several node is run on the same machine in domain mode).

           

          But is you are using timer you can specify at the creation of the timer that it does't have to be persisted via a TimerConfig http://docs.oracle.com/javaee/6/api/javax/ejb/TimerConfig.html.

           

          As it is requested by the standard to persist between JVM restart the timer by default it is logical there is no way to disable timer persistance without becoming non compliant on the point of view of the application.

          • 2. Re: Where are timers persisted in the filesystem?
            wdfink

            Data are stored in the filesystem:

            domain/servers/<servername>/data/timer-service-data/

            standalone/data/timer-service-data.

             

            The timer persistence is a directory or you might remove the element "data-store" from the ejb3 subsystem.

            If you only want to have some timer not-persistent you can annotate that.

             

            BTW it is better to write a new comment to the 'old' thread to be shown at the top

            • 3. Re: Where are timers persisted in the filesystem?
              tomasg1

              It is a very important feature to be able to turn off persitence imho.

              In JBoss 5 the server would eventually run out of memory, because the built in hypersonic database would fill up if running timers often.

               

              Can this also happen in JBoss 7? Or is file persistence not using memory?

               

              Annotating the services is something I will look into, since I did not know about that.

              • 4. Re: Where are timers persisted in the filesystem?
                jaikiran

                Tomas Gustavsson wrote:

                 

                It is a very important feature to be able to turn off persitence imho.

                Applications have the ability to turn off persistence in a EJB spec specified portable way. Francois pointed you to one way of doing it.

                 

                 

                Tomas Gustavsson wrote:

                 

                 

                In JBoss 5 the server would eventually run out of memory, because the built in hypersonic database would fill up if running timers often.

                AS7 doesn't use a in memory database for timers. Instead it uses a file persistence store. In fact, none of the services shipped in AS7 require any database for functioning, by default.

                 

                 

                Tomas Gustavsson wrote:

                 

                Can this also happen in JBoss 7? Or is file persistence not using memory?

                 

                File persistence persists to files.

                • 5. Re: Where are timers persisted in the filesystem?
                  tomasg1

                  That sounds very good.

                   

                  The TimerConfig is unfortunately a EJB3.1 feature. We're still required to be backwards compatible with EJB3.0 so...

                  I have created a Jira for our application (EJBCA) though, to introduce this when we move fullyto EJB 3.1.