Java 类javax.ejb.NoMoreTimeoutsException 实例源码

项目:http-queue    文件:JobManager.java   
@Timeout
public void execute(Timer timer) {
    try {
        if (timer.getTimeRemaining() < 0) {
            logger.info("Skipping missed job timeout with id {}", timer.getInfo());
            return;
        }
    } catch (NoMoreTimeoutsException e) {
    }

    Job job = em.find(Job.class, timer.getInfo());
    if (job == null) {
        logger.info("Job with id {} not found. Cancelling...", timer.getInfo());
        timer.cancel();
    } else if (!job.isActivate()) {
        logger.info("Skipping execution of job {} because it is marked as inactive.", timer.getInfo());
    } else {
        JobExecution execution = executor.createExecution(job);
        executor.execute(execution, job);
    }
}
项目:tomee    文件:TimerImpl.java   
public long getTimeRemaining() throws IllegalStateException, NoSuchObjectLocalException {
    checkState();
    final Date nextTimeout = timerData.getNextTimeout();
    if (nextTimeout == null) {
        throw new NoMoreTimeoutsException("The timer has no future timeouts");
    }
    return timerData.getTimeRemaining();
}
项目:tomee    文件:TimerImpl.java   
public Date getNextTimeout() throws IllegalStateException, NoSuchObjectLocalException {
    checkState();

    final Date nextTimeout = timerData.getNextTimeout();
    if (nextTimeout == null) {
        throw new NoMoreTimeoutsException("The timer has no future timeouts");
    }
    return timerData.getNextTimeout();
}
项目:lightmare    文件:TimerImpl.java   
@Override
public long getTimeRemaining()
        throws IllegalStateException, NoSuchObjectLocalException, NoMoreTimeoutsException, EJBException {
    return ZERO_TIME;
}
项目:lightmare    文件:TimerImpl.java   
@Override
public Date getNextTimeout()
        throws IllegalStateException, NoSuchObjectLocalException, NoMoreTimeoutsException, EJBException {
    return nextTimeout;
}