| Author |
Replacing property file (caching a property file)
|
Inshar Anas
Greenhorn
Joined: Apr 02, 2009
Posts: 21
|
|
Hi all,
i need to find a replacement for the *.property file.
because, if we update a property file, we need to restart the server. So, i need to find a method, where i can change the property values without restarting the server.
I am using java 1.4 and the server is web sphere.
need help from you all!
thanks!
|
 |
Paul Sturrock
Bartender
Joined: Apr 14, 2004
Posts: 10336
|
|
because, if we update a property file, we need to restart the server
Why? Could you not just poll the properties file for changes?
|
JavaRanch FAQ HowToAskQuestionsOnJavaRanch
|
 |
Inshar Anas
Greenhorn
Joined: Apr 02, 2009
Posts: 21
|
|
|
what do you mean?
|
 |
Paul Sturrock
Bartender
Joined: Apr 14, 2004
Posts: 10336
|
|
|
Write a timer task (or something simmilar) that checks the porperties files periodically and reloads them if they've been updated (perhaps by keeping track of the modification dates or something).
|
 |
Karthik Shiraly
Ranch Hand
Joined: Apr 04, 2009
Posts: 364
|
|
Hi,
Another option is to use the Apache Commons Configurations library. It supports runtime reloading of property files, and even modification of property files.
|
 |
Inshar Anas
Greenhorn
Joined: Apr 02, 2009
Posts: 21
|
|
Thank you very much Paul and Karthik!!! Your information helped me a lot!
|
 |
 |
|
|
subject: Replacing property file (caching a property file)
|
|
|