As we transition to the new Hyland Community, some post links may be temporarily disrupted as we finalize redirects. We apologize for the inconvenience and are working to resolve this as quickly as possible. Details.
<bean id="jobExecutor" class="org.activiti.engine.impl.jobexecutor.JobExecutor"> <property name="lockTimeInMillis" value="2700000"/> <property name="corePoolSize" value="15"/> <property name="maxPoolSize" value="30"/> </bean>
<br>/**<br> * <p>Strategy for handling jobs that were acquired but cannot be <br> * executed at this point (queue-size exceeded).</p> <br> * <br> * @author Daniel Meyer<br> */<br>public interface RejectedJobsHandler {<br><br> public void jobsRejected(JobExecutor jobExecutor, List<String> jobIds); <br> <br>}<br>
By default (CallerRunsRejectedJobsHandler), the calling thread is used to run the job that should have been run by the pool. In most cases, this is the job-aquisition-thread.
public class MyRejectedJobsHandler implements RejectedJobsHandler {<br> public void jobsRejected(JobExecutor jobExecutor, List<String> jobIds) {<br> jobExecutor.executeJobs(jobIds);<br> }<br>}