Hey yall,
I have an interesting requirement…and was wondering if you guys can think of a best way to implement this.
I have a auditTransaction service, which publishes an incoming document to the broker after checking some properties in a config file. The service which reads the config params is cached (lets call this serv2 which checks the properties). The publish to broker can be turned on or off from the config props file. Now, I want to make serv2 do the following.
- Somehow monitor the config params file.
- Reload the file everytime someone modifies it and refresh the cache.
Currently, I have scheduled this service to read the config file every 15 minutes and load any changes to the file. If the change to the properties file is made between the run interval, the service has to be manually run to load the changes. The problem with this is, sometimes the file will not change for days and, there is no need to check/reload the file every 15 mins. Reload is required only when the file changes.
Am I overthinking and complicating something that is very simple?
Thoughts?
-Zafar.
#Flow-and-Java-services#webMethods#Integration-Server-and-ESB