jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alexander Klimetschek <aklim...@day.com>
Subject Re: Concurrent Writes in Jackrabbit
Date Mon, 08 Mar 2010 17:34:21 GMT
On Mon, Mar 8, 2010 at 13:18, Dan Diephouse
<dan.diephouse@mulesource.com> wrote:
> I'm having some problems doing concurrent addition of nodes to a parent node
> in Jackrabbit. I'm probably doing something stupid and I'm wondering if
> someone can comment on what that might be.
> I've attached a simple test which starts up a bunch of threads which add
> nodes to a parent node concurrently. If I add in locks I can get this to
> work, but I shouldn't have to use locks IIUC. However, the test always fails
> with this:
> javax.jcr.InvalidItemStateException: Item cannot be saved because it has
> been modified externally: node /testParent

This exception is to be expected. JCR does not define a guarantee on
what concurrent operations an implementation can successfully merge.
Locks are present in JCR as a general mechanism for such

I believe that this specific case (adding nodes) was improved in 2.0,
but I couldn't find a jira issue. Could someone confirm or deny?


Alexander Klimetschek

View raw message