jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Nuescheler <david.nuesche...@gmail.com>
Subject Re: lifetime of the session object
Date Sun, 21 Aug 2005 16:03:03 GMT
hi magnus,

my advice would be to only keep a session spanning multiple
http requests if your application is relying on session scoped 
modifications such as session scoped locks or displaying transient 
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 
"anonymous" session that is read-only to begin with then
it may be worth keeping a single session instance around as 
sort of a poor man's "session pooling". 
i am not sure if it is worth the effort though, since session 
creation should be reasonably fast in jackrabbit.

regards,
david

On 8/21/05, Magnus Grimsell <magnus@grimsell.com> wrote:
> Hi,
> 
> 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?
> 
> Thanks
> /Magnus Grimsell
> 


-- 
----------------------------------------------------------------------
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

Mime
View raw message