Hi, On Jan 16, 2008 9:27 PM, Dan Diephouse <[EMAIL PROTECTED]> wrote: > I have to lock the parent node before I can add child nodes? How does that > help the situation? Then I have one thread that fails while the other > succeeds. > > Lets say I have a node /spreadsheets and then I have two users using my web > interface and they both add a spreadsheet to the repository at the same > time. And spreadsheet nodes are represented by /spreadsheets/spreadsheet . > Are you saying thats not possible?
Jackrabbit handles such concurrent additions nicely as long as the added child nodes have separate names. See JCR-584 [1] for the details. Unfortunately this does not currently work with same name siblings. If I recall correctly there were some tricky semantic issues on how such cases should really be handled. Have you considered not using same name siblings in your content mode. See [2] and the related mailing list thread [3] for a rationale why locally (within a parent) unique node names are considered a better solution. [1] https://issues.apache.org/jira/browse/JCR-584 [2] http://wiki.apache.org/jackrabbit/DavidsModel#head-1df0224190c265f5156f037eb3f20e314fa6c4a7 [3] http://www.nabble.com/DM-Rule--4%3A-Beware-of-Same-Name-Siblings.-td11477597.html BR, Jukka Zitting
