Interestingly, after I moved the <context><Manager> configuration to the context.xml of the application where I wanted this functionality, its working again, however I still see multiple attempts to persist sessions.
-----Original Message----- From: Filip Hanik - Dev Lists [mailto:devli...@hanik.com] did any data actually get written to /shared/httpd/tomcat_sessions It could be that there is a permission problem best Filip On 4/8/2011 1:20 PM, Aggarwal, Ajay wrote: > I enabled logging, created 1 session and restarted tomcat. This is what > I see in the logs. Is there anything suspicious here? > > Why are there multiple attempts to persist sessions? Is it one per > application? One thing that has changed is now I have multiple > applications. And the path "/shared/httpd/tomcat_sessions" for > persistence is configured in {TOMCAT_BASE}/conf/context.xml, which means > it applies to all apps. So perhaps my 1st app is persisting the session > ok. But 2nd app that has no sessions is overriding the session > persistence file. > > I will try by moving this configuration to the application where I > really need this functionality. > > Meanwhile can anybody, familiar with this code, validate my theory? > > --- while stopping---- > DEBUG [main] 2011-04-08 15:05:37,352 > org.apache.catalina.session.ManagerBase - Stopping > DEBUG [main] 2011-04-08 15:05:37,352 > org.apache.catalina.session.ManagerBase - Unloading persisted sessions > DEBUG [main] 2011-04-08 15:05:37,352 > org.apache.catalina.session.ManagerBase - Saving persisted sessions to > /shared/httpd/tomcat_sessions > DEBUG [main] 2011-04-08 15:05:37,353 > org.apache.catalina.session.ManagerBase - Unloading 1 sessions > DEBUG [main] 2011-04-08 15:05:37,359 > org.apache.catalina.session.ManagerBase - Expiring 1 persisted sessions > DEBUG [main] 2011-04-08 15:05:37,359 > org.apache.catalina.session.ManagerBase - Unloading complete > DEBUG [main] 2011-04-08 15:05:37,590 > org.apache.catalina.session.ManagerBase - Stopping > DEBUG [main] 2011-04-08 15:05:37,590 > org.apache.catalina.session.ManagerBase - Unloading persisted sessions > DEBUG [main] 2011-04-08 15:05:37,590 > org.apache.catalina.session.ManagerBase - Saving persisted sessions to > /shared/httpd/tomcat_sessions > DEBUG [main] 2011-04-08 15:05:37,590 > org.apache.catalina.session.ManagerBase - Unloading 0 sessions > DEBUG [main] 2011-04-08 15:05:37,590 > org.apache.catalina.session.ManagerBase - Expiring 0 persisted sessions > DEBUG [main] 2011-04-08 15:05:37,590 > org.apache.catalina.session.ManagerBase - Unloading complete > DEBUG [main] 2011-04-08 15:05:37,597 > org.apache.catalina.session.ManagerBase - Stopping > > --- restarting ---- > DEBUG [main] 2011-04-08 15:05:40,463 > org.apache.catalina.session.ManagerBase - Start: Loading persisted > sessions > DEBUG [main] 2011-04-08 15:05:40,464 > org.apache.catalina.session.ManagerBase - Loading persisted sessions > from /shared/httpd/tomcat_sessions > DEBUG [main] 2011-04-08 15:05:40,464 > org.apache.catalina.session.ManagerBase - Creating custom object input > stream for class loader > DEBUG [main] 2011-04-08 15:05:40,470 > org.apache.catalina.session.ManagerBase - Loading 0 persisted sessions > > -----Original Message----- > From: Aggarwal, Ajay [mailto:ajay.aggar...@stratus.com] > > That's the first thing I thought too. However I don't see anything in > the logs to indicate this. Also when sessionWillPassivate() is called I > am logging all session attributes to make sure there is nothing non > serializable there. > > > -----Original Message----- > From: Caldarale, Charles R [mailto:chuck.caldar...@unisys.com] > >> From: Aggarwal, Ajay [mailto:ajay.aggar...@stratus.com] >> Subject: HttpSessionActivationListener sessionDidActivate not getting > called > >> Lately I am seeing that sessionDidActivate() does not get called upon >> tomcat restart, even though sessionWillPassivate() is called. Also > even >> though sessionWillPassivate() is called, I don't see the session >> persistence file being created (the one that I specified in >> conf/context.xml<context><Manager pathname="xxx"> ). > Perhaps you are now storing something in the session that is not > serializable. I would expect some log entries indicating such if that's > the case. > > - Chuck > > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org