cancel
Showing results for 
Search instead for 
Did you mean: 

Is it possible to configure JobExecutor?

blezek
Champ on-the-rise
Champ on-the-rise
Before I go off and implement some crazy thing, is it possible to configure the JobExecutor?  Looking through the JavaDocs it appears that you can only turn it on and off, but not change things like ThreadPool size, etc.

In particular, we would like to increase the max number of threads from 10 in anticipation of a heavy load on Activiti.

I have tried the hint outlined here, and it seems to work:

((ProcessEngineImpl) engine).getProcessEngineConfiguration().getJobExecutor().setMaxPoolSize(threads);
((ProcessEngineImpl) engine).getProcessEngineConfiguration().getJobExecutor().setQueueSize(queueSize);
((ProcessEngineImpl) engine).getProcessEngineConfiguration().getJobExecutor().start();

but I would prefer to do this more cleanly.

Thanks,
-dan
3 REPLIES 3

ronald_van_kuij
Champ on-the-rise
Champ on-the-rise
these can be set in the config file as wel… If the entries are not already there, just figure out the correct bean names and properties.

blezek
Champ on-the-rise
Champ on-the-rise
these can be set in the config file as wel… If the entries are not already there, just figure out the correct bean names and properties.
Ok, looks like this should be possible using Spring, which is good, however, we are embedding Activiti and wanted to have our code configure it.  This all works well, but not every method is available in the ProcessEngineConfiguration interface.

Thanks much!
-dan

ronald_van_kuij
Champ on-the-rise
Champ on-the-rise
If not everything is configurable, describe your usecase, creae a patch and file a jira…