HI Darko. Yes I think the error is getting mis-reported, as it checks for the optimistic lock - I will change it to give a nicer message (and also tell you who did made the change !).<br><br>Yeah - as for locking, in my experience, you either need to have optimistic locking all the way, or you have &quot;lock and edit&quot; as a feature, which people have to be aware of (and tools to unlock things by force). Anything in between will not really work, as you point out, you can&#39;t really guarantee you will know when the user intends to unlock, or is finished, or is editing (well at the very least you will need tools to manage the locks). 
<br><br>I guess some other ideas are to warn people if we know someone else has opened it (not sure how well that would work in practice), or, have an option for people to place and remove locks on assets (and so it shows up clearly that &quot;XYZ&quot; person has locked something - presumably as they are working on it). 
<br><br>Hope that clears things up (have been fairly busy lately, and at a conference, so not frequently getting into mail !).<br><br>Michael<br><br><br><br><div class="gmail_quote">On Nov 23, 2007 1:47 AM, Darko IVANCAN &lt;
<a href="mailto:ivancan@gmx.de">ivancan@gmx.de</a>&gt; wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Hi Michael,<br><br>Nice to have such a quick feedback.
<br><br>&quot;What do I mean?&quot; Indeed I am looking at the clustered solution, but ...<br>first things first. So I am looking at the &quot;single BRMS&quot; server solution<br>first.<br><br>Currently, when a conflict appears I get an error, which sounds more
<br>serious than: &quot;Somebody else already updated that rule, please update<br>and modify the latest version.&quot;<br><br>So having a single BRMS server:<br>(Case 1)<br>&quot;Simple rule&quot; (i.e. one edited in the BRMS editor)
<br>a) as soon as somebody opens a rule, he is viewing it - no locking required.<br>b) as soon as somebody edits a rule - the rule should get locked, so no<br>other users can edit it (but view, in its old state).<br>c) when the edit is finished, and the changes saved, the user sees it&#39;s
<br>changed rules, so no lock is needed, thus the lock is released.<br><br>(Case 2)<br>&quot;Off-line editing rule&quot; (i.e. Excel sheet)<br>a) When somebody downloads an Excel sheet, it means he&#39;s viewing it,<br>thus no locking would be required
<br>b) When somebody started editing that sheet, the BRMS is oblivious to<br>that, the user should set a lock.<br>c) When the user uploads the new version he should release the lock.<br><br>So far the theory: Here now some more questions:
<br>A) How to handle, if the user needs to lock a rule, but will not modify<br>it right away ?<br>Allow the user an explicit lock/unlock sounds like a good way to go.<br><br>B) How to handle, if the user needs to lock a rule, but has to log out
<br>between the start and the end of the modification ?<br>As in (A), as he can save, log out and log in and then unlock.<br><br>C) What happens is the user takes a lock and ...does not unlock it ?<br>An unlock for others than the users should be allowed to a certain Role
<br>(Admin, LockAdmin, ...).<br><br>If we want to have that in a cluster, than obviously the lock should be<br>propagated.<br>I don&#39;t know if this is supported by JackRabbit.<br>And I do not see a real need for that, as I have never seen any rule
<br>project with so many rule editors, that this would be needed, except for<br>the initial set of rules. Afterwards a Role-Package assignment always<br>helped.<br><br>Thanks a lot so far,<br>Darko Ivancan<br><br>P.S.: I&#39;ll have a look at the code to see what I can do.
<br><div class="Ih2E3d"><br>On 22/11/2007 14:03, Michael Neale wrote:<br>&gt; hi Darko.<br>&gt;<br>&gt; No that is optimistic locking. When they are opened there is no lock<br>&gt; or anything. The second one failed cause it was stale data.
<br>&gt;<br>&gt; To do more aggressive locking would be trickier (as they you have to<br>&gt; have a means to unlock things). There could be a more active type<br>&gt; thing that warns people someone has something open (but of course its
<br>&gt; stateless, so its only &quot;best guess&quot;). This is like 99.9% of other apps<br>&gt; out there, you have to make a decision on how to treat this locking<br>&gt; scenario. Would be interested to discuss more about it though, as it
<br>&gt; is something that you are interested in.<br>&gt;<br>&gt; This is all talking about a single BRMS server, with muliple clients.<br>&gt;<br>&gt; If you mean multiple BRMS instances, then more work needs to be done<br>
&gt; to configure jackrabbit to share indexes etc. Is that what you mean?<br>&gt;<br>&gt; Michael.<br>&gt;<br>&gt; On Nov 22, 2007 10:15 PM, Darko IVANCAN &lt; <a href="mailto:ivancan@gmx.de">ivancan@gmx.de</a><br></div><div>
<div></div><div class="Wj3C7c">&gt; &lt;mailto:<a href="mailto:ivancan@gmx.de">ivancan@gmx.de</a>&gt;&gt; wrote:<br>&gt;<br>&gt; &nbsp; &nbsp; JBoss AS 4.0.5<br>&gt; &nbsp; &nbsp; JBoss Drools 4.0.3<br>&gt; &nbsp; &nbsp; JDK 1.5.13<br>&gt;<br>&gt; &nbsp; &nbsp; Hi,
<br>&gt;<br>&gt; &nbsp; &nbsp; I&#39;m evaluating JBoss Drools and wanted to check the locking<br>&gt; &nbsp; &nbsp; capabilities<br>&gt; &nbsp; &nbsp; in the BRMS, to see it the BRMS can be used on a cluster, i.e.<br>&gt; &nbsp; &nbsp; multiple<br>&gt; &nbsp; &nbsp; BRMSs one DB-Server.
<br>&gt;<br>&gt; &nbsp; &nbsp; So I started first on one single machine, just to check the locking<br>&gt; &nbsp; &nbsp; capabilities:<br>&gt; &nbsp; &nbsp; Started BRMS, logged in using FireFox and Logged in using Safari.<br>&gt; &nbsp; &nbsp; 1) Open one (and the same) rule in both session
<br>&gt; &nbsp; &nbsp; 2) edit and save rule in one session<br>&gt; &nbsp; &nbsp; 3) edit and save rule in another session<br>&gt; &nbsp; &nbsp; =&gt; error<br>&gt;<br>&gt; &nbsp; &nbsp; So, from what I see there is no locking mechanism in the BRMS.<br>&gt; &nbsp; &nbsp; As from what I see in JackRabbit, it does support transactions, but
<br>&gt; &nbsp; &nbsp; locking seems to be needed in the BRMS itself, i.e. one layer above<br>&gt; &nbsp; &nbsp; JackRabbit.<br>&gt;<br>&gt; &nbsp; &nbsp; My question, and maybe someone can answer/confirm these spending<br>&gt; &nbsp; &nbsp; some of<br>&gt; &nbsp; &nbsp; his valuable minutes:
<br>&gt; &nbsp; &nbsp; 1) Is locking included or on the roadmap ?<br>&gt; &nbsp; &nbsp; 2) Did I miss a configuration parameter to enable locking ?<br>&gt; &nbsp; &nbsp; 3) How can stale-locks be cleaned ? Admin-only?<br>&gt;<br>&gt; &nbsp; &nbsp; Thanks a lot for your valuable input and thanks for this great
<br>&gt; &nbsp; &nbsp; product,<br>&gt; &nbsp; &nbsp; Darko Ivancan<br>&gt; &nbsp; &nbsp; _______________________________________________<br>&gt; &nbsp; &nbsp; rules-dev mailing list<br></div></div>&gt; &nbsp; &nbsp; <a href="mailto:rules-dev@lists.jboss.org">rules-dev@lists.jboss.org
</a> &lt;mailto:<a href="mailto:rules-dev@lists.jboss.org">rules-dev@lists.jboss.org</a>&gt;<br><div class="Ih2E3d">&gt; &nbsp; &nbsp; <a href="https://lists.jboss.org/mailman/listinfo/rules-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-dev
</a><br>&gt; &nbsp; &nbsp; &lt;<a href="https://lists.jboss.org/mailman/listinfo/rules-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-dev</a>&gt;<br>&gt;<br>&gt;<br>&gt;<br>&gt;<br></div>&gt; --<br>&gt; Michael D Neale
<br>&gt; home: <a href="http://www.michaelneale.net" target="_blank">www.michaelneale.net</a> &lt;<a href="http://www.michaelneale.net" target="_blank">http://www.michaelneale.net</a>&gt;<br>&gt; blog: <a href="http://michaelneale.blogspot.com" target="_blank">
michaelneale.blogspot.com</a> &lt;<a href="http://michaelneale.blogspot.com" target="_blank">http://michaelneale.blogspot.com</a>&gt;<br>&gt; ------------------------------------------------------------------------<br><div>
<div></div><div class="Wj3C7c">&gt;<br>&gt; _______________________________________________<br>&gt; rules-dev mailing list<br>&gt; <a href="mailto:rules-dev@lists.jboss.org">rules-dev@lists.jboss.org</a><br>&gt; <a href="https://lists.jboss.org/mailman/listinfo/rules-dev" target="_blank">
https://lists.jboss.org/mailman/listinfo/rules-dev</a><br>&gt;<br>_______________________________________________<br>rules-dev mailing list<br><a href="mailto:rules-dev@lists.jboss.org">rules-dev@lists.jboss.org</a><br><a href="https://lists.jboss.org/mailman/listinfo/rules-dev" target="_blank">
https://lists.jboss.org/mailman/listinfo/rules-dev</a><br></div></div></blockquote></div><br><br clear="all"><br>-- <br>Michael D Neale<br>home: <a href="http://www.michaelneale.net">www.michaelneale.net</a><br>blog: <a href="http://michaelneale.blogspot.com">
michaelneale.blogspot.com</a>