tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "John B. Moore" <>
Subject Tomcat 4.1.24 Session Persistance between restarts ???
Date Sat, 29 Nov 2003 00:34:16 GMT

    Here is the scenario....

1) User logs in and begins a session along with loading some session 
objects (worker classes)
2) Tomcat is shut down and restarted
3)  Same user clicks next "button" on current JSP page (user did not 
know tomcat was restarted)
      a) Session isNew() reports "false" so code thinks all is well to 
          (Session was  persisted.)
      b) But stored objects in session are not available (null)
           NullPointerException thrown when accessing an object that 
"should" be there if the entire session was persisted for that user.


A) I found the following post to turn off the default "persistance of 
the session"

                <!-- Change the manager to PersistentManager to
                                prevent caching of session data -->
                        saveOnRestart="false">  <!-- THIS IS THE IMPORTANT PART -->
                        <Store className="org.apache.catalina.session.FileStore"/>

   Is that still the accepted technique..???


B) Not loose the stored session objects between restarts, so as to avoid 
the NullPointerException.. I don't mind that the session is persisted, 
but the entire session must be persisted and that seems to NOT be the case.
     Is that possible????
     Does that require further "configuration"?

I have search for this last info, but so far have not looked under the 
right rock..

Slap up the side of the head appreciated..<G> (be gentle..)


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message