<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<body link="#355491" alink="#4262a1" vlink="#355491" style="background: #e2e2e2; margin: 0; padding: 20px;">

<div>
        <table cellpadding="0" bgcolor="#FFFFFF" border="0" cellspacing="0" style="border: 1px solid #dadada; margin-bottom: 30px; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                <tbody>
                        <tr>

                                <td>

                                        <table border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" style="border: solid 2px #ccc; background: #dadada; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                                                <tbody>
                                                        <tr>
                                                                <td bgcolor="#000000" valign="middle" height="58px" style="border-bottom: 1px solid #ccc; padding: 20px; -moz-border-radius-topleft: 3px; -moz-border-radius-topright: 3px; -webkit-border-top-right-radius: 5px; -webkit-border-top-left-radius: 5px;">
                                                                        <h1 style="color: #333333; font: bold 22px Arial, Helvetica, sans-serif; margin: 0; display: block !important;">
                                                                        <!-- To have a header image/logo replace the name below with your img tag -->
                                                                        <!-- Email clients will render the images when the message is read so any image -->
                                                                        <!-- must be made available on a public server, so that all recipients can load the image. -->
                                                                        <a href="https://community.jboss.org/index.jspa" style="text-decoration: none; color: #E1E1E1">JBoss Community</a></h1>
                                                                </td>

                                                        </tr>
                                                        <tr>
                                                                <td bgcolor="#FFFFFF" style="font: normal 12px Arial, Helvetica, sans-serif; color:#333333; padding: 20px;  -moz-border-radius-bottomleft: 4px; -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 5px; -webkit-border-bottom-left-radius: 5px;"><h3 style="margin: 10px 0 5px; font-size: 17px; font-weight: normal;">
    Transaction in JBPM
</h3>
<span style="margin-bottom: 10px;">
    created by <a href="https://community.jboss.org/people/artist123">Sam Mano</a> in <i>jBPM</i> - <a href="https://community.jboss.org/message/780169#780169">View the full discussion</a>
</span>
<hr style="margin: 20px 0; border: none; background-color: #dadada; height: 1px;">

<div class="jive-rendered-content"><h3><span style="color: #3366ff;">My scenario 1:</span></h3><p><span style="color: #3366ff;">I have one persistence.xml with one persistence unit and describing both process table and task table persistence info in mysql db running locally.</span></p><p><span style="color: #0000ff;">Non XA datasource environment.</span></p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><h5><span style="color: #ff0000;">Test 1:</span></h5><p><span style="color: #ff0000;">Create some process flow using one human task node (using local human task) and run all in one flow.</span></p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><h5><span style="color: #008000;">Result:</span></h5><p><span style="color: #008000;">working fine , creating tables and updating data and close the process and session properly- success</span></p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><h5><span style="color: #ff0000;">Test 2:</span></h5><p><span style="color: #ff0000;">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.</span></p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><h5><span style="color: #008000;">Result:</span></h5><p><span style="color: #008000;">It fails and throws transaction exception due to btm.</span></p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><h6><span style="color: #0000ff;">My Investigation / Observation:</span></h6><p><span style="color: #333399;">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".</span></p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><h6><span style="color: #ff0000;">My question:</span></h6><p><span style="color: #ff0000;">1- What I am tring to achive is correct or wrong?</span></p><p><span style="color: #ff0000;">2 - Do I need to treat the process and human task service separate components? if yes why? (I gone throug the documents still have doubts)?</span></p><p><span style="color: #ff0000;">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)?</span></p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p><span style="color: #000080;">Note:</span></p><p><span style="color: #000080;">I created two separate persistence units one for task and one for process process unit using JTA and BTM, while task persistence unit not in this test working fine.</span></p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p><span style="color: #000080;">please join me to discuss this topics,</span></p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p><span style="color: #000080;">thanks in advance,</span></p></div>

<div style="background-color: #f4f4f4; padding: 10px; margin-top: 20px;">
    <p style="margin: 0;">Reply to this message by <a href="https://community.jboss.org/message/780169#780169">going to Community</a></p>
        <p style="margin: 0;">Start a new discussion in jBPM at <a href="https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034">Community</a></p>
</div></td>
                        </tr>
                    </tbody>
                </table>


                </td>
            </tr>
        </tbody>
    </table>

</div>

</body>
</html>