Am trying to use the new atomicSupport feature, and am wondering if I'm
using it the correct way;
My counter is initialised with
Node counter = JcrUtils.getOrCreateByPath("/testCounter",
"oak:Unstructured", session);
if (counter.isNew()) {
counter.addMixin("mix:atomicCounter");
session.save();
}
then when fetching a new value
counter.setProperty("oak:increment", 1);
session.save();
long value = counter.getProperty("oak:counter").getLong();
What happens if the same code is called from a different thread / session
after the session.save() but before the getProperty() call? Will the value
remain unchanged in this thread / session?
--
-Tor