Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Changing server.xml without restarting Tomcat

 
som chatterjee
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 18302
56
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic