LocalTimerService localTimerService;
public EntitySchedulerService() {
JbpmContext jbpmContext = JbpmContext.getCurrentJbpmContext();
if (jbpmContext==null) {
throw new JbpmException("instantiation of the EjbSchedulerService requires a current JbpmContext");
}
this.jobSession = jbpmContext.getJobSession();
try {
Context initial = new InitialContext();
LocalTimerServiceHome localTimerServiceHome = (LocalTimerServiceHome) initial.lookup("java:comp/env/ejb/LocalTimerServiceBean");
localTimerService = localTimerServiceHome.create();
} catch (Exception e) {
JbpmException jbpmException = new JbpmException("ejb local timer lookup problem", e);
log.error(e);
throw jbpmException;
}
}