cancel
Showing results for 
Search instead for 
Did you mean: 

JobExecutorActivate configuration question

badrisudheer
Champ in-the-making
Champ in-the-making
In a clustered environment when there are 2 activiti engines configured with JobExecutorActivate to true (for load balancing purpose), I observed instances where JobExecutor thread from 2 nodes (engines) are trying to acquire Jobs at the same time and one thread ends up throwing following exception

SEVERE: Error while closing command context
org.activiti.engine.ActivitiOptimisticLockingException: TimerEntity[e3ca0cba-b1c1-11e2-9038-005056b90423] was updated by another transaction concurrently

So, Is there a way to configure JobExecutor to run on specific intervals like specifying a Cron Expression for Quartz ?
1 REPLY 1

jbarrez
Star Contributor
Star Contributor
Those exception are to be expected when running in a clustered job executor environment. Both executors 'fight' for jobs and one of them has to lose.

In a more recent version of Activiti, we've moved down the level of that log and made the logging more clear that this is an expected thing in a clustered environment.