<br><br><div class="gmail_quote">2009/6/3 Chris Muller <span dir="ltr"><<a href="mailto:asqueaker@gmail.com">asqueaker@gmail.com</a>></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>
> Now I have a Debugger with a MagmaCommitError. As you can see from the<br>
> attachement, the User2 session still has a transaction,<br>
<br>
</div>The attachment shows the "transactionLevel" as 0, meaning the session<br>
is not in a transaction. The 'transaction' 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>
> questions:<br>
><br>
> -Is this transaction invalid in some way? I've observed some possibly<br>
> relevant protocol here (#restore? #changedObjects?)<br>
<br>
</div>MaTransaction is completely private. Access with caution.<br>
<div class="im"><br>
> -Supposing that it's appropiate to reapply User2 changes, do I have the<br>
> 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'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>
> -If the Debugger isn'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 "merged" 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'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>