Return-Path: Delivered-To: apmail-jackrabbit-users-archive@locus.apache.org Received: (qmail 89214 invoked from network); 16 Oct 2006 15:10:03 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 16 Oct 2006 15:10:03 -0000 Received: (qmail 58159 invoked by uid 500); 16 Oct 2006 15:10:02 -0000 Delivered-To: apmail-jackrabbit-users-archive@jackrabbit.apache.org Received: (qmail 58149 invoked by uid 500); 16 Oct 2006 15:10:02 -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 58140 invoked by uid 99); 16 Oct 2006 15:10:02 -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 08:10:02 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [66.46.21.156] (HELO smtp.tirawireless.com) (66.46.21.156) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 16 Oct 2006 08:09:58 -0700 Received: from localhost (unknown [127.0.0.1]) by smtp.tirawireless.com (Postfix) with ESMTP id F3410D000E for ; Mon, 16 Oct 2006 11:09:36 -0400 (EDT) Received: from smtp.tirawireless.com ([127.0.0.1]) by localhost (smtp.tirawireless.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id FG3G1HwiDP8i for ; Mon, 16 Oct 2006 11:09:30 -0400 (EDT) Received: from scooby.corp.bspark.com (gateway.tirawireless.com [66.46.41.93]) by smtp.tirawireless.com (Postfix) with ESMTP id 81C39D0018 for ; Mon, 16 Oct 2006 11:09:30 -0400 (EDT) x-mimeole: Produced By Microsoft Exchange V6.0.6249.0 content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Subject: RE: is jackrabbit Threadsafe? Date: Mon, 16 Oct 2006 11:09:30 -0400 Message-ID: <32FDE2934790A148B7760FDD7843C2790306ABFE@exchange.tirawireless.com> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: is jackrabbit Threadsafe? Thread-Index: AcbxF8NiRCR0t1JIRF608GUk//ptIQAGF3Ew From: "Qun Gu" To: X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N I have a temporary workaround in my current project that simply = synchronizing methods that need jackrabbit session. By doing this, it = can handle over 30 threads on my computer concurrently launched by = JMeter. Still need to find a better solution anyway, session pool seems = to be a good start, I guess. -----Original Message----- From: Ted Roeloffzen [mailto:ted.roeloffzen@gmail.com] Sent: Monday, October 16, 2006 7:39 AM To: users@jackrabbit.apache.org Subject: Re: is jackrabbit Threadsafe? we are planning to make a CMS using Wicket, maybe you've heard of it, = and JackRabbit. We'll start very simple, by creating a blog and expand it = later On 10/16/06, Miro Walker wrote: > > Another way to handle this is to create a pool of sessions and use > them for different request threads. You avoid the creation overhead > this way while still having per-thread sessions. > > Also worth noting that there are still some known bugs around > concurrent access to versioning operations within transactions. > Whether this will affect you depends on what you're planning to do of > course. > > m > > > On 10/16/06, Michael Neale wrote: > > 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 < > the.mindstorm.mailinglist@gmail.com> > > > > > 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>--- > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > >