Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

is there a way that tomcat 7 invalidates all sessions of an application when it is reloaded manually via the management interface?

All the best, Thomas

share|improve this question
    
Was my answer helpful, Thomas? – Ochoto Aug 17 '11 at 14:05

See Standard Manager Implementation , you should set pathName to an empty string or delete SESSIONS.ser before booting.

share|improve this answer

From the Tomcat doc:

Persistence Across Restarts

Whenever Apache Tomcat is shut down normally and restarted, or when an application reload is triggered, the standard Manager implementation will attempt to serialize all currently active sessions to a disk file located via the pathname attribute. All such saved sessions will then be deserialized and activated (assuming they have not expired in the mean time) when the application reload is completed.

In order to successfully restore the state of session attributes, all such attributes MUST implement the java.io.Serializable interface. You MAY cause the Manager to enforce this restriction by including the element in your web application deployment descriptor (/WEB-INF/web.xml).

Disable Session Persistence

As documented above, every web application by default has standard manager implementation configured, and it performs session persistence across restarts. To disable this persistence feature, create a Context configuration file for your web application and add the following element there:

<Manager pathname="" />

http://tomcat.apache.org/tomcat-7.0-doc/config/manager.html#Persistence_Across_Restarts

If you don't already have a META-INF/context.xml file, you could use this one:

<Context>
  <Manager pathname="" />
</Context>
share|improve this answer
    
Welcome to ServerFault. In the future, please provide more context to your answers, as well as all relevant information from any links provided. If they go dead, your answer loses all its value. – GregL Oct 29 '15 at 13:15
    
What exactly would an example of "more context" be in this example downvoter GregL? The context is provided by reading the question before reading the answer. What additional context do you need in order to understand the answer? – Alex Ryan Oct 29 '15 at 21:12
    
The text from the section of the link you posted would probably suffice. – GregL Oct 29 '15 at 21:29

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.