No need for restart tomcat after modifying metacat.properties
In Metacat, if user modified metacat.properties, the modification will be effect after restarting tomcat. This process cause lots of server down time. We should avoid this. log4j.properties is a good example. You don't need restart tomcat after changing log4j.properties
#1 Updated by Jing Tao over 12 years ago
My thought is - adding a static variable - propertiesLastModifyTime in MetacatUtil class. This variable will store the last modification time of metacat.properties file. In getOption method, there will be a statement to compare the current last modification time of metacat.properties file to the variable. If they are different, we will reload all options from metacat.properties file again.
Here is a concern: - is it proper to add a static field in MetacatUtil class? I think is fine since it is static.
Any comment and suggestion will be appreciated.
#2 Updated by ben leinfelder over 7 years ago
I don't think this is possible since the properties in metacat.properties control everything. Say we changed the DB it was pointing to. How do the currently running queries end and the new connections in the new connection pool get used? How could this be seamless? I don't think it can. There are properties that could be reloaded with minimal impact and I believe M Daigle started thinking about this with his "reloadable" property service class, but I don't think it was implemented, at least not fully.
We can revisit this since it would be nice to change some properties on the fly.