One of the tomcat server in our project is restarting automatically when ever we edit the context.xml file. We have installed tomcat from redhat inbuilt package. Is this known issue or any body have come across similar issue in past?
Thanks for your reply. My understanding is we need to restart the server manually if there are changes in server.xml or context.xml(Please correct me if i am wrong). I am not able to understand why is it happening automatically?
It doesn't "restart the server". Not unless you're running it under an IDE which is usurping Tomcat's normal functions.
It's restarting the webapp. Other webapps in the Tomcat server (and the Tomcat server itself) should remain unaffected.
This is basically Tomcat's "hot deploy" feature at work. Changing classfiles in the webapp or changing the deployment descriptor will cause the scanner in Tomcat to detect the change and redeploy (thus restarting) the webapp. At least unless you switch off the hot deploy feature.
Customer surveys are for companies who didn't pay proper attention to begin with.
Joined: Dec 14, 2006
Yes. I can accept your point. We are not allowing the hot deployment and not making any changes in the web application level. We are changing the configuration file at Tomcat server level. We observing the behavior of restarting the Tomcat server.
I forgot to mention. The context XML file (Context element) is the Deployment Descriptor. Although originally it was embedded in the Tomcat configuration file (server.xml), that mode of operation has been discouraged since Tomcat 4.
And someday I hope that the people who do the Eclipse WST plugin will get the hint and do likewise.
Changing server.xml wouldn't trigger an automatic restart, although it also wouldn't dynamically detect deployment descriptor changes for the same reason (which is WHY that mode is discouraged).
However, changing the deployment descriptor itself would restart the app. That's regardless of whether you defined an external DD (conf/Catalina/localhost/xxxxx.xml) or internal (META-INF/context.xml). And actually, I'm not sure but what changing the deployment descriptor wouldn't be considered as grounds for restart even if hot-deploy is turned off, now that I think about it. Especially since it's well-known that Tomcat thinks it owns the external DDs and will actually delete them right out from under you if it decides it doesn't like them.
Joined: Dec 14, 2006
Thanks all for your valuable knowledge sharing.
subject: Restarting issue when we edit context.xml