Ceki,
Thanks for your comments, my comments are below.
> How about "Scout" or "ScriptScout"? A ScriptScout scouts for changes
> in configuration scripts. Scout is both a noun and a verb, so method
> names like startScouting or stopScouting make sense.
>
> I propose ScriptScout as the interface name and ScriptScoutBase as the
> base class implemented by FileScout, HTTPScout, SocketScout
> subclasses.
Hmm. Well it does make sense. How about ConfigScout, etc? I don't know if
I want to use the word "script"...
> The Thread.interrupt() method is evil. It is also absolutely useless
> except for indulging in excruciatingly complex interrupt/notify race
> conditions. Thread.interrupt() makes it unnecessarily complicated to
> write robust multi-threaded code. As you might except, log4j does not
> contain any Thread.interrupt() method calls.
>
[snip]
> Just remove the "watchdogThread.interrupt();" statement and your code
> will continue to run just as well.
I will look at the references you have included. I guess I am a little
concerned about sleeping threads not being woken up to exit the
reconfigurator sooner.
> You might want to modify the loop as follows:
>
> while(isRunning()) {
> if(reconfigurationNeeded()) {
> reconfigure();
> }
> delay();
> }
That is a good suggestion. As you will see in the next posting, the current
design lets the reconfigurator apply the delay in the
checkForReconfiguration() method. But I think an overridable method is a
better design.
I'll post the other 2 1/2 cents worth of the tour later tonight.
thanks,
-Mark
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>