Thanks to any one that can fill in my missing knowledge.
What is the proper way to reload altered I18N/L10N property files without restarting the app or app server.
We have a custom class loader that is loading a couple of localization property files that do not live within the
tomcat directory structure at server start. It works well. The customer does not like having to restart a server every time they change the property files. They want the app to either update itself or be able to tell the app to reread the property files.
Running tomcat 5.5.28,
Struts 2( 2.1.8), xwork-core 2.1.6 (2.1.8 has a reloadable class loader), JSON plugin, and a dash of Spring, and a heavy dose of our own Swiss army knife utilities.
Options I have found so far
1) cannot do it. have to reboot.
2) can only reload property files from the tomcat console/manager app.
3) can do it but have to throw out classloader. (tried it, does not work for me) I have a controller class, it will clear out the property files but does not load up new ones. Even if I logged out and log back in the changes do not appear.
4) write a re-loadable classloader. If I could figure out how to get the class loader from the system the above try block would simply be .
5) Javadoc indicates all that I need to is tell LocalizedTextUtil that it has a new addDefaultResourceBundle() . but no one on the internet says this will work. It did not work for me
6)Have the
servlet context get the resource as a stream AGAIAN. But when I do that, all I get is a null pointer error in p.load. I am not getting a file not found, and another app is able to read the property files at the path used here. Why can the server read the file on startup, but not after it is running?