ModeShape/modeshape — pull request #259 by rhauch (2011-12-22 21:49:45+00:00)
Title: MODE-1289 Added logic to handle concurrent changes

Although RepositoryCache uses transactions for its changes to Infinispan content, it still is possible for one session to make changes to a node and, before that session is saved, another session removes the node and persists its changes. In this case, when the first session attempts to save its changes (e.g., modifying a now-removed node) the save operation needs to throw an InvalidItemStateException. At this point, the session's owner can either abort all the changes or try to recover.

All unit and integration tests pass with these changes.