Package org.jbpm.runtime.manager.impl.tx
Class TransactionAwareSchedulerServiceInterceptor
- java.lang.Object
-
- org.jbpm.process.core.timer.impl.DelegateSchedulerServiceInterceptor
-
- org.jbpm.runtime.manager.impl.tx.TransactionAwareSchedulerServiceInterceptor
-
- All Implemented Interfaces:
SchedulerServiceInterceptor
public class TransactionAwareSchedulerServiceInterceptor extends DelegateSchedulerServiceInterceptor
Transaction aware scheduler service interceptor that will delay actual scheduling of the timer job instance to the afterCompletion phase of JTA transaction. Scheduling will only take place when transaction was successfully committed. That will make the timers transactional to avoid any issues with having timer registered even though transaction was rolled back.
NOTE:This interceptor should not be used forGlobalSchedulerService
that are by nature transactional e.g. Quartz with Data Base job store.
-
-
Field Summary
-
Fields inherited from class org.jbpm.process.core.timer.impl.DelegateSchedulerServiceInterceptor
delegate
-
-
Constructor Summary
Constructors Constructor Description TransactionAwareSchedulerServiceInterceptor(org.kie.api.runtime.manager.RuntimeEnvironment environment, org.kie.api.runtime.manager.RuntimeManager manager, GlobalSchedulerService schedulerService)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected org.kie.api.runtime.Environment
getEnvironment(org.drools.core.time.JobContext jobContext)
protected Long
getProcessInstancId(org.drools.core.time.JobContext jobContext)
protected org.drools.persistence.api.TransactionManager
getTransactionManager(org.drools.core.time.JobContext jobContext)
protected boolean
hasEnvironmentEntry(String name, Object value)
void
internalSchedule(org.drools.core.time.impl.TimerJobInstance timerJobInstance)
-
-
-
Constructor Detail
-
TransactionAwareSchedulerServiceInterceptor
public TransactionAwareSchedulerServiceInterceptor(org.kie.api.runtime.manager.RuntimeEnvironment environment, org.kie.api.runtime.manager.RuntimeManager manager, GlobalSchedulerService schedulerService)
-
-
Method Detail
-
internalSchedule
public final void internalSchedule(org.drools.core.time.impl.TimerJobInstance timerJobInstance)
- Specified by:
internalSchedule
in interfaceSchedulerServiceInterceptor
- Overrides:
internalSchedule
in classDelegateSchedulerServiceInterceptor
-
getTransactionManager
protected org.drools.persistence.api.TransactionManager getTransactionManager(org.drools.core.time.JobContext jobContext)
-
getEnvironment
protected org.kie.api.runtime.Environment getEnvironment(org.drools.core.time.JobContext jobContext)
-
getProcessInstancId
protected Long getProcessInstancId(org.drools.core.time.JobContext jobContext)
-
-