Front Controller Pattern

I'm going to implement the front controller pattern. As it is implemented in the blueprints (Pet Store), requestmappings.xml and screendefinitions.xml are only read upon start up. Thus, the web application has to be restarted to carry out changes.

I'd like the possibility to perform changes to these files without restarting the app. How should I go about? As I don't want to read the file for every request, I need some kind of cache. But this cache should have some kind of automatic updating mechanism when the files are changed.

Has anyone done something like this for large web applications?

[633 byte] By [afloom] at [2007-9-26 13:38:47]
# 1

I've used a similar approach for this (kitv.co.uk), the project not the website, which is pretty heavy weight application, interactive digital Television over IP.

My design used the command pattern (GOF 233), which is (IMHO) a better solution to implement the front controller.

I created an action/command to perform a reload, this re-initialises my request/response handlers (equivelent to the ScreenFlowManager). The re-initialise is really just an alternative wrapper as the initial load.

MartinS. at 2007-7-2 14:20:07 > top of Java-index,Other Topics,Patterns & OO Design...