4 Replies Latest reply on Feb 20, 2012 9:30 PM by affandar

    JBPM 5 and clustering ?

    ymenager

      Does JBPM 5 support being run on a cluster ?

       

      Also, which parts of JBPM 5 are JBoss AS only, other than the console (which I've already found out is pretty much hardcoded for Jboss)

        • 1. Re: JBPM 5 and clustering ?
          garytse

          I'm working on similar thing: http://community.jboss.org/thread/169261?tstart=0

           

          Short answer, yes, it can be -MADE- to run on a cluster.  The solution is not "off the box".  In any case, I'm fairly certain you want to config jbpm5 to persist states to DB (ie. setup persistence according to the user guide). 

           

          For the jbpm-console, I've spent a couple of days attempting to port it to Websphere but finally given up.  It's going to take too long for my (lack of) ui skill

           

          As for drools-guvnor (storage of the processes) in the installer-example, it's more of an optional thing.  I'm loading the bpmn2 files directly from the file system.  It took minimal effort to port it into Websphere in my case.

           

          The most important matter is the strategy of the stateful knowledge session. 

           

          Options:

          1. You can have one stateful knowledge session per cluster-node (essentially means each server working on their own, will need some sort of "lookup" to match the process to the server...  )

           

          2. Share a single stateful knowledge session for all cluster-nodes.

           

          My post is asking about the 2nd strategy and how that works...    hopefully a guru will come into rescue.

          • 2. Re: JBPM 5 and clustering ?
            arkper

            Gary, unfortunately option 2 doesn't really work either. I believe there's a problem with updating entity/table SessionInfo by several concurrent nodes trying to share it. The exception is as follows:

             

             

             

             

            Hibernate: update SessionInfo set lastModificationDate=?, rulesByteArray=?, startDate=?, OPTLOCK=? where id=? and OPTLOCK=?

            Sep 7, 2011 10:39:34 PM org.drools.persistence.jta.JtaTransactionManager commit

            WARNING: Unable to commit transaction

            javax.persistence.OptimisticLockException

             

             

            : org.hibernate.StaleObjectStateException

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

             

            This happens every time another node  updates the shared SessionInfo entity before the current node has a chance to commit its current transaction.

             

             

            It should be noted that it's just a warning, but I'm not sure if the necessary updates are re-attempted later in order to persist the state accuratly.

             

            I was hoping something like clustering by Terracotta would work, but have run into issues trying to integrate jBPM5 with Terracotta.

             

            Have you had any success in making jBPM5 highly available? Please share your current status.

             

             

            • 3. Re: JBPM 5 and clustering ?
              garytse

              I have not been able to make Option 2 work either.  Right now, I'm just running 1 StatefulKnowledgeSession in a "primary" node-in-cluster method.

              • 4. Re: JBPM 5 and clustering ?
                affandar

                Gary, it would be great to know your eventual findings

                 

                FYI.. I had the same questions and so I put up a short note/request-for-comments here:

                https://community.jboss.org/thread/195459?tstart=0

                 

                Does this match what you ended up with?

                 

                Thanks