Skip to main content

Timer entries are deleted on server Shutdown

Please note these forums are being decommissioned and use the new and improved forums at
2 replies [Last post]
Joined: 2014-02-03


I am trying to work the Timer-Service but somehow I am not successful. I hope to find some help in here.

I am running a Glassfish 4 and configured the resource "jdbc/__TimerPool" to persist into my MySQL database.
All Timers are persisted into my database, but as soon as I shutdown the Glassfish all Timers are deleted from the table.

Does anyone know how to make the timer stay persistet even after server restart?

Thank you very much,

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Joined: 2013-10-23

Hi Arres,

EJB Timer service can be setup into 2 type one persist into database or not.
If you no required to save the scheduler into persistence then set this into false.
Commonly you just need to set the persistence into false.

Persistence is set into true if you are using cluster on multiple instance and server.
So each instance can synchronize the scheduler and avoid duplicate running the same scheduler.

I think you can set this persistence into false.
This is how the persistence can be setup in ejb-jar.xml


Hope this will help you.


Joined: 2014-02-03

Hi Ferry,
thank you for you answer. But I already know how to make the TimerService persist into a database.
My problem is, that as soon I make a redeployment all entries are deleted from the database.
Do you know what I have to do, to make the entries stay available even after a redeployment? I guess it is has something to do with the applicationid.

Thank you,