Example usage for javax.ejb TimerService createTimer

List of usage examples for javax.ejb TimerService createTimer

Introduction

In this page you can find the example usage for javax.ejb TimerService createTimer.

Prototype

public Timer createTimer(Date expiration, Serializable info)
        throws java.lang.IllegalArgumentException, java.lang.IllegalStateException, javax.ejb.EJBException;

Source Link

Document

Create a single-action timer that expires at a given point in time.

Usage

From source file:org.jbpm.scheduler.ejbtimer.TimerServiceBean.java

public void createTimer(Timer timer) {
    TimerService timerService = sessionContext.getTimerService();
    log.debug("creating timer " + timer + " in the ejb timer service");
    timerService.createTimer(timer.getDueDate(), new TimerInfo(timer));
}