On Jul 28, 2005, at 3:54 PM, [EMAIL PROTECTED] wrote:
1)  How to trigger a reload()?  Via a request to the servlet or some
kind of API call, or a process that is "watching" the config files.
Could maybe work like JSP, when you ask for a definition, the factory
will look to see if it has changed.


Ya, I kind of had the same question. I guess that we are free to fire up our own threads in the servlet container. Maybe a thread object could be placed in application scope that spins up and looks at the File? I've not implemented a servlet container. I suspect there are some folks listening that have...

If so that would be a change from previous versions of J2EE -- at least my understanding is that an application spawning threads is considered bad practice.

The JSP-like approach would be more intrusive. The DefinitionsFactory would have to store the modified date of a definition and the getDefinition() method would have to check the date against the date of the file and reload if necessary.

3) Should the enable/disable feature be through a context parameter or
some other method?


How about an init parameter in the web deployment descriptor?

That's what I meant :-)

Greg


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

Reply via email to