org.jbpm.enterprise
Class Ejb2TimerSession

java.lang.Object
  extended by org.jbpm.env.session.StandardTimerSession
      extended by org.jbpm.enterprise.Ejb2TimerSession
All Implemented Interfaces:
TimerSession

public class Ejb2TimerSession
extends StandardTimerSession

Timer session based on the EJB 2.1 timer service.

Author:
Tom Baeyens, Alejandro Guizar

Constructor Summary
Ejb2TimerSession()
           
 
Method Summary
 void cancel(Timer timer)
          Cancels a timer.
 LocalTimerHome getTimerHome()
           
 void schedule(Timer timer)
          Schedule the execution of a timer.
 
Methods inherited from class org.jbpm.env.session.StandardTimerSession
findTimers, getNextScheduledActivity, getNextScheduledActivityTime, getScheduledActivities, getScheduledActivity, start, validScheduling
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Ejb2TimerSession

public Ejb2TimerSession()
Method Detail

getTimerHome

public LocalTimerHome getTimerHome()

schedule

public void schedule(Timer timer)
Description copied from interface: TimerSession
Schedule the execution of a timer.

Specified by:
schedule in interface TimerSession
Overrides:
schedule in class StandardTimerSession
Parameters:
timer - the timer to be executed.

cancel

public void cancel(Timer timer)
Description copied from interface: TimerSession
Cancels a timer.
If a transaction is in progress, the cancellation will be effective at the end of the transaction. If the timer has been created in the same transaction or if there is no transaction, the cancellation is immediately effective.
If the timer is executing when the cancellation becomes effective, the execution in progress will not be stopped.

Specified by:
cancel in interface TimerSession
Overrides:
cancel in class StandardTimerSession
Parameters:
timer - the timer to be cancelled.