Mantis - Resin
Viewing Issue Advanced Details
5892 major always 05-04-15 01:28 07-18-17 14:51
bbik  
ferg  
normal  
closed 4.0.44  
won't fix  
none    
none  
0005892: Persistent TimerService timeers are lost after resin restart
persistent timerservice timers are lost after server restart:
@Singleton
@LocalBean
@Startup
public class TimerTest
{
    @Resource
    TimerService ts;
    static TimerTest inst=null;
    @PostConstruct
    void init()
    { inst=this;
    }
...
It creates several timers:
        TimerConfig tc=new TimerConfig(Integer.toString(id), true);
        ScheduleExpression sch=new ScheduleExpression();
        sch.hour(hour);
        sch.minute(min);
        sch.second(sec);
        t=ts.createCalendarTimer(sch, tc);
    }

    @Timeout
    public void doJob(Timer t)

But after resin stop/start all created timers are lost. JBoss is working fine )

Notes
(0006771)
ferg   
07-18-17 14:51   
Persistent timers is not a supported feature in Resin.