As recommended in JBPM/Drools documentation to support my workflow/Drools operations I’m exposing a singleton service object. The workload on the JBPM/Drools engine is very lite at the moment and therefore I create one session and serialize all commands receiving them via the message queue. Everything seems to be working fine. Now, when the Task Server (MINA implementation) is completing tasks and resuming suspended workflows they inevitably collide with the execution of the main trunk. It is not a problem to make my service singleton thread-safe, however I’m also exposing a transactional context including one-per-transaction instance of the Entity Manager which obviously should be different for the Task Completion thread. Besides I have no control over the transactional context of the Task Server and therefore unable to prepare the data and services for processing of the command.
Here come the questions:
I do not mind looking through the sources of the JBPM/Drools which I do all the time when debugging, but if possible I’d like to hear from the gurus.
Any advice is highly appreciated.
I had the same issue and I've resolved using local task service (transactional). With apache mina I've lost much time with varios problems. With mina you can't run in a transacction the operations.
I create one (persistent) session each time I create a process, no one global session as you do, but not matter how handle the sessions. I suppose have more control on the memory used. But I must fix a class, check https://community.jboss.org/message/722803.
|Retrieving data ...|