Hi,
Looking a bit more closely the ProcessEngineConfigurationImpl I can see the following code:
<java>
// job executor /////////////////////////////////////////////////////////////
protected void initJobExecutor() {
if (isAsyncExecutorEnabled() == false) {
if (jobExecutor == null) {
jobExecutor = new DefaultJobExecutor();
}
jobExecutor.setClockReader(this.clock);
jobExecutor.setCommandExecutor(commandExecutor);
jobExecutor.setAutoActivate(jobExecutorActivate);
if (jobExecutor.getRejectedJobsHandler() == null) {
if(customRejectedJobsHandler != null) {
jobExecutor.setRejectedJobsHandler(customRejectedJobsHandler);
} else {
jobExecutor.setRejectedJobsHandler(new CallerRunsRejectedJobsHandler());
}
}
}
}
// async executor /////////////////////////////////////////////////////////////
protected void initAsyncExecutor() {
if (isAsyncExecutorEnabled()) {
if (asyncExecutor == null) {
DefaultAsyncJobExecutor defaultAsyncExecutor = new DefaultAsyncJobExecutor();
// Thread pool config
defaultAsyncExecutor.setCorePoolSize(asyncExecutorCorePoolSize);
defaultAsyncExecutor.setMaxPoolSize(asyncExecutorMaxPoolSize);
defaultAsyncExecutor.setKeepAliveTime(asyncExecutorThreadKeepAliveTime);
// Threadpool queue
if (asyncExecutorThreadPoolQueue != null) {
defaultAsyncExecutor.setThreadPoolQueue(asyncExecutorThreadPoolQueue);
}
defaultAsyncExecutor.setQueueSize(asyncExecutorThreadPoolQueueSize);
// Acquisition wait time
defaultAsyncExecutor.setDefaultTimerJobAcquireWaitTimeInMillis(asyncExecutorDefaultTimerJobAcquireWaitTime);
defaultAsyncExecutor.setDefaultAsyncJobAcquireWaitTimeInMillis(asyncExecutorDefaultAsyncJobAcquireWaitTime);
// Queue full wait time
defaultAsyncExecutor.setDefaultQueueSizeFullWaitTimeInMillis(asyncExecutorDefaultQueueSizeFullWaitTime);
// Job locking
defaultAsyncExecutor.setTimerLockTimeInMillis(asyncExecutorTimerLockTimeInMillis);
defaultAsyncExecutor.setAsyncJobLockTimeInMillis(asyncExecutorAsyncJobLockTimeInMillis);
if (asyncExecutorLockOwner != null) {
defaultAsyncExecutor.setLockOwner(asyncExecutorLockOwner);
}
// Retry
defaultAsyncExecutor.setRetryWaitTimeInMillis(asyncExecutorLockRetryWaitTimeInMillis);
// Shutdown
defaultAsyncExecutor.setSecondsToWaitOnShutdown(asyncExecutorSecondsToWaitOnShutdown);
asyncExecutor = defaultAsyncExecutor;
}
asyncExecutor.setCommandExecutor(commandExecutor);
asyncExecutor.setAutoActivate(asyncExecutorActivate);
}
}
<java>
Which at least on my opinion does not take into consideration the jobExecutorActivate property and activate at least one between AsyncJobExecutor and JobExecutor.
Considering the above how can I completely disable job execution? if I extend SpringProcessEngineConfiguration to completely disable job executor will this create problems in other areas of the application?
Thanks,
~Q