Tomcat Deploys War Without Session Loss

I am working on deploying Java applications. I have a requirement, as we will continue to deploy new versions of the war file in the tomcat application. My requirement is when the user is logged in and when I deploy a new war in the tomcat web application, it cancels the old war and I lose the session.

I have to show the new version of the user without losing his session.

When I googled, I learned about tomcat parallel deployment. But my manager asks not to follow this decision and ask to see any other solution. But I had no other solution.

Is there a way in tomcat to store sessions?

What about other servers like jboss, weblogic or websphere?

+4
source share
1 answer

As mentioned in the gas, see http://tomcat.apache.org/tomcat-7.0-doc/config/manager.html#Persistence_Across_Restarts

Configure <Manager>with some explicit path name. By default, sessions are stored in the working directory of the web application. The working directory is deleted when the web application is not deployed.

If you configured the attribute to pathnameexplicitly point to some directory that is not deleted during deployment, the sessions will survive.

Please note that you can use $ {catalina.base} and other system properties in your configuration.

+6
source

All Articles