Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Tomcat 7: avoid automatic restart when change context.xml

Tags:

java

tomcat

When I edit the global conf/context.xml of my Tomcat 7.0.34 the server seems to restart automatically. I want to avoid the AUTOMATIC restart, the server should run with the "old" configuration until I restart it by hand.

So my question is: How to avoid the AUTOMATIC restart when I change the global conf/context.xml in Tomcat 7.0.34?

like image 757
Ralph Avatar asked Feb 12 '13 08:02

Ralph


1 Answers

According to Automatic Application Deployment, the application will be redeployed when changes are detected

Updating a context file will trigger an undeploy of the application with the removal of any associated work directory. Any current user sessions will not be persisted. The application will be redeployed the next time the auto deployer checks for changes.

To stop this functionality the autodeploy flag must be set to false:

This flag value indicates if Tomcat should check periodically for new or updated web applications while Tomcat is running. If true, Tomcat periodically checks the appBase and $CATALINA_BASE/conf/[engine_name]/[host_name] directories and deploys any new web applications or context XML descriptors found.

Alternatively, you can set the deployIgnore flag with a regular expression defining which applications should be ignored from automatic deployment

like image 59
epoch Avatar answered Oct 06 '22 09:10

epoch