You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jackrabbit.apache.org by Saurabh i-Logicon <sa...@i-logicon.co.in> on 2009/12/18 12:44:11 UTC

JackRabbit - InvalidItemState Exception

Hi,

Our implementation uses a jackrabbit repository and has concurrent folder
creations under the root node ins the same workspace. While doing so at
times we hit InvalidItemStateException which ideally should imply concurrent
modification of the same node. 

However in ourcase each thread creates its own folder under the root node
and then uploads some files into this folder seqeuntially, so I do not see a
reason why concurrent would happen, unless and until the ceration of folder
under the root node has something to do with changing some proerties of the
root node.

Is my understanding correct? If yes, apart from placing a lock on the node
is there a way I can avoid the problem as locking would definitely induce a
performance concern. Also placing the lock would not be an option as we do
not want threads not a part of the lock to die out with a LockException or
something similar.

Would be interested to know if some options are available for my problem..

Thank you
-- 
View this message in context: http://n4.nabble.com/JackRabbit-InvalidItemState-Exception-tp974711p974711.html
Sent from the Jackrabbit - Users mailing list archive at Nabble.com.

Re: JackRabbit - InvalidItemState Exception

Posted by sunild <su...@coreobjects.com>.
Hi Saurabh,
Actually each node is issuing a addNode() on root node.  This is where 
it is concurrent.
you need to use lock on root node bcoz, it is being used by multiple 
threads at a time.

Regards,
Sunil

Saurabh i-Logicon wrote:
> Hi,
>
> Our implementation uses a jackrabbit repository and has concurrent folder
> creations under the root node ins the same workspace. While doing so at
> times we hit InvalidItemStateException which ideally should imply concurrent
> modification of the same node. 
>
> However in ourcase each thread creates its own folder under the root node
> and then uploads some files into this folder seqeuntially, so I do not see a
> reason why concurrent would happen, unless and until the ceration of folder
> under the root node has something to do with changing some proerties of the
> root node.
>
> Is my understanding correct? If yes, apart from placing a lock on the node
> is there a way I can avoid the problem as locking would definitely induce a
> performance concern. Also placing the lock would not be an option as we do
> not want threads not a part of the lock to die out with a LockException or
> something similar.
>
> Would be interested to know if some options are available for my problem..
>
> Thank you
>