Return-Path: Delivered-To: apmail-incubator-jackrabbit-dev-archive@www.apache.org Received: (qmail 79734 invoked from network); 21 Aug 2005 16:03:05 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 21 Aug 2005 16:03:05 -0000 Received: (qmail 64878 invoked by uid 500); 21 Aug 2005 16:03:05 -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 64865 invoked by uid 99); 21 Aug 2005 16:03:04 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 21 Aug 2005 09:03:04 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=RCVD_BY_IP,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of david.nuescheler@gmail.com designates 64.233.170.194 as permitted sender) Received: from [64.233.170.194] (HELO rproxy.gmail.com) (64.233.170.194) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 21 Aug 2005 09:03:23 -0700 Received: by rproxy.gmail.com with SMTP id y7so945491rne for ; Sun, 21 Aug 2005 09:03:03 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=g9ggQNggT+aYMCaFQd6kDCeRbUuZd9TE3sJ0lpLUzrQx4lZDS5SqnpM1S/ShgY2CrmLOhlMb7kXhM8cMFJ5VDS840zCBZ0uIl/XLGz+H0PrF4mbBAG+D3lFjnsQdc4SIAySh3hRbIrglXCta7ZP5T3Xj0AjyixFxFKEfREDwtyo= Received: by 10.38.181.6 with SMTP id d6mr396601rnf; Sun, 21 Aug 2005 09:03:03 -0700 (PDT) Received: by 10.38.11.80 with HTTP; Sun, 21 Aug 2005 09:03:03 -0700 (PDT) Message-ID: Date: Sun, 21 Aug 2005 18:03:03 +0200 From: David Nuescheler Reply-To: david.nuescheler@day.com To: jackrabbit-dev@incubator.apache.org Subject: Re: lifetime of the session object In-Reply-To: <4308A536.9030309@grimsell.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <4308A536.9030309@grimsell.com> X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N hi magnus, my advice would be to only keep a session spanning multiple http requests if your application is relying on session scoped=20 modifications such as session scoped locks or displaying transient=20 modification to the user before saving. otherwise i would stay away from an http session in general and therefore reacquire a new session with every request. on the other hand for example if you have something like an=20 "anonymous" session that is read-only to begin with then it may be worth keeping a single session instance around as=20 sort of a poor man's "session pooling".=20 i am not sure if it is worth the effort though, since session=20 creation should be reasonably fast in jackrabbit. regards, david On 8/21/05, Magnus Grimsell wrote: > Hi, >=20 > I've just started using jackrabbit for a project and I have newbie > question. Since there is no > users mailing list I pop the question here. Hope thats ok. > What is the supposed lifetime of a session object? The project I'm > working on > is a web application on top of jackrabbit. Should the jcr session span > over the HTTP session > or should I rather make a new Session for each request? >=20 > Thanks > /Magnus Grimsell >=20 --=20 ---------------------------------------------------------------------- http://jcr.day.com JSR-170 in Action! ---------------------------------------< david.nuescheler@day.com >--- This message is a private communication. If you are not the intended recipient, please do not read, copy, or use it, and do not disclose it to others. Please notify the sender of the delivery error by replying to this message, and then delete it from your system. Thank you. The sender does not assume any liability for timely, trouble free, complete, virus free, secure, error free or uninterrupted arrival of this e-mail. For verification please request a hard copy version. mailto:david.nuescheler@day.com http://www.day.com David Nuescheler Chief Technology Officer Day Software AG Barfuesserplatz 6 / Postfach 4001 Basel Switzerland T 41 61 226 98 98 F 41 61 226 98 97