tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <Bruno.Mell...@nokia.com>
Subject RE: Manager - STOP application fails to stop session!!!
Date Thu, 15 Jan 2004 16:29:29 GMT
SUMMARY OF PROBLEM - for future people scanning the archives: 

Needed to disable session persistence for an application.

SOLUTION:

To turn off session persistence for an application, include a Manager clause (similar to this
one) in the application context file:

    <Manager className="org.apache.catalina.session.PersistentManager"
        debug="0"
        saveOnRestart="false"
        maxActiveSessions="-1"
        minIdleSwap="-1"
        maxIdleSwap="-1"
        maxIdleBackup="-1">
        <Store className="org.apache.catalina.session.FileStore"
            directory="logs/sessions" />
     </Manager>

It does not seem to be necessary for the logs/sessions directory to actually exist.

To safely deploy an application you can use the manager webapp (http://localhost:8080/manager/html)
stop command before deploying and start command afterwards.  Or use the manager http interface
from a script or ant build, to stop, deploy, start the application.

REASON FOR DISABLING PERSISTENCE:

For an application that is stable and unchanging, and that has ONLY serializable objects in
the session, persistence is highly desirable.  Admins may stop and start the servers (provided
they are reasonably quick) without significant effect to the users.

For an application that is likely to be updated with new versions, where the list of objects
in the session may change from one version to the next, or where there are non-serializable
objects in the session, disabling session persistence is a must.

SUGGESTION FOR DEVELOPERS:

It seems silly to have to fully define the PersistentManager in order to disable it.  It would
be nice if there was a simple clause to disable session persistence for an application.

bruno

P.S.: My thanks to Yoav Shapira for helping resolve this issue, and to Steven Job for having
the opposite problem and posting his application Context, which helped me clarify my understanding.

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