java-tutorials/jee-7/src/main/java/com/baeldung/timer/FixedDelayTimerBean.java
Doha2012 2e5531edd0 group and cleanup (#3027)
* move security content from spring-security-rest-full

* swagger update

* move query language to new module

* rename spring-security-rest-full to spring-rest-full

* group persistence modules

* group testing modules

* try fix conflict

* cleanup

* group and cleanup
2017-11-13 16:45:26 +01:00

20 lines
396 B
Java

package com.baeldung.timer;
import javax.ejb.*;
/**
* Created by ccristianchiovari on 5/2/16.
*/
@Singleton
public class FixedDelayTimerBean {
@EJB
private WorkerBean workerBean;
@Lock(LockType.READ)
@Schedule(second = "*/5", minute = "*", hour = "*", persistent = false)
public void atSchedule() throws InterruptedException {
workerBean.doTimerWork();
}
}