> always), our idea is to use Magnolia as a proxy for the app: if the > content is already migrated or inserted directly in Magnolia, Magnolia > will serve it, if it's not available in Magnolia then system should fall
There are various road blocks you might (or not) hit with this approach. Some I can think of from top of my head just now: - cache. There would be virtually no way for Magnolia to know if your fall back content is dynamic or not and it will most likely end up in the Magnolia cache even if not completely static. - Gzip. Gzip filter/cache assume they are the only masters when deciding when to compress the response and when not. They divide this responsibility based on whether dealing with cached/cachable request or not. They will have no way of knowing if response stream comes back already zipped. - Security. Context with all the details is in thread local variable. Exposing it down the chain when everything is set, but will be handled by filter/servlet configured outside of Magnolia will mean that any security issue of that legacy application will allow attacker to exploit Magnolia. - Wrappers. When passing request/response down the stream, some of the filters wrap real request/response and unwrap them on the way back. Your legacy app might not be so happy with the request/response that behave differently in certain situations in order to allow filter to do its work. ... > My goal is to have the legacy as a fallback, so the question is: is > there a smart and quick (computationally speaking) way to check if a > request will be served correctly (i.e. not a 404) by rendering filter > without actually going to render it? Maybe it's there and I simply > missed it... > If such a way is possible I can easily write a filter/bypass that before > going to the rendering filter switches to the legacy. If this is what you absolutely have to do and you are willing to solve out all the other issues, just replace RenderingFilter with your own which will do the same as the default one does and on top of that will continue chain execution when either template is not defined or resource can't be found (be sure to not call sendError() from handleResourceRequest() method. HTH, Jan ---------------------------------------------------------------- For list details see http://www.magnolia-cms.com/home/community/mailing-lists.html To unsubscribe, E-mail to: <[email protected]> ----------------------------------------------------------------
