<!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="http://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;">
    Re: Remote Txn Inflow: Synchronizations
</h3>
<span style="margin-bottom: 10px;">
    created by <a href="http://community.jboss.org/people/tomjenkinson">Tom Jenkinson</a> in <i>JBoss Transactions Development</i> - <a href="http://community.jboss.org/message/629821#629821">View the full discussion</a>
</span>
<hr style="margin: 20px 0; border: none; background-color: #dadada; height: 1px;">

<div class="jive-rendered-content"><blockquote class="jive-quote"><p>David Lloyd wrote:</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><blockquote class="jive-quote"><p>Tom Jenkinson wrote:</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><blockquote class="jive-quote"><p>Jonathan Halliday wrote:</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>It's hard to do lazily when all the communication is top down - there is no mechanism for the child to call up to the parent to register. </p></blockquote><p>This is what I was thinking also. Without having some way to expose the transaction managers as network endpoints (and the work within ArjunaJTA to make it possible to talk to them), as Jonathan says I think we are at the mercy of top-down approach and the workarounds that approach needs.</p></blockquote><p>We'd need to probably come up with some clever way to modify recovery processing, I can't think of any other way to solve this.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>Are we sure that we need afterCompletion synchronization processing to be executed in terms of the root controller?&#160; The only time I can imagine it mattering is if it is controlling some resource that is outside of the JVM, outside of the transaction, and yet visible to other participants.&#160; If synchronizations are used for the purpose of discovering the overall outcome of the transaction, then executing on the local node achieves that purpose.&#160; Same thing if the purpose is to clean up some per-VM resource.&#160; And I think these two use cases are by far the predominant ones.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>I would argue that it is actually more effective to define the behavior in terms of the single VM.&#160; Especially considering that no other solution seems to be forthcoming...</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>For our purposes, it might be best to come out and specify that afterCompletion only runs in terms of the individual VM's view of the overall transaction.&#160; Then later on we can revisit having this behavior be configurable, if we actually find a good solution for how to perform this recovery.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>I know it's probably not an ideal solution, but I think it will cover 95% of the use cases correctly, and I suspect that the last 5% ought to be using proper XAResources of their own.</p></blockquote><p>From reading your message, I have understood your requirement to be the following:</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>Cascade beforeCompletion to subordinate TMs</p><p>Cascade prepare</p><p>Cascade commit/rollback (triggering afterCompletions locally)</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>i.e. do not factor out afterCompletions to a separate cascade. In that case, it is possible to get afterCompletions firing in the scenario where the transaction fails to complete correctly (i.e some XAR made a heuristic descision).</p></div>

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


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

</div>

</body>
</html>