1 Reply Latest reply on Jul 3, 2015 4:58 AM by Maciej Swiderski

    Thread block in jBPM 6.1.0

    rahul7163 Newbie

      Hi Friends,


      I'm using jBPM 6.1.0 using Singleton Session Strategy. Recently, during the simultaneous usage of the application between multiple users, the thread blocks has been observed while starting the process.


      ajp-apr-exec" - Thread t@123

         java.lang.Thread.State: BLOCKED at org.drools.persistence.SingleSessionCommandService.execute(SingleSessionCommandService.java:353)

           - waiting to lock (a org.drools.persistence.SingleSessionCommandService) owned by "ajp-apr-exec" t@102 at org.drools.core.command.impl.CommandBasedStatefulKnowledgeSession.startProcess(CommandBasedStatefulKnowledgeSession.java:230)


      Is it a known issue with Singleton Session Strategy in jBPM 6.1.0 version? Just want to know how we can avoid this situation?




        • 1. Re: Thread block in jBPM 6.1.0
          Maciej Swiderski Master

          singleton allows only one thread to perform operation at a time. So if you have multiple threads that would like to start process via ksession only one will be doing the work and others will be waiting. Then depending on the process definition (like long running activities done synchronously) will lock ksession for longer period of time causing other threads to wait longer.


          So that is known limitation rather a bug. You can use other strategies (per request or per process instance) to avoid this synchronization point.