Return-Path: Delivered-To: apmail-incubator-jackrabbit-dev-archive@www.apache.org Received: (qmail 46935 invoked from network); 6 Mar 2006 14:49:01 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 6 Mar 2006 14:49:01 -0000 Received: (qmail 36642 invoked by uid 500); 6 Mar 2006 14:49:38 -0000 Mailing-List: contact jackrabbit-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: jackrabbit-dev@incubator.apache.org Delivered-To: mailing list jackrabbit-dev@incubator.apache.org Received: (qmail 36491 invoked by uid 99); 6 Mar 2006 14:49:38 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 06 Mar 2006 06:49:37 -0800 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of tobias.strasser@gmail.com designates 64.233.166.182 as permitted sender) Received: from [64.233.166.182] (HELO pproxy.gmail.com) (64.233.166.182) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 06 Mar 2006 06:49:36 -0800 Received: by pproxy.gmail.com with SMTP id o67so759770pye for ; Mon, 06 Mar 2006 06:49:16 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:sender:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=XgQZOupWKQvMOdT1jG5yKxDnNoaSUTNJUPJgal/CCT5TZFJwADkKvcgqcOlOmXHGkGbs9PUtSM57wH4RDDv8QGoMU1rdHlbcCwnwrLxvwzuoE9cprmwWZI3w6xALfBsUgWHEWW8dsdo5fELQuyCgxH2csgD3AJDX3TtJO+QqNg0= Received: by 10.35.121.2 with SMTP id y2mr1173032pym; Mon, 06 Mar 2006 06:49:15 -0800 (PST) Received: by 10.35.111.8 with HTTP; Mon, 6 Mar 2006 06:49:15 -0800 (PST) Message-ID: <8be731880603060649p6dfc2dc2nb91baad4d42d981@mail.gmail.com> Date: Mon, 6 Mar 2006 15:49:15 +0100 From: "Tobias Bocanegra" Reply-To: tobias.bocanegra@day.com Sender: tobias.strasser@gmail.com To: jackrabbit-dev@incubator.apache.org Subject: Re: session lifecycle In-Reply-To: <440C3F86.5000202@systemone.at> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <440C3F86.5000202@systemone.at> X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N hi stephan JCR sessions in jackrabbit are rather heavy objects. there are several caches for Paths, ItemStates, Items, etc...some of them are shared among sessions, but some not. i would do some sort of session pooling/sharing/reuse but you need to keep in mind the following points: 1) sessions hold local state information, such as transiently modified items, namespace mappings, etc. so they *cannot* be shared among clients that do write operations. 2) sessions are *not* 100% thread safe. so any read operation must be synchronized. hope this helps, regards, toby -- -----------------------------------------< 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 >---