JNDI Bindings
These elements are used to create a link to the global JNDI Resources defined in $TOMCAT_HOME/conf/server.xml
.
Furthermore, declare the dependency on the JNDI binding inside the WEB-INF/web.xml
deployment descriptor.
<web-app>
<description>Process Engine Service</description>
<res-ref-name>ProcessEngineService</res-ref-name>
<res-type>org.camunda.bpm.ProcessEngineService</res-type>
</resource-ref>
<resource-ref>
<description>Process Application Service</description>
<res-ref-name>ProcessApplicationService</res-ref-name>
<res-auth>Container</res-auth>
</resource-ref>
</web-app>
Note: You can choose different resource link names for the Process Engine Service and Process Application Service. The resource link name has to match the value inside the <res-ref-name>
-element inside the corresponding <resource-ref>
-element in WEB-INF/web.xml
. We propose the name ProcessEngineService
for the Process Engine Service and ProcessApplicationService
for the Process Application Service.
- Process Engine Service: java:comp/env/ProcessEngineService
- Process Application Service: java:comp/env/ProcessApplicationService
If you have declared other resource link names than we proposed, you have to usejava:comp/env/$YOUR_RESOURCE_LINK_NAME
to do a lookup to get the corresponding BPM Platform Service.
Job Executor Configuration
The BPM platform on Apache Tomcat 7.x uses the default job executor. The default job executor uses a ThreadPoolExecutor which manages a threadpool and a job queue.
The core pool size, queue size, maximum pool size and keep-alive-time can be configured in the .After configuring job acquisition, it is possible to set the values with the help of a <properties>
tag. The correct syntax can be found in the .
All the previously mentioned properties except the queue size can be modified at runtime via the use of a JMX client.
- The default core pool size is 3.
The ThreadPoolExecutor includes a job queue for buffering jobs. Once the core number of threads hasbeen reached (and are in use), a new job presented to the job executor will result in the job beingadded to the ThreadPoolExecutor job queue.
- The default maximum length of the job queue is 3.
If the length of the queue were to exceed the maximum queue size, and the number of threads in thethread pool is less than the maximum pool size, then an additional thread is added to the threadpool. This will continue until the number of threads in the pool is equal to the maximum pool size:
If a thread remains idle in the thread pool for longer than the keepalive time, and the number ofthreads exceeds core pool size, then the thread will be terminated. Hence the pool tends to settlearound core thread count.
- The default keepalive time is 0.