use of org.jboss.as.ejb3.timerservice.spi.TimedObjectInvoker in project wildfly by wildfly.
the class CalendarTimerTask method invokeBeanMethod.
@Override
protected void invokeBeanMethod(TimerImpl timer) throws Exception {
// finally invoke the timeout method through the invoker
if (timer.isAutoTimer()) {
CalendarTimer calendarTimer = (CalendarTimer) timer;
TimedObjectInvoker invoker = this.timerService.getInvoker();
// call the timeout method
invoker.callTimeout(calendarTimer, calendarTimer.getTimeoutMethod());
} else {
this.timerService.getInvoker().callTimeout(timer);
}
}
use of org.jboss.as.ejb3.timerservice.spi.TimedObjectInvoker in project wildfly by wildfly.
the class TimerServiceImpl method start.
@Override
public synchronized void start(final StartContext context) throws StartException {
if (EJB3_TIMER_LOGGER.isDebugEnabled()) {
EJB3_TIMER_LOGGER.debug("Starting timerservice for timedObjectId: " + getInvoker().getTimedObjectId());
}
final EJBComponent component = ejbComponentInjectedValue.getValue();
this.tsr = component.getTransactionSynchronizationRegistry();
final TimedObjectInvoker invoker = timedObjectInvoker.getValue();
if (invoker == null) {
throw EJB3_TIMER_LOGGER.invokerIsNull();
}
started = true;
timerPersistence.getValue().timerDeployed(timedObjectInvoker.getValue().getTimedObjectId());
// register ourselves to the TimerServiceRegistry (if any)
if (timerServiceRegistry != null) {
timerServiceRegistry.registerTimerService(this);
}
listenerHandle = timerPersistence.getValue().registerChangeListener(getInvoker().getTimedObjectId(), new TimerRefreshListener());
}
Aggregations