0 Replies Latest reply on Dec 5, 2012 11:22 AM by Prabakar Singaram

    Transaction in JBPM

    Prabakar Singaram Newbie

      My scenario 1:

      I have one persistence.xml with one persistence unit and describing both process table and task table persistence info in mysql db running locally.

      Non XA datasource environment.

       

      Test 1:

      Create some process flow using one human task node (using local human task) and run all in one flow.

       

      Result:

      working fine , creating tables and updating data and close the process and session properly- success

       

      Test 2:

      In the same above scenario,want to create human task service using mina as server to connect the taskservice and start the process separately to connect the human task using mina and complete the human task.

       

      Result:

      It fails and throws transaction exception due to btm.

       

      My Investigation / Observation:

      Since I am using one persistence unit to create the entitymanager, I am passing this entity manager to task service. what happen is first i am starting the human task service using mina ...it is working fine and starting the mina server. that time btm transaction journal log files open and locked. After starting the mina task server successfully I tried to start the process to complete the human task. what happen now is againg I am creating a entitymanger using the same persistence unit to create a knowledgesession, since the btm is already active and locked by the humantaskservice, this throws the "bitronix.tm.utils.InitializationException: cannot open disk journal".

       

      My question:

      1- What I am tring to achive is correct or wrong?

      2 - Do I need to treat the process and human task service transactions separate components? if yes why? (I gone throug the documents still have doubts)?

      3 - If I use JTA for human task and process persistence, how to handle? Do I need two persistence units? is it possible to have one persistence unit to handle this (do not want to use local human task want to use mina or hornetq)?

       

      Note:

      I created two separate persistence units one for task and one for process process unit using JTA and BTM, while task persistence unit not using BTM transaction, in this test working fine. Now I am tring to achive with one persistence unit.

       

       

      please join me to discuss this topics,

       

       

      thanks in advance,