4 Replies Latest reply on Jun 28, 2012 2:56 AM by stewar

    EJB Timer Persistence issue in Jboss As 6.1.0 final

    stewar

      Hi,

      1) I want to know whether it is possible to configure Jboss As 6.1.0 final to not persist EJB Timers to database?

      2) The Timer table in the database, which is created by Jboss is growing with time, and the history records not getting deleted.

           Can someone let me know if this is a know issue? and if so what is the condition to know that the records are stale or history so that i clear it by myself.

        • 1. Re: EJB Timer Persistence issue in Jboss As 6.1.0 final
          jaikiran

          Sumeeth Tewar wrote:

           

          Hi,

          1) I want to know whether it is possible to configure Jboss As 6.1.0 final to not persist EJB Timers to database?

          From what I remember, it's not possible.

           

           

          Sumeeth Tewar wrote:

           

          2) The Timer table in the database, which is created by Jboss is growing with time, and the history records not getting deleted.

               Can someone let me know if this is a know issue? and if so what is the condition to know that the records are stale or history so that i clear it by myself.

          The timer table has a status column. I don't exactly remember all possible status values for that column but if you run a query and list the distinct status values that you see, then I can quickly tell you which ones can be cleared.

          • 2. Re: EJB Timer Persistence issue in Jboss As 6.1.0 final
            stewar

            jaikiran pai wrote:

            The timer table has a status column. I don't exactly remember all possible status values for that column but if you run a query and list the distinct status values that you see, then I can quickly tell you which ones can be cleared.

             

             

            The schema of the timer table has columns :

             

              id character varying(255) NOT NULL,

              info bytea,

              initialdate timestamp without time zone,

              nextdate timestamp without time zone,

              previousrun timestamp without time zone,

              repeatinterval bigint NOT NULL,

              timedobjectid character varying(255) NOT NULL,

              timerstate integer,

             

             

             

            and the timerstate values  i see in the database are 1,2,3.  Also i see repeatinterval and nextdate values populated, if the timerstate value is 1 or 2.

            so i assume, i should not clear those(value 1 or 2). but another doubt to me now is, whether eventually the size of table would grow with these repeatable timers? Also is this a known issue with Jboss As 6.1.0 final that it does not clear the timer table on its own?

            • 3. Re: EJB Timer Persistence issue in Jboss As 6.1.0 final
              wdfink

              You are able to remove the persistence of timers by using noop-persistence.

               

              See ejb2-timer-service.xml, remote the DatabasePersistencePolicy and activate the NoopPersistencePolicy.

              If you use that NO timer will survive a server restart.

              • 4. Re: EJB Timer Persistence issue in Jboss As 6.1.0 final
                stewar

                Wolf-Dieter Fink wrote:

                 

                You are able to remove the persistence of timers by using noop-persistence.

                 

                See ejb2-timer-service.xml, remote the DatabasePersistencePolicy and activate the NoopPersistencePolicy.

                If you use that NO timer will survive a server restart.

                 

                 

                I dont think it helps, i have already configured it for the noop-persistence.

                 

                the ejb3 timers are created from the : JBOSS_HOME/common/deploy/jboss-ejb3-timerservice-mk2.jar/

                 

                i know the configuration exists inside the persistence file located in the same folder as : /META_INF/persistence.xml