The single action timer data set the expiration as start time of the simple
trigger, so that nextFireTime of simple trigger is still null after the
initialization process.
org.apache.openejb.core.timer.SingleActionTimerData.initializeTrigger()
@Override
public Trigger initializeTrigger() {
final SimpleTrigger simpleTrigger = new SimpleTrigger();
simpleTrigger.*setStartTime*(expiration);
return simpleTrigger;
}
As a result, following method will always throw NoMoreTimeoutsException
exceptions for single action timer.
org.apache.openejb.core.timer.TimerData.getNextTimeout() {
...
Date nextTimeout = trigger.getNextFireTime();
if (nextTimeout == null) {
throw new NoMoreTimeoutsException("The timer has no future
timeouts");
...
}
To correct this,
simpleTrigger.*setStartTime*(expiration);
should be updated to
simpleTrigger.*setNextFireTime*(expiration);
comments ? I'll open a jira and attach a patch for it.
--
Shawn