On Thu, Jan 21, 2010 at 10:41 AM, John Tranier <[email protected]> wrote: > Hi everybody, > > I would like to have advices about how I should handle JCR sessions in my > application context. > I have read the guide on the wiki, but I'm not clear about what is called > "transient mods", if my application fall into it, and finally how to deal > with that case. >
I can provide a little insight. The Jackrabbit architecture makes a distiniction between the transient layer and the persistent layer. The transient layer is where local changes in your session are; they haven't been persisted to the persistent layer. The persistent layer is the layer implemented by the persistence manager; pm's are the module's responsible for writing to disk or db or whatever. I believe the transient layer is roughly equal to the Session object, and the persistent layer is roughly equal to the persistence manager object. Hope that helps a bit. > I am using a Jackrabbit repository to handle personal storage space for > users of my web application. I've defined personalized access for each > users, so it's about personalized accounts. > > Up to now, I've handled sessions by creating a session for each http > request. But since my application makes use of AJAX to display the tree view > of the personal space of a user, a lot of requests may be launched in > sequence, causing a lot of login/logout... > > Would it be a better practice to use a http session scope instead of request > scope, with eventually a TTL after which a session would be closed? > > Thanks in advance, > John > > >
