tomcat-users mailing list archives

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

    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 
continue..
          (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.

Solutions:

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 -->
                <Manager
                        className="org.apache.catalina.session.PersistentManager"
                        debug="0"
                        saveOnRestart="false">  <!-- THIS IS THE IMPORTANT PART -->
                        <Store className="org.apache.catalina.session.FileStore"/>
                </Manager>

   Is that still the accepted technique..???



Or...

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..)

John...


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Mime
View raw message