<br><br><div class="gmail_quote">2009/6/3 Chris Muller <span dir="ltr">&lt;<a href="mailto:asqueaker@gmail.com">asqueaker@gmail.com</a>&gt;</span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Thanks for the great questions.<br>
<div class="im"><br>
&gt; Now I have a Debugger with a MagmaCommitError. As you can see from the<br>
&gt; attachement, the User2 session still has a transaction,<br>
<br>
</div>The attachment shows the &quot;transactionLevel&quot; as 0, meaning the session<br>
is not in a transaction.  The &#39;transaction&#39; instance variable always<br>
has a MaTransaction instance which is just a single per session to<br>
manage the readSet (for changed-detection).  It is completely private.<br>
<div class="im"><br>
so I have some<br>
&gt; questions:<br>
&gt;<br>
&gt; -Is this transaction invalid in some way? I&#39;ve observed some possibly<br>
&gt; relevant protocol here (#restore? #changedObjects?)<br>
<br>
</div>MaTransaction is completely private.  Access with caution.<br>
<div class="im"><br>
&gt; -Supposing that it&#39;s appropiate to reapply User2 changes, do I have the<br>
&gt; chance to do it from the Debugger?<br>
<br>
</div>Magma guards its internal state, you may restart at the point your<br>
application issued the #commit, but be sure to check the session<br>
transactionLevel, you may need to manually send #begin to the session<br>
first if the application code doesn&#39;t..<br>
<br>
Likewise, if your application issued #commit: [ ... ]  and your<br>
session is at transactionLevel 0, then of course you can just restart<br>
from there..</blockquote><div><br>Thanks for the explanations Chris. I tried to restart but the commitNumber of the session in the debugger was nil, and when the session wanted to reconnect and validate in #validateCommitNumber another MNU was raised. This is expected for this kind of situation?<br>
 </div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br>
<div class="im"><br>
&gt; -If the Debugger isn&#39;t useful at this stage, how to apply the User2 changes?<br>
<br>
</div>A session that experiences a commit-conflict is no longer in a<br>
transaction, but the local changes can still be committed.  However,<br>
the state of the local model is now &quot;merged&quot; with updates from other<br>
users.  The MagmaCommitConflictError (Exception) has a<br>
MaFailedCommitResult, which has a collection of the objects that, in<br>
particular, the application may wish to review, they are the ones<br>
User2 changes now overlay the local changes.</blockquote><div></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br>
<br>
If the application wishes to continue committing the local changes, it<br>
may issue a #begin followed by a commit.  I must admit, it seems<br>
unnecessary to require the application to do this..  I don&#39;t think<br>
that would be difficult, hmm..<br>
<br>
Or, the application may issue an #abort to cancel all local changes,<br>
refresh all contents from the repository and start over.<br>
<font color="#888888"><br>
 - Chris<br>
</font></blockquote></div><br><br>Hernan<br>