@Schedule annotation in Java EE -
i use following annotation call stateless session bean once 5 minutes:
@schedule(second = "0", minute = "0/5", hour = "*")
i works expected, except stops after few days. guess there may default lifetime , not know how override it.
please me configure scheduler run indefinitely.
to know if there expiration date object can use gettimers() return object of timer use method gettimeremaining()
know if there expiration date it.
anyway, can use annotation @timeout
in case of timeout happens :
@timeout public void timeout(timer timer) { system.out.println("do ... "); }
you can print date here know when timeout happens..
another thing using "automatic timers" , it's configured @ ejb-jar.xml try take @ ejb-jar.xml see if there expiration date there ..
Comments
Post a Comment