[ https://issues.apache.org/jira/browse/WICKET-3625?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13021450#comment-13021450 ]
Martijn Dashorst commented on WICKET-3625: ------------------------------------------ The idea is to make the listeners work in similar fashion to Servlet Filters. See attached quickstart for the expected behavior > Order of IRequestCycleListener invocations > ------------------------------------------ > > Key: WICKET-3625 > URL: https://issues.apache.org/jira/browse/WICKET-3625 > Project: Wicket > Issue Type: Improvement > Components: wicket-core > Affects Versions: 1.5-RC3 > Reporter: Emond Papegaaij > Attachments: myproject.zip > > > 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 -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira