jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Torsten Curdt" <tcu...@apache.org>
Subject Re: concurrent writes
Date Mon, 05 Jan 2009 13:16:21 GMT
Thanks! That links was very interesting ...not sure it gives a final
answer though.

IMO it would be consistent if neither would fail

       Session s1 = ...
       Session s2 = ...
       String newPropName = Long.toString(System.currentTimeMillis());
       s1.getRootNode().setProperty(newPropName, "1");
       s2.getRootNode().setProperty(newPropName, "2");
       s1.save();
       s2.save();

       Session s1 = ...
       Session s2 = ...
       s1.getRootNode().setProperty("b", "0");
       s1.save();
       s1.getRootNode().setProperty("b", "1");
       s2.getRootNode().setProperty("b", "2");
       s1.save();
       s2.save();

at least not from my user's perspective. Unless you ask for such information.
Requiring a lock/transaction to prevent unexpected behavior sounds fair.

cheers
--
Torsten

Mime
View raw message