Jukka Zitting wrote:
Thanks. Follow up question: My data has no unique id or anything associated with it. So I'm going to have to generate an id then.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. I can do an increment type thing like this: public Node getNode(int nodeName, Node parent) { try { return parent.addNode(new Integer(nodeName).toString()) } catch (ItemExistsException e) { return getNode(nodeName+1); } } Lets say I have two open transactions where this is occurring at the same time. Will Tx#2 see that #1 has added a node named "1" and get an ItemExistsException even though I haven't committed Tx#1? Are there any bundled utilities within jackrabbit that can create unique ids across a cluster? Should I just use UUIDs? - Dan -- Dan Diephouse MuleSource http://mulesource.com | http://netzooid.com/blog |
- Problem in Multithreaded Environment Dan Diephouse
- Re: Problem in Multithreaded Environment Dan Diephouse
- Re: Problem in Multithreaded Environment Stefan Ivanov
- Re: Problem in Multithreaded Environment Stefan Guggisberg
- Re: Problem in Multithreaded Environment Dan Diephouse
- Re: Problem in Multithreaded Environmen... Dan Diephouse
- Re: Problem in Multithreaded Envir... Stefan Guggisberg
- Re: Problem in Multithreaded E... Dan Diephouse
- Re: Problem in Multithread... Jukka Zitting
- Re: Problem in Multithread... Dan Diephouse
- Re: Problem in Multithread... Jukka Zitting
- RE: Problem in Multithreaded Environment Connor Brett
- Re: Problem in Multithreaded Environment Dominique Pfister
