Example

The following example shows a job executor XML snippet:

Syntax Reference

Attributes: None.

Text Content: None.

|<job-acquisition>|<job-executor>|true| Specifies a job acquisition thread.
Attributes:

  • name: Defines the name of the job acquisition thread.

Text Content: None.

|<job-executor-class>|<job-acquisition>|false| Specifies the fully qualified classname of the job executor.
Attributes: None.

Text Content: None.

Example: <job-executor-class>org.camunda.bpm.example.MyJobExecutor</job-executor-class>

Text Content: None.

|<property>|<properties>|false| Set value for job acquisition configuration property.
Attributes:

Text Content: The value of the property to be set.

Job-Executor Configuration Properties

The following is a list with the available job acquisition thread configuration properties, along with some explanations. The properties can be used in the tag, where foo is the name of the property and bar is the value of the property.

These properties only take effect in a Tomcat environment.

Default Value: 3

|corePoolSize|Integer| Sets the size of the core pool in the thread pool. This number of threads will always be present and wait to execute tasks.
Default Value: 3

|maxPoolSize|Integer| Sets the maximum number of threads that can be present in the thread pool.
Default Value: 10

Job-Acquisition Configuration Properties

The following is a list with the available job acquisition thread configuration properties, along with some explanations. The properties can be used in the <property name="foo">bar</property> tag, where foo is the name of the property and bar is the value of the property.

Default Value: 3

|lockTimeInMillis|Integer| Specifies the time in milliseconds an acquired job is locked for execution. During that time, no other job executor can acquire the job.
Default Value: 300000

||Integer| Specifies the wait time of the job acquisition thread in milliseconds in case there are less jobs available for execution than requested during acquisition. If this is repeatedly the case, the wait time is increased exponentially by the factor waitIncreaseFactor. The wait time is capped by maxWait.
Default Value: 5000

|maxWait|Long| Specifies the maximum wait time of the job acquisition thread in milliseconds in case there are less jobs available for execution than requested during acquisition.
Default Value: 60000

|backoffTimeInMillis|Integer| Specifies the wait time of the job acquisition thread in milliseconds in case jobs were acquired but could not be locked. This condition indicates that there are other job acquisition threads acquiring jobs in parallel. If this is repeatedly the case, the backoff time is increased exponentially by the factor waitIncreaseFactor. The time is capped by maxBackoff. With every increase in backoff time, the number of jobs acquired increases by waitIncreaseFactor as well.
Default Value: 0

|maxBackoff|Long| Specifies the maximum wait time of the job acquisition thread in milliseconds in case jobs were acquired but could not be locked.
Default Value: 0

|backoffDecreaseThreshold|Integer| Specifies the number of successful job acquisition cycles without a job locking failure before the backoff time is decreased again. In that case, the backoff time is reduced by waitIncreaseFactor.
Default Value: 100