Howto wire the job executor to a embedded ejb process application?

475 views
Skip to first unread message

Ingo Richtsmeier

unread,
Feb 4, 2015, 8:45:08 AM2/4/15
to camunda-...@googlegroups.com
Hi,

we want to run a embedded process engine in our application on a JEE server (Weblogic/JBoss)

The processes.xml looks like this:

<process-application ...

  <process-engine name="default">
    <job-acquisition>default</job-acquisition>
    <configuration>org.camunda.bpm.engine.impl.cfg.JtaProcessEngineConfiguration</configuration>
    <datasource>java:jboss/datasources/ProcessEngine</datasource>
    <properties>
      <property name="history">full</property>
      <property name="databaseSchemaUpdate">true</property>
      <property name="transactionManagerJndiName">java:/TransactionManager</property>
    </properties>
  </process-engine>

  <process-archive> ...
  </process-archive>

</process-application>

Starting my JBoss I get this error:

Caused by: javax.ejb.EJBException: org.camunda.bpm.engine.ProcessEngineException: Exception while performing 'Deployment of Process Application standalone-ejb-example => Start process engine default': Cannot find referenced job executor with name 'default': jobExecutor is null
        at org.jboss.as.ejb3.tx.CMTTxInterceptor.handleExceptionInOurTx(CMTTxInterceptor.java:165)

I configured the JBoss Threadpool like this:

        <subsystem xmlns="urn:jboss:domain:threads:1.1">
            <bounded-queue-thread-pool name="job-executor-tp" allow-core-timeout="true">
                <core-threads count="3"/>
                <queue-length count="3"/>
                <max-threads count="10"/>
                <keepalive-time time="10" unit="seconds"/>
            </bounded-queue-thread-pool> 
        </subsystem>

How do I wire the thread pool with my embedded process engine (without camunda-jboss-subsystem)? How to do this in WebLogic (without installing the camunda-rar?)?

Kind Regards,

Ingo


Bernd Rücker (camunda)

unread,
Feb 4, 2015, 8:50:10 AM2/4/15
to camunda-...@googlegroups.com

@Ingo: you are missing a job executor – as this is never started. See e.g. http://docs.camunda.org/latest/guides/installation-guide/jboss/#bpm-platform-install-the-platform-on-a-vanilla-jboss-adjusting-the-standalonexml – there a job executor is configured in standalone.xml.

 

So the interesting question is if a job executor can be configured in the processes.xml. According to http://docs.camunda.org/latest/api-references/deployment-descriptors/#descriptors-processesxml this is not the case – but I am not sure if the docs are accurate?

--
You received this message because you are subscribed to the Google Groups "camunda BPM users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to camunda-bpm-us...@googlegroups.com.
To post to this group, send email to camunda-...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/camunda-bpm-users/a0a9cbe2-ec06-47e2-90ed-0247293b7aac%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Christian Lipphardt

unread,
Feb 4, 2015, 9:09:10 AM2/4/15
to camunda-...@googlegroups.com
Hi Ingo,

When you do not use the JobExecutor designed for JBoss / JEE, you have to fall back and use the embedded JobExecutor. The embedded JobExecutor is not designed for running in a JEE server, because it does its thread handling itself and not in a JEE compatible way. That's what the JBoss subsystem / RAR is designed to do.

A JobExecutor can be configured inside the bpm-platform.xml but that has the requirement that you bootstrap the platform beforehand. For example Tomcat is bootstrapped using a LifecycleListener ( https://github.com/camunda/camunda-bpm-platform/blob/master/engine/src/main/java/org/camunda/bpm/container/impl/tomcat/TomcatBpmPlatformBootstrap.java )

How do you bootstrap the engine?

Cheers,
Christian
signature.asc

Ingo Richtsmeier

unread,
Feb 4, 2015, 9:37:01 AM2/4/15
to camunda-...@googlegroups.com
Hi Christian, 

we tried to get an easy deployment of a complete process application with embedded engine on an automatically distributed weblogic server. We bootstraped the engine with the processes.xml form the first post.

Now we look into the automatic deployment of the shared engine.

Kind Regards,

Ingo

Christian Lipphardt

unread,
Feb 4, 2015, 9:50:36 AM2/4/15
to
Hi Ingo,

Did you try to remove the Job-Acquistion element from the processes.xml?
When I understand the code correctly it wont set a job executor for the engine when no job-acquisition element is set. This will lead to the engine bootstrapping the default embedded job executor.

Cheers,
Christian
To unsubscribe from this group and stop receiving emails from it, send an email to camunda-bpm-users+unsubscribe@googlegroups.com.
To post to this group, send email to camunda-bpm-users@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/camunda-bpm-users/bc9404e4-627b-481c-958a-0a4214819371%40googlegroups.com.
signature.asc

Ingo Richtsmeier

unread,
Feb 4, 2015, 9:55:05 AM2/4/15
to camunda-...@googlegroups.com
Hi Christian, 

yes, the engine starts without the job-acquisition element sucessfully. But the async service tasks hang up, waiting for a job that never comes...

Kind Regards,

Ingo


Am Mittwoch, 4. Februar 2015 15:50:36 UTC+1 schrieb Christian Lipphardt:
Hi Ingo,

Did you try to remove the Job-Acquistion element from the processes.xml?
When I understand the code correctly it wont set a job executor for the engine which will bootstrap the default embedded one.

Cheers,
Christian
Reply all
Reply to author
Forward
0 new messages