You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jackrabbit.apache.org by vetalok <ve...@gmail.com> on 2007/04/26 17:36:00 UTC

checkin() method and multi-threading

Hi all
Are there some problems in jackrabbit with checkin() method?
My code:
....
Node tmpNode = node.addNode("tmpNodeName", "nt:unstructured");
tmpNode.addMixin("mix:versionable");
node.save();
....
tmpNode.checkin()
If this part of code had exetuded by 1 thread - all OK.
But if this code had exetuded by 2 threads the programm is hanging...
Other operations like addnode passed OK in multi threaded mode.
Any ideas?
Thanks.

-- 
View this message in context: http://www.nabble.com/checkin%28%29-method-and-multi-threading-tf3652384.html#a10202901
Sent from the Jackrabbit - Users mailing list archive at Nabble.com.


Re: checkin() method and multi-threading

Posted by Jukka Zitting <ju...@gmail.com>.
Hi,

On 4/27/07, vetalok <ve...@gmail.com> wrote:
> yes, I'm using  separate sessions for each thread,
> besides, each session has own node, I mean there shold not be any conflicts
> between nodes this code works good with other jcr implementation

There's a known issue (JCR-18) in Jackrabbit regarding concurrent
versioning. The recommended workaround for now is to use an
application-specific synchronization mechanism to serialize all
versioning operations.

BR,

Jukka Zitting

Re: checkin() method and multi-threading

Posted by vetalok <ve...@gmail.com>.
yes, I'm using  separate sessions for each thread,
besides, each session has own node, I mean there shold not be any conflicts
between nodes
this code works good with other jcr implementation

Tobias Bocanegra wrote:
> 
> hi,
> are you using separate sessions for each thread?
> regards, toby
> 
> On 4/26/07, vetalok <ve...@gmail.com> wrote:
>>
>> Hi all
>> Are there some problems in jackrabbit with checkin() method?
>> My code:
>> ....
>> Node tmpNode = node.addNode("tmpNodeName", "nt:unstructured");
>> tmpNode.addMixin("mix:versionable");
>> node.save();
>> ....
>> tmpNode.checkin()
>> If this part of code had exetuded by 1 thread - all OK.
>> But if this code had exetuded by 2 threads the programm is hanging...
>> Other operations like addnode passed OK in multi threaded mode.
>> Any ideas?
>> Thanks.
>>
>> --
>> View this message in context:
>> http://www.nabble.com/checkin%28%29-method-and-multi-threading-tf3652384.html#a10202901
>> Sent from the Jackrabbit - Users mailing list archive at Nabble.com.
>>
>>
> 
> 
> -- 
> -----------------------------------------< tobias.bocanegra@day.com >---
> Tobias Bocanegra, Day Management AG, Barfuesserplatz 6, CH - 4001 Basel
> T +41 61 226 98 98, F +41 61 226 98 97
> -----------------------------------------------< http://www.day.com >---
> 
> 

-- 
View this message in context: http://www.nabble.com/checkin%28%29-method-and-multi-threading-tf3652384.html#a10214636
Sent from the Jackrabbit - Users mailing list archive at Nabble.com.


Re: checkin() method and multi-threading

Posted by Tobias Bocanegra <to...@day.com>.
hi,
are you using separate sessions for each thread?
regards, toby

On 4/26/07, vetalok <ve...@gmail.com> wrote:
>
> Hi all
> Are there some problems in jackrabbit with checkin() method?
> My code:
> ....
> Node tmpNode = node.addNode("tmpNodeName", "nt:unstructured");
> tmpNode.addMixin("mix:versionable");
> node.save();
> ....
> tmpNode.checkin()
> If this part of code had exetuded by 1 thread - all OK.
> But if this code had exetuded by 2 threads the programm is hanging...
> Other operations like addnode passed OK in multi threaded mode.
> Any ideas?
> Thanks.
>
> --
> View this message in context: http://www.nabble.com/checkin%28%29-method-and-multi-threading-tf3652384.html#a10202901
> Sent from the Jackrabbit - Users mailing list archive at Nabble.com.
>
>


-- 
-----------------------------------------< tobias.bocanegra@day.com >---
Tobias Bocanegra, Day Management AG, Barfuesserplatz 6, CH - 4001 Basel
T +41 61 226 98 98, F +41 61 226 98 97
-----------------------------------------------< http://www.day.com >---