On 6/19/06, Torgeir Veimo <[EMAIL PROTECTED]> wrote:
Would it be correct to call refresh(false) on the counter node in case
of an exception? I only ever modify the value property when the node is
created and in the generateNewResourceId() method.

yes, you should definitively handle that case. but after having a
second look at your code I realized that the counter node actually
doesn't get modified in the run method. It is only the property that
changes. So it seems there must be some code that modifies the counter
node outside of the Locked.run() method.

there are also some test cases that show how to use the utility:
http://svn.apache.org/repos/asf/jackrabbit/trunk/jackrabbit/src/test/java/org/apache/jackrabbit/core/LockTest.java

Those test cases run fine on my checkout. and one of them
(LockTest.testSequence) does the same as your generateNewResourceId()
method, it increments a counter property.

regards
marcel

Reply via email to