3 Replies Latest reply on Nov 20, 2013 1:45 PM by swiderski.maciej

    How Executor Service works in Cluster Environment-JBPM6

    bpm77

      I tried to use Executor service in cluster environment.

      But sees error in multiple node

      Caused by: org.hibernate.StaleObjectStateException: Row was updated or deleted by another transaction (or unsaved-value mapping was incorrect): [org.drools.persistence.info.SessionInfo#3857]

      In my Sample Process I have 10 service tasks and 4 nodes in Cluster environment.

      In every few minutes I am getting this irritating exception.

      Is there a way to make sure only one instance run in one node.

      If any node goes down it will automatically fail over to another one node in cluster.


        • 1. Re: How Executor Service works in Cluster Environment-JBPM6
          swiderski.maciej

          the executor in cluster works as multiple standalone instances of executor, where each of them will poll for jobs to execution independently. You can configure the interval, thread pool, and retry count of the executor per cluster member to reduce race conditions.

           

          What runtime management strategy do you use? Are these service tasks within single process instances or in many process instances? What version of jbpm do you use?

           

          HTH

          • 2. Re: How Executor Service works in Cluster Environment-JBPM6
            bpm77

            Hi Maciej,  Thanks for prompt response. All service tasks are in single process.

            I am using jbpm6 CR2 version and newPerProcessInstance Policy.

            I can see there are very likely chances multiple service task can be executed in different nodes by executor service , it means same process instance can be loaded in all different nodes. and cause above mentioned exception.

            Single session for all process instances policy  can be performance bottleneck.

            Can you please suggest whats the best approach to solve this issue?

            • 3. Re: How Executor Service works in Cluster Environment-JBPM6
              swiderski.maciej

              would be good to try with newer version as since CR2 there were quite few improvements added. For example there is optimistic lock exception retry interceptor that should automatically retry operation in case of failure so that might be something that would solve your issue.

               

              HTH