Uploaded image for project: 'Wicket'
  1. Wicket
  2. WICKET-3625

Order of IRequestCycleListener invocations

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.5-RC3
    • 1.5-RC4
    • wicket
    • None

    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

      Attachments

        1. myproject.zip
          23 kB
          Martijn Dashorst
        2. fix-detach-order.diff
          0.7 kB
          Emond Papegaaij

        Activity

          People

            dashorst Martijn Dashorst
            papegaaij Emond Papegaaij
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: