jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrey Adamovich <andrey.adamov...@yahoo.com>
Subject Handling of InvalidItemStateException
Date Mon, 26 Oct 2009 08:56:28 GMT
Hi guys!

We are now expriencing a number of InvalidItemStateException in our web application caused
by 2 or more users updating the same content. As far as I understood it is in design of JR
to throw InvalidItemStateExcpetion in such situation and that's ok, but I wanted to ask about
the common way to handle that. We are fairly ok that the last processed change wins the update.
So far we have come up with the following code:
repeat = false;
do {
  try {

     // Do node update/remove

  } catch (InvalidItemStateException e) {
    repeat = true;
} while (repeat)

Is this a common pattern how to handle that? Or is it a better way to avoid such situations?

Best regards, 
Andrey Adamovich

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message