1 Oct 2006 16:10
Re: Concurrent writing to a JCR repository
Stefan Guggisberg <stefan.guggisberg <at> gmail.com>
2006-10-01 14:10:02 GMT
2006-10-01 14:10:02 GMT
hi behrang, On 10/1/06, Behrang Saeedzadeh <behrangsa <at> gmail.com> wrote: > Hi Again, > > I changed a code a bit and surprisingly I'm getting a new exception: > > javax.jcr.InvalidItemStateException: > 6aa4218b-93a6-4a34-b078-42e843baa5b2: the item cannot be saved because > it has been modified externally. this exception indicates that you have 2 or more separate sessions that try to modify the *same* item (in your case adding nodes to the /positions node). you can avoid such situations if you lock the node before you start modifiying it. cheers stefan > at org.apache.jackrabbit.core.ItemImpl.getTransientStates(ItemImpl.java:387) > at org.apache.jackrabbit.core.ItemImpl.save(ItemImpl.java:1054) > at org.apache.jackrabbit.core.SessionImpl.save(SessionImpl.java:805) > at org.behrang.practice.jsr170.UserThread.run(Main.java:66) > at java.lang.Thread.run(Thread.java:595) > > Here's the changed code: > > --- --- --- ---(Continue reading)

>
> Regards,
> --
> "We can only see a short distance ahead,
> but we can see plenty there
> that needs to be done." - Alan Turing
>
> "Science is a differential equation. Religion
> is a boundary condition" - Alan Turing
>
> Behrang Saeedzadeh
>
RSS Feed