Return-Path: Delivered-To: apmail-jackrabbit-users-archive@locus.apache.org Received: (qmail 3611 invoked from network); 16 Oct 2006 11:09:48 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 16 Oct 2006 11:09:48 -0000 Received: (qmail 76826 invoked by uid 500); 16 Oct 2006 11:09:46 -0000 Delivered-To: apmail-jackrabbit-users-archive@jackrabbit.apache.org Received: (qmail 76818 invoked by uid 500); 16 Oct 2006 11:09:46 -0000 Mailing-List: contact users-help@jackrabbit.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@jackrabbit.apache.org Delivered-To: mailing list users@jackrabbit.apache.org Received: (qmail 76772 invoked by uid 99); 16 Oct 2006 11:09:45 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 16 Oct 2006 04:09:45 -0700 X-ASF-Spam-Status: No, hits=2.5 required=10.0 tests=DNS_FROM_RFC_ABUSE,HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of michael.neale@gmail.com designates 66.249.82.234 as permitted sender) Received: from [66.249.82.234] (HELO wx-out-0506.google.com) (66.249.82.234) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 16 Oct 2006 04:09:43 -0700 Received: by wx-out-0506.google.com with SMTP id t13so1553321wxc for ; Mon, 16 Oct 2006 04:09:22 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=AueVmKah+HbHZGP3wIC0hgBSAvOJ3KJKSfv1dReWcGe7M/5flaWCDfX79j7hcVSbbBe7QDXt+10aX6qwvzWaCdzYx3ca0l5v7DJoIujJ5xpb7uS73HUEIS09lBMJsUZjy3f4Z25TTt5vNfvupV0/gpMb52m8w0200hhNGLsyTJM= Received: by 10.90.71.12 with SMTP id t12mr3257414aga; Mon, 16 Oct 2006 04:09:22 -0700 (PDT) Received: by 10.90.90.3 with HTTP; Mon, 16 Oct 2006 04:09:22 -0700 (PDT) Message-ID: <96ab3ced0610160409p5f021d34w260c12729b6887a4@mail.gmail.com> Date: Mon, 16 Oct 2006 12:09:22 +0100 From: "Michael Neale" To: users@jackrabbit.apache.org Subject: Re: is jackrabbit Threadsafe? In-Reply-To: <2f35a2640610160355v52abc2f7j1764f249bc6898e0@mail.gmail.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_216068_18584898.1160996962407" References: <2f35a2640610160159m4fc9471cn7d8c92400fe15dee@mail.gmail.com> <8be731880610160225n6bea2674rad528239431c9d92@mail.gmail.com> <2f35a2640610160238j41077cf1j212d65b7bfd1aaae@mail.gmail.com> <2f35a2640610160315w33de6c7dvd7241deb7dce5c19@mail.gmail.com> <2f35a2640610160346u743928fv2d97cd658e832e78@mail.gmail.com> <2f35a2640610160355v52abc2f7j1764f249bc6898e0@mail.gmail.com> X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N ------=_Part_216068_18584898.1160996962407 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline Session creation seems to be fast after the first hit, fast enough for pre request cycles. You can always wrap stuff with threadsafe code to protect access if you want a per http session scenario. On 10/16/06, Ted Roeloffzen wrote: > > But when you use different Sessions for all request cycles, you will have > to > login all the time and this will kill your performance, or am i wrong?? > > On 10/16/06, Ted Roeloffzen wrote: > > > > So how would you do it? > > > > > > On 10/16/06, Alexandru Popescu > > wrote: > > > > > > On 10/16/06, Ted Roeloffzen < ted.roeloffzen@gmail.com> wrote: > > > > So we don't have to create a variable for the JackRabbit session in > > > the > > > > HTTP-session, > > > > > > I would say that this is in fact not recommended. Imagine what happens > > > with 2 concurrent requests that are using the same HttpSession? Is the > > > JCR Session still used in a thread safe manner? > > > > > > ./alex > > > -- > > > .w( the_mindstorm )p. > > > > > > > but we can use it in a request-cycle?? We are now using a > > > > simple Abstract class en getting the session from it. > > > > > > > > > > > > > > > > On 10/16/06, Alexandru Popescu > > > wrote: > > > > > > > > > > On 10/16/06, Ted Roeloffzen wrote: > > > > > > So when using it in a Web-application, every HTTP-session has to > > > have > > > > > its > > > > > > own JackRabbit-session. So then it would be threadsafe? > > > > > > > > > > > > > > > > > > > > > > I think you should think about it in request-scope and not on Http > > > > > session scope. Only request-response cycles are guaranteed to > happen > > > > > on the same thread. > > > > > > > > > > ./alex > > > > > -- > > > > > .w( the_mindstorm )p. > > > > > > > > > > > On 10/16/06, Tobias Bocanegra < tobias.bocanegra@day.com> wrote: > > > > > > > > > > > > > > if every thread uses it's own jcr session, yes. > > > > > > > regards, toby > > > > > > > > > > > > > > On 10/16/06, Ted Roeloffzen wrote: > > > > > > > > I would really like to know if JackRabbit is threadsafe. > > > > > > > > > > > > > > > > Greets, > > > > > > > > > > > > > > > > Ted > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > -- > > > > > > > -----------------------------------------< > > > 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>--- > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > ------=_Part_216068_18584898.1160996962407--