Close
jGuru Forums
Posted By: Finn_MacCool Posted On: Tuesday, August 24, 2004 06:24 PM
I have a java program that reads in a properties file when it's first run. This properties file has rules that determine how many threads are created with listeners. However we are constantly changing the propties files, adding rules, etc and everytime we do we have to stop and restart the program. I need a way to have a thread spinoff and constantly check the properties file, if it's lastModifiedDate is later than the previous lastModifiedDate than it reloads it otherwise goes back to sleep. I've looked around the net doing searches and can't seem to find anyone doing something similar - is it possible? I'm also thinking that this will present a new problem in that once it reloads the file it will create new threads for all of the rules that were previously created if they haven't been removed from the properties file. Is there a way around this too?
Re: Automatically reload file
Posted By: Cristiano_Sadun Posted On: Wednesday, August 25, 2004 02:46 AM