jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Magnus Grimsell <mag...@grimsell.com>
Subject Re: lifetime of the session object
Date Sun, 21 Aug 2005 16:18:48 GMT
hi david,

Thanks for the reply! Then I'll stick to have a new session per request.
Thats makes the session.logout a lot easier to handle.

Magnus Grimsell

David Nuescheler wrote:

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

View raw message