In SchedulerThread.java, All the timers are read executed and saved in sequence. But if a timer are deleted before being executed and saved then when the SchedulerThread try to save the timer, a StaleStateException will be thrown.
I found this problem when I trying to signal the token during the executing of the token's timer. Is there an elegant way to signal the token while not to throw an exception?
Try to use pessimistic locking. But this is probably database dependent...