jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From KÖLL Claus <C.KO...@TIROL.GV.AT>
Subject AW: InvalidItemStateException
Date Mon, 18 Jun 2007 10:59:30 GMT
hi stefan,
thanks for the information !

BR,
claus

-----Ursprüngliche Nachricht-----
Von: Stefan Guggisberg [mailto:stefan.guggisberg@gmail.com] 
Gesendet: Montag, 18. Juni 2007 12:50
An: dev@jackrabbit.apache.org
Betreff: Re: InvalidItemStateException

On 6/18/07, KÖLL Claus <C.KOELL@tirol.gv.at> wrote:
> i get sometimes on an update operation of my node a InvalidItemStateException() with
the message
> 23588706-aaaf-4dc1-b4e6-d78b1c02be6a/{http://www.tirol.gv.at/dms/1.0}size: the item cannot
be saved because it has been modified externally.
> and i dont know the reason and how i can reproduce it ?
> can somebody explain me the reason ?

the message "the item cannot be saved because it has been modified
externally." means
that the item is stale, i.e. another has session has modified it.

Property p1 = (Property) session1.getItem("/some/property");
Property p2 = (Property) session2.getItem("/some/property");
p1.setValue("foo");
p2.setValue("bar");
p2.save();
p1.save();      // throws InvalidItemStateException

you can avoid this by locking the parent node.

cheers
stefan


>
> BR,
> claus
>

Mime
View raw message