public class EjbTimerServiceImpl extends java.lang.Object implements EjbTimerService, java.io.Serializable
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
EJB_TIMER_RETRY_ATTEMPTS |
static java.lang.String |
OPENEJB_QUARTZ_USE_TCCL |
static java.lang.String |
OPENEJB_TIMEOUT_JOB_GROUP_NAME |
static java.lang.String |
OPENEJB_TIMEOUT_JOB_NAME |
static java.lang.String |
QUARTZ_JMX |
static java.lang.String |
QUARTZ_MAKE_SCHEDULER_THREAD_DAEMON |
Constructor and Description |
---|
EjbTimerServiceImpl(BeanContext deployment,
TimerStore timerStore) |
EjbTimerServiceImpl(BeanContext deployment,
TransactionManager transactionManager,
TimerStore timerStore,
int retryAttempts) |
Modifier and Type | Method and Description |
---|---|
void |
addTimerData(TimerData timerData)
Returns a timerData to the TimerStore, if a cancel() is rolled back.
|
void |
cancelled(TimerData timerData)
Call back from TimerData and ejbTimeout when a timer has been cancelled (or is complete) and should be removed from stores.
|
Timer |
createTimer(java.lang.Object primaryKey,
java.lang.reflect.Method timeoutMethod,
java.util.Date initialExpiration,
long intervalDuration,
TimerConfig timerConfig) |
Timer |
createTimer(java.lang.Object primaryKey,
java.lang.reflect.Method timeoutMethod,
java.util.Date expiration,
TimerConfig timerConfig) |
Timer |
createTimer(java.lang.Object primaryKey,
java.lang.reflect.Method timeoutMethod,
long initialDuration,
long intervalDuration,
TimerConfig timerConfig) |
Timer |
createTimer(java.lang.Object primaryKey,
java.lang.reflect.Method timeoutMethod,
long duration,
TimerConfig timerConfig) |
Timer |
createTimer(java.lang.Object primaryKey,
java.lang.reflect.Method timeoutMethod,
ScheduleExpression scheduleExpression,
TimerConfig timerConfig) |
void |
ejbTimeout(TimerData timerData)
This method calls the ejbTimeout method and starts a transaction if the timeout is transacted.
|
static Scheduler |
getDefaultScheduler(BeanContext deployment) |
static TransactionManager |
getDefaultTransactionManager() |
Scheduler |
getScheduler() |
Timer |
getTimer(long timerId) |
java.util.Collection<Timer> |
getTimers(java.lang.Object primaryKey) |
TimerStore |
getTimerStore() |
TransactionManager |
getTransactionManager() |
boolean |
isStarted() |
void |
schedule(TimerData timerData)
Called from TimerData and start when a timer should be scheduled with the java.util.Timer.
|
static void |
shutdown() |
void |
start() |
void |
stop() |
public static final java.lang.String QUARTZ_JMX
public static final java.lang.String QUARTZ_MAKE_SCHEDULER_THREAD_DAEMON
public static final java.lang.String OPENEJB_TIMEOUT_JOB_NAME
public static final java.lang.String OPENEJB_TIMEOUT_JOB_GROUP_NAME
public static final java.lang.String EJB_TIMER_RETRY_ATTEMPTS
public static final java.lang.String OPENEJB_QUARTZ_USE_TCCL
public EjbTimerServiceImpl(BeanContext deployment, TimerStore timerStore)
public EjbTimerServiceImpl(BeanContext deployment, TransactionManager transactionManager, TimerStore timerStore, int retryAttempts)
public static TransactionManager getDefaultTransactionManager()
public static Scheduler getDefaultScheduler(BeanContext deployment)
public void stop()
stop
in interface EjbTimerService
public static void shutdown()
public void start() throws TimerStoreException
start
in interface EjbTimerService
TimerStoreException
public TransactionManager getTransactionManager()
public void schedule(TimerData timerData) throws TimerStoreException
timerData
- the timer to scheduleTimerStoreException
public void cancelled(TimerData timerData)
timerData
- the timer that was cancelledpublic void addTimerData(TimerData timerData)
timerData
- the timer to be returned to the timer storepublic Timer getTimer(long timerId)
getTimer
in interface EjbTimerService
public java.util.Collection<Timer> getTimers(java.lang.Object primaryKey) throws java.lang.IllegalStateException
getTimers
in interface EjbTimerService
java.lang.IllegalStateException
public Timer createTimer(java.lang.Object primaryKey, java.lang.reflect.Method timeoutMethod, long duration, TimerConfig timerConfig) throws java.lang.IllegalArgumentException, java.lang.IllegalStateException, EJBException
createTimer
in interface EjbTimerService
java.lang.IllegalArgumentException
java.lang.IllegalStateException
EJBException
public Timer createTimer(java.lang.Object primaryKey, java.lang.reflect.Method timeoutMethod, long initialDuration, long intervalDuration, TimerConfig timerConfig) throws java.lang.IllegalArgumentException, java.lang.IllegalStateException, EJBException
createTimer
in interface EjbTimerService
java.lang.IllegalArgumentException
java.lang.IllegalStateException
EJBException
public Timer createTimer(java.lang.Object primaryKey, java.lang.reflect.Method timeoutMethod, java.util.Date expiration, TimerConfig timerConfig) throws java.lang.IllegalArgumentException, java.lang.IllegalStateException, EJBException
createTimer
in interface EjbTimerService
java.lang.IllegalArgumentException
java.lang.IllegalStateException
EJBException
public Timer createTimer(java.lang.Object primaryKey, java.lang.reflect.Method timeoutMethod, java.util.Date initialExpiration, long intervalDuration, TimerConfig timerConfig) throws java.lang.IllegalArgumentException, java.lang.IllegalStateException, EJBException
createTimer
in interface EjbTimerService
java.lang.IllegalArgumentException
java.lang.IllegalStateException
EJBException
public Timer createTimer(java.lang.Object primaryKey, java.lang.reflect.Method timeoutMethod, ScheduleExpression scheduleExpression, TimerConfig timerConfig)
createTimer
in interface EjbTimerService
public TimerStore getTimerStore()
getTimerStore
in interface EjbTimerService
public boolean isStarted()
isStarted
in interface EjbTimerService
public Scheduler getScheduler()
public void ejbTimeout(TimerData timerData)
timerData
- the timer to call.