Return-Path: Delivered-To: apmail-jackrabbit-users-archive@locus.apache.org Received: (qmail 80016 invoked from network); 26 Nov 2007 18:38:36 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 26 Nov 2007 18:38:36 -0000 Received: (qmail 72211 invoked by uid 500); 26 Nov 2007 18:38:23 -0000 Delivered-To: apmail-jackrabbit-users-archive@jackrabbit.apache.org Received: (qmail 72184 invoked by uid 500); 26 Nov 2007 18:38:23 -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 72175 invoked by uid 99); 26 Nov 2007 18:38:23 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 26 Nov 2007 10:38:23 -0800 X-ASF-Spam-Status: No, hits=4.0 required=10.0 tests=DNS_FROM_OPENWHOIS,FORGED_YAHOO_RCVD,SPF_HELO_PASS,SPF_PASS,WHOIS_MYPRIVREG X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of lists@nabble.com designates 216.139.236.158 as permitted sender) Received: from [216.139.236.158] (HELO kuber.nabble.com) (216.139.236.158) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 26 Nov 2007 18:38:24 +0000 Received: from isper.nabble.com ([192.168.236.156]) by kuber.nabble.com with esmtp (Exim 4.63) (envelope-from ) id 1IwiqI-0001cO-MW for users@jackrabbit.apache.org; Mon, 26 Nov 2007 10:38:02 -0800 Message-ID: <13954710.post@talk.nabble.com> Date: Mon, 26 Nov 2007 10:38:02 -0800 (PST) From: qcfireball To: users@jackrabbit.apache.org Subject: Re: Sharing a Session or a Session per web user In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Nabble-From: qcfireball@yahoo.com References: <1195661752.11908.7.camel@antares> <13950210.post@talk.nabble.com> X-Virus-Checked: Checked by ClamAV on apache.org Running a test of a thousand iterations, creating and maintaining a referen= ce to 1 Session per iteration, I found that a Session incurs approximately a 864 byte load. Very very small, definately an insignificant load. Creatin= g many Session Objects will not be a problem. Alexandru Popescu =E2=98=80 wrote: >=20 > On Nov 26, 2007 4:27 PM, qcfireball wrote: >> >> I did a small test - 2 Threads each retrieving a property from different >> Nodes 100 times each. >> This executed without Exception. I may try a more elaborate test than >> this. >> >> Question: what is the maximum number of concurrent read-only uses of a >> Session would you recommend? >> 10 / 50 / 100 / no limit? >> >=20 > I don't think anyone can tell you this. It depends on a lot of > specific details. You can start looking at the implementation and > figure out the data structures used. Then you can search for various > performance tests of those. Still, in the end it will be up to your VM > and OS how good or bad those will behave. >=20 > ./alex > -- > .w( the_mindstorm )p. >=20 >> >> >> Alexandru Popescu =E2=98=80 wrote: >> > >> > Paco, as you probably know by now, jcr Sessions are not thread safe, >> > and so exposing them in a multi-thread environment may become a risk >> > for the data. I am not sure how your application is behaving and how >> > do you protect against thread contention at the session level, so it >> > is kind of hard to give an advise. What I can share is the fact that >> > in a read-only mode you can probably share a session between different >> > threads. >> > >> > ./alex >> > -- >> > .w( the_mindstorm )p. >> > >> > >> > On Nov 21, 2007 6:15 PM, Paco Avila wrote: >> >> Hi >> >> >> >> Our application using Jackrabbit is an Document Management System >> >> (OpenKM). Actually we prevent an user log into the web aplication >> twice, >> >> so there is only one Jackrabbit Session per web user. >> >> >> >> But we also expose several methods via WebServices and here is the >> >> problem: if an user is logged into the web application, the same user >> >> can't user WebService API because he is already logged into the >> system. >> >> >> >> I have think two options: >> >> >> >> - Reuse an existing Jackrabbit Session for both web user and the sam= e >> >> ws api user. PROBLEM: is it a good practice for Jackrabbit? >> >> >> >> - The web user hace one JR Session and the ws api user have another >> >> session. PROBLEM: Every web user need another WS user and this can be >> >> hard to manage because we need to set permissions for both users and >> >> should be the same permissions for them. >> >> >> >> Any tip? >> >> >> >> >> >> -- >> >> GIT CONSULTORS >> >> >> >> www.git.es >> >> >> >> Tel: +34 971 498 310 >> >> Fax: +34 971 496 189 >> >> >> >> C/ Francesc Rover, 2B. >> >> 07003 Palma de Mallorca =E2=80=93 Illes Balears (Espa=C3=B1a) >> >> >> >> >> >> >> > >> > >> >> -- >> View this message in context: >> http://www.nabble.com/Sharing-a-Session-or-a-Session-per-web-user-tf4851= 166.html#a13950210 >> Sent from the Jackrabbit - Users mailing list archive at Nabble.com. >> >> >=20 >=20 --=20 View this message in context: http://www.nabble.com/Sharing-a-Session-or-a-= Session-per-web-user-tf4851166.html#a13954710 Sent from the Jackrabbit - Users mailing list archive at Nabble.com.