It's my experience that Tomcat persists sessions by default, my ROOT.xml
doesn't have a Manager. There are a couple of things you have to worry
about if you want the sessions to be valid on restart:
1) Don't store non-serializable objects in the session. (You tend to get
big stacktraces in the logs on both shutdown and startup if you do)
2) Don't down the server for longer than the session timeout setting
(default 30mins). The sessions expire on startup if you do.
If these don't apply then I'm not sure what's wrong because 'worksforme' ;)
HTH,
Jon
Steven Job wrote:
> Ok, I don't know what is wrong. I thought I had this working before.
>
> Yet when I stop and restart Tomcat I loose my session. Even though I see
> the file being saved.
>
>
> <Context path="" docBase="ROOT" debug="0">
> <Manager className="
org.apache.catalina.session.PersistentManager"
> debug="0"
> saveOnRestart="true"
> maxActiveSessions="-1"
> minIdleSwap="-1"
> maxIdleSwap="-1"
> maxIdleBackup="-1">
> <Store className="
org.apache.catalina.session.FileStore"
> directory="/root/sessions" />
> </Manager>
> </Context>
>
>
> Can someone shed some light on this and let me know what is wrong with my
> configuration?
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@(protected)
> For additional commands, e-mail: tomcat-user-help@(protected)
>
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@(protected)
For additional commands, e-mail: tomcat-user-help@(protected)