JBoss 7/6 EAP Job-Executor

111 views
Skip to first unread message

Gregor Tudan

unread,
Mar 3, 2015, 4:24:18 AM3/3/15
to camunda-...@googlegroups.com
Hi,

I've read http://docs.camunda.org/latest/guides/installation-guide/jboss/ but I'm not sure if I fully understand the concepts behind the job-executor and job acquisitions. I would like to run multiple process-engines mainly for the purpose of having separate thread pools for job-exeuction. But it semms one can only have a single job-executor and reference different aquisition strategies per engine? How can I give each engine a fixed number of threads to run with?

Thanks,
Gregor

<subsystem xmlns="urn:org.camunda.bpm.jboss:1.1">
 
<process-engines>
   
<process-engine name="first-engine" default="true">
     
<datasource>java:jboss/datasources/ProcessEngineOne</datasource>
     
<history-level>full</history-level>
     
<properties>
       
<property name="jobExecutorAcquisitionName">???</property>
       
<property name="isAutoSchemaUpdate">true</property>
       
<property name="authorizationEnabled">true</property>
     
</properties>
   
</process-engine>
   
<process-engine name="second-engine" default="false">
     
<datasource>java:jboss/datasources/ProcessEngineTwo</datasource>
     
<history-level>full</history-level>
     
<properties>
       
<property name="jobExecutorAcquisitionName">???</property>
       
<property name="isAutoSchemaUpdate">true</property>
       
<property name="authorizationEnabled">true</property>
     
</properties>
   
</process-engine>
 
</process-engines>
 
<job-executor>
   
<thread-pool-name>job-executor-tp</thread-pool-name>
   
<job-acquisitions>
     
<job-acquisition name="default">
       
<acquisition-strategy>SEQUENTIAL</acquisition-strategy>
       
<properties>
         
<property name="lockTimeInMillis">300000</property>
         
<property name="waitTimeInMillis">5000</property>
         
<property name="maxJobsPerAcquisition">3</property>
       
</properties>
     
</job-acquisition>
   
</job-acquisitions>
 
</job-executor>
</subsystem>



Daniel Meyer

unread,
Mar 3, 2015, 4:57:15 AM3/3/15
to camunda-...@googlegroups.com
Hi Gregor,

it is currently not possible to configure multiple executor pools. You can configure different acquisitions and assign each process engine it's own acquisition but they will share the executor pool.

See also:

Feel free to create a feature request, though.

Regards,
Daniel

Gregor Tudan

unread,
Mar 3, 2015, 5:14:17 AM3/3/15
to camunda-...@googlegroups.com
Hi Daniel,

thanks for looking into this. Are there further references for the different aquisition strategies I can look into?

Thanks,
Gregor

Daniel Meyer

unread,
Mar 3, 2015, 5:30:11 AM3/3/15
to camunda-...@googlegroups.com
Hi Gregor,

the acquisition stategy property is not really supported at the moment, ie. you cannot really set an other value then SEQUENTIAL. Back in the camunda fox days, it was used for allowing users to define different strategies for job acquisiton.
But we never implemented any alternatives to the default strategy which is why it has not been "ported" yet. So at the moment only the org.camunda.bpm.engine.impl.jobexecutor.SequentialJobAcquisitionRunnable is available ot of the box. 

Daniel

Gregor Tudan

unread,
Mar 3, 2015, 8:33:07 AM3/3/15
to camunda-...@googlegroups.com
I created a feature request for this:
https://app.camunda.com/jira/browse/CAM-3568

Gregor Tudan

unread,
Mar 10, 2015, 7:57:25 AM3/10/15
to camunda-...@googlegroups.com
I'm still struggeling with the job aquisition. I configured the platfrom like this:

[domain@localhost:9999 /] /profile=processes/subsystem=camunda-bpm-platform:read-resource(recursive=true)
{
   
"outcome" => "success",
   
"result" => {
       
"job-executor" => {"default" => {
           
"thread-pool-name" => "job-executor-tp",
           
"job-acquisitions" => {
               
"default" => {
                   
"acquisition-strategy" => "SEQUENTIAL",
                   
"name" => "default",
                   
"properties" => {
                       
"lockTimeInMillis" => "300000",
                       
"waitTimeInMillis" => "5000",
                       
"maxJobsPerAcquisition" => "3"
                   
}
               
},
               
"awv" => {
                   
"acquisition-strategy" => "SEQUENTIAL",
                   
"name" => "awv",
                   
"properties" => {
                       
"lockTimeInMillis" => "300000",
                       
"waitTimeInMillis" => "5000",
                       
"maxJobsPerAcquisition" => "3"
                   
}
               
}
           
}
       
}},
       
"process-engines" => {
           
"default" => {
               
"configuration" => "org.camunda.bpm.container.impl.jboss.config.ManagedJtaProcessEngineConfiguration",
               
"datasource" => "java:/datasources/CamundaDS",
               
"default" => true,
               
"history-level" => "audit",
               
"name" => "default",
               
"properties" => {
                   
"jobExecutorAcquisitionName" => "default",
                   
"isAutoSchemaUpdate" => "true",
                   
"authorizationEnabled" => "true",
                   
"mailServerHost" => "mail.example.com",
                   
"mailServerPort" => "25",
                   
"mailServerDefaultFrom" => "m...@example.com"
               
}
           
},
           
"awv" => {
               
"configuration" => "org.camunda.bpm.container.impl.jboss.config.ManagedJtaProcessEngineConfiguration",
               
"datasource" => "java:/datasources/CamundaDS",
               
"default" => false,
               
"history-level" => "audit",
               
"name" => "awv",
               
"properties" => {
                   
"jobExecutorAcquisitionName" => "awv",
                   
"databaseTablePrefix" => "awv_",
                   
"isAutoSchemaUpdate" => "false",
                   
"authorizationEnabled" => "true",
                   
"mailServerHost" => "mail.example.com",
                   
"mailServerPort" => "25",
                   
"mailServerDefaultFrom" => "m...@example.com"
               
}
           
}
       
}
   
}
}


Jobs are acquired just fine in the first engine, but they don't run in the second one. If I change the job acquisition strategy back to default, things start working as expected.
Reply all
Reply to author
Forward
0 new messages