I've tried configuring my context to use the
org.apache.catalina.session.PersistentManager and a FileStore to save
active sessions to disk so I can restart Tomcat without losing active
sessions. It works. As long as everything in the session is serializable
it will all get loaded when Tomcat starts up again. Here's what's weird.
Everything is normal up until I restart Tomcat. Then, my sessions seem
to get duplicated about once per minute. They have a new session ID, but
I know they are duplicates. I can log in to my application once, which
creates some objects and puts them in the session. Then I restart
Tomcat, the session gets saved to disk and then read back again. Then,
my one session will magically start to replicate itself and Tomcat's
memory usage will keep growing and growing.
I'm using the default values that are commented out in the server.xml
file. I might have had debug at 1.
<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"/>
</Manager>
This behavior only happens when I try using the PersistentManager. Is
this a bug? It sure looks like one. It happens on Tomcat 4.0 and 4.1.10.
I'm using a class I wrote that implements SessionActivationListener to
keep track of all the active sessions and view their contents.
Anyone have any clues?? Thanks, Jon Tyree