| Author |
Changing server.xml without restarting Tomcat
|
som chatterjee
Greenhorn
Joined: Oct 08, 2008
Posts: 2
|
|
Hi all,
I am using Tomcat clustering (with static membership) in one of my assignments. When a new instance gets added to the cluster, one static member tag should get added to server.xml of each instance of the cluster. But changing the server.xml means restarting the server - so if I have 10 instances in the cluster and I try to add a new one, we'll have to restart 10 servers because of change in their server.xml - which is not desired.
Is there any way out to reflect the change of server.xml without restarting the server? I am using Tomcat version 6.0.36.
(Dynamic membership cannot be added because of some restrictions)
Thanks in advanced,
Som
|
 |
Tim Holloway
Saloon Keeper
Joined: Jun 25, 2001
Posts: 14491
|
|
Welcome to the JavaRanch, Som!
The server.xml file is digested at Tomcat startup. To get Tomcat to see any changes, Tomcat must be restarted. This is why Context elements in server.xml are discouraged - updating a webapp (Context) when it's in server.xml cannot be done on the fly.
If you cannot support dynamic clustering, you're going to have to cycle each Tomcat. Although at least, since it's a cluster, that means that you only have the annoyance of cycling Tomcats and not of having the entire service down.
|
Customer surveys are for companies who didn't pay proper attention to begin with.
|
 |
 |
|
|
subject: Changing server.xml without restarting Tomcat
|
|
|