On Tue, Jan 25, 2011 at 1:35 PM, Adib <amsl...@gmail.com> wrote:

> Thanks for the link that was useful. So the key idea to understand is
> that there is a background thread that does all the cleanup and this
> background thread executes on a timer not on very request arriving a
> the server.
>
> I am surprised at the limitations of the Persistent Manager it's that
> it should be an easy thing to backup and load sessions on every
> request. Is there something about how tomcat is implemented that makes
> implementing persistence on load and save difficult?
>
Not really. I'd assume that there were specific requirements that lead to
this solution (how PersistentManager is implemented). Saving/loading
sessions per request from/to a datastore can be done using a valve.

I just just implemented what you're looking for with the
http://code.google.com/p/memcached-session-manager/ to support non-sticky
sessions (to be released in a few days).
I chose memcached as backend to be really scalable, as IMHO with a database
this is expensive / hard to achieve.

AFAIK Reinwald is just checking out do achieve what you want with
PersistentManager:
http://old.nabble.com/Why-cant-the-the-classes-%28in-the-jars%29-places-in-Tomcat-lib--see-the-classes-from-the-webapp-WEB-INF-lib.-td30713002.html#a30720080

Cheers,
Martin



>
> Cheers
> Adib
>
> On Tue, Jan 25, 2011 at 4:24 AM, Reinwald Warapen
> <reinwal...@directi.com> wrote:
> > On 1/25/2011 5:02 PM, Adib wrote:
> >>
> >> Hi,
> >>
> >> I am trying to understand the settings on the persistent session
> >> manager on tomcat 6 and 7. It seems that the persistent session
> >> manager is primarily meant for the purpose of swapping IDLE sessions
> >> to persistent storage and then hope that they expire, I can see the
> >> value of this given that many users abandon sites without logging out.
> >> It also seems that the persisent manager is not designed to persist
> >> every session at the end of every request so that at the start of
> >> every request the session is read from the store and the end of the
> >> request the session is written to store, is this understanding
> >> correct.
> >
> >
> http://reinwaldwarapen.com/2011/01/17/storing-and-sharing-sessions-among-standalone-tomcat-instances/
> >>
> >> I have also been puzzling over the meanings of maxIdleSwap vs.
> >> maxIdleBackup not sure why these two settings exist or what is
> >> difference between them and the practical use case for them? It is
> >> clear to me what the idle session is but  what is meant by backup and
> >> how is it different than a swap?
> >>
> >> Thanks
> >> Adib
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> >> For additional commands, e-mail: users-h...@tomcat.apache.org
> >>
> >>
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> > For additional commands, e-mail: users-h...@tomcat.apache.org
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>


-- 
Martin Grotzke
http://www.javakaffee.de/blog/

Reply via email to