On 12/15/05, stephan lohwasser <[EMAIL PROTECTED]> wrote: > this is what happens: > > javax.jcr.InvalidItemStateException: > cafebabe-cafe-babe-cafe-babecafebabe has been modified externally > at org.apache.jackrabbit.core.ItemImpl.save(ItemImpl.java:1371) > at org.apache.jackrabbit.core.SessionImpl.save(SessionImpl.java:765) > at > at.systemone.wiki.threadthreat.JCRThreadTest$MyThread.run(JCRThreadTest.java:110) > at java.lang.Thread.run(Thread.java:595) > > do you knwo what i do wrong?
both sessions are concurrently modifying the root node and the exception thrown is therefore correct. that's what i tried to explain to you in my previous mail: <quote> if n threads modify the *same* item concurrently only one thread will succeed and the others will get InvalidItemStateExceptions informing them that their modifications have become stale. this is by design. to prevent this you have to lock the node you're working on. </quote> see also http://article.gmane.org/gmane.comp.apache.jackrabbit.devel/4096 http://thread.gmane.org/gmane.comp.apache.jackrabbit.devel/3109 cheers stefan > > cheers > stephan >