Leo Simons wrote:

Robert McIntosh wrote:

My first thought it to have a Monitor component watch the config file(s) for changes and then follow this process:

1. read in the configs
2. see if the config for a particular component has changed (see proposal below)
3. if it has, then initiate a reconfigure. This may require doing a suspend, stop, etc. first (correct?)
3a. Reconfigure the service, then 'restart' it.
3b. If the service doesn't implement reconfigure, create a new one and replace the old one


the current apps I know use 3b) all the time. Works pretty well :D

Do you do this with a custom container??




Sound about right?


workable, at least. "right" depends on your app, so I can't comment :D

On the proposal, to make this happen for the config, I'm thinking of implementing the equals() method on the default configuration object and have it do a deep equals check.


if you know you'll always be working with config files, it is probably best to simply monitor those files for changes (ie poll modification dates).

By doing the equals() route, I wanted to make sure that the config for a particular service did change. I didn't want to start/stop a service just because someone added comments to the file or something like that. Also, I don't have one file per service and I don't want to reconfigure everything, just the service that changed. The one big file is partially legacy (coming from ECM) and also partially due to customer requests. I do plan to support multiple config files though, and do some kind of merging, like what Keel does.




This would probably mean having an equals() method exposed in the Configuraiton interface as well, no?


uhm, equals() in in java.lang.Object, so it doesn't need to be in any interface. Or am I missing something?

Your right :-) Dumb statement on my part...


- Robert



cheers,

- Leo



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to