Description
The way event methods on the IRequestCycleListener are invoked, makes it difficult to implement a 'setup-teardown' listener. It would be nice if IRequestCycleListeners are invoked from front to end for 'setup'-methods and from end to front for 'teardown'-methods. For example, in our application, we setup a user context at the start of a request and tear it down at the end. We want this listener to be the first to be invoked for 'onBeginRequest' and the last for 'onEndRequest'. I think this will be quite common for other implementations of IRequestCycleListener as well.
I propose for the following methods the listeners are executed from first to last: onBeginRequest, onException, onRequestHandlerScheduled
and from last to first for: onEndRequest, onDetach, onRequestHandlerResolved, onExceptionRequestHandlerResolved