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

IRequestCycleListener not notified of all executed handlers

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 8.0.0-M1
    • Fix Version/s: 8.0.0-M1
    • Component/s: wicket
    • Labels:
      None

      Description

      IRequestCycleListener#onRequestHandlerExecuted() is not called for all request handlers:

      • RenderPageRequestHandler, when it is scheduled by ListenerInterfaceRequestHandler
      • any handler replacing a handler via a RestartResponseException (the original handler is reported as being executed instead)

      RequestHandlerStack#execute(IRequestHandler) recursively calls itself for any scheduled or replacement handler, bypassing notification of any listeners in the requestCycle.

        Issue Links

          Activity

          Hide
          jira-bot ASF subversion and git services added a comment -

          Commit fa33fbb9917e093ba712c9c339c258b4fb4ff43d in wicket's branch refs/heads/WICKET-6129-scheduled-handler-notification from Sven Meier
          [ https://git-wip-us.apache.org/repos/asf?p=wicket.git;h=fa33fbb ]

          WICKET-6129 let requestcycle execute scheduled and replaced handlers

          Show
          jira-bot ASF subversion and git services added a comment - Commit fa33fbb9917e093ba712c9c339c258b4fb4ff43d in wicket's branch refs/heads/ WICKET-6129 -scheduled-handler-notification from Sven Meier [ https://git-wip-us.apache.org/repos/asf?p=wicket.git;h=fa33fbb ] WICKET-6129 let requestcycle execute scheduled and replaced handlers
          Hide
          svenmeier Sven Meier added a comment -

          On branch WICKET-6129-scheduled-handler-notification you can take a look at my proposed fix:

          • RequestCycle executes all handlers
          • RequestHandlerStack passes replacements handlers back to RequestCycle via exception
          • scheduled handlers are passed back to RequestCycle via return

          RequestHandlerStackTest is failing currently, I'll have to check what this test will do in the future.

          Show
          svenmeier Sven Meier added a comment - On branch WICKET-6129 -scheduled-handler-notification you can take a look at my proposed fix: RequestCycle executes all handlers RequestHandlerStack passes replacements handlers back to RequestCycle via exception scheduled handlers are passed back to RequestCycle via return RequestHandlerStackTest is failing currently, I'll have to check what this test will do in the future.
          Hide
          jira-bot ASF subversion and git services added a comment -

          Commit 39c0ba604ed8feba17203eef69f5658388b7a967 in wicket's branch refs/heads/WICKET-6129-scheduled-handler-notification from Sven Meier
          [ https://git-wip-us.apache.org/repos/asf?p=wicket.git;h=39c0ba6 ]

          WICKET-6129 moved test from RequestHandlerStackTest to RequestCycleListenerTest

          Show
          jira-bot ASF subversion and git services added a comment - Commit 39c0ba604ed8feba17203eef69f5658388b7a967 in wicket's branch refs/heads/ WICKET-6129 -scheduled-handler-notification from Sven Meier [ https://git-wip-us.apache.org/repos/asf?p=wicket.git;h=39c0ba6 ] WICKET-6129 moved test from RequestHandlerStackTest to RequestCycleListenerTest
          Hide
          jira-bot ASF subversion and git services added a comment -

          Commit 39da7f9d8671b49727262cf62696d8703f9dbe8f in wicket's branch refs/heads/WICKET-6129-scheduled-handler-notification from Sven Meier
          [ https://git-wip-us.apache.org/repos/asf?p=wicket.git;h=39da7f9 ]

          WICKET-6129 further simplification: catch ReplaceHandlerException in RequestCycle only

          Show
          jira-bot ASF subversion and git services added a comment - Commit 39da7f9d8671b49727262cf62696d8703f9dbe8f in wicket's branch refs/heads/ WICKET-6129 -scheduled-handler-notification from Sven Meier [ https://git-wip-us.apache.org/repos/asf?p=wicket.git;h=39da7f9 ] WICKET-6129 further simplification: catch ReplaceHandlerException in RequestCycle only
          Hide
          jira-bot ASF subversion and git services added a comment -

          Commit 548d93539e7af0108b8411577c90a81250e5c7b8 in wicket's branch refs/heads/WICKET-6129-scheduled-handler-notification from Sven Meier
          [ https://git-wip-us.apache.org/repos/asf?p=wicket.git;h=548d935 ]

          WICKET-6129 handlers were never executed nested actually, so no need to keep a stack of handlers

          Show
          jira-bot ASF subversion and git services added a comment - Commit 548d93539e7af0108b8411577c90a81250e5c7b8 in wicket's branch refs/heads/ WICKET-6129 -scheduled-handler-notification from Sven Meier [ https://git-wip-us.apache.org/repos/asf?p=wicket.git;h=548d935 ] WICKET-6129 handlers were never executed nested actually, so no need to keep a stack of handlers
          Hide
          jira-bot ASF subversion and git services added a comment -

          Commit 794bc991e0322f3354ab1ce1d3bb3dc44d006b25 in wicket's branch refs/heads/WICKET-6129-scheduled-handler-notification from Sven Meier
          [ https://git-wip-us.apache.org/repos/asf?p=wicket.git;h=794bc99 ]

          WICKET-6129 use execute() for exception execution too

          Show
          jira-bot ASF subversion and git services added a comment - Commit 794bc991e0322f3354ab1ce1d3bb3dc44d006b25 in wicket's branch refs/heads/ WICKET-6129 -scheduled-handler-notification from Sven Meier [ https://git-wip-us.apache.org/repos/asf?p=wicket.git;h=794bc99 ] WICKET-6129 use execute() for exception execution too
          Hide
          jira-bot ASF subversion and git services added a comment -

          Commit 2c9f50cc640719befef6fe683b7b99454e598a6e in wicket's branch refs/heads/WICKET-6129-scheduled-handler-notification from Sven Meier
          [ https://git-wip-us.apache.org/repos/asf?p=wicket.git;h=2c9f50c ]

          WICKET-6129 ordered methods to follow invocation order

          Show
          jira-bot ASF subversion and git services added a comment - Commit 2c9f50cc640719befef6fe683b7b99454e598a6e in wicket's branch refs/heads/ WICKET-6129 -scheduled-handler-notification from Sven Meier [ https://git-wip-us.apache.org/repos/asf?p=wicket.git;h=2c9f50c ] WICKET-6129 ordered methods to follow invocation order
          Hide
          jira-bot ASF subversion and git services added a comment -

          Commit f026d08b6ee7875c223a1cc9fda35bea70192c57 in wicket's branch refs/heads/WICKET-6129-scheduled-handler-notification from Sven Meier
          [ https://git-wip-us.apache.org/repos/asf?p=wicket.git;h=f026d08 ]

          WICKET-6129 reordered if-statements

          Show
          jira-bot ASF subversion and git services added a comment - Commit f026d08b6ee7875c223a1cc9fda35bea70192c57 in wicket's branch refs/heads/ WICKET-6129 -scheduled-handler-notification from Sven Meier [ https://git-wip-us.apache.org/repos/asf?p=wicket.git;h=f026d08 ] WICKET-6129 reordered if-statements
          Hide
          jira-bot ASF subversion and git services added a comment -

          Commit 4ba83a5b2b434577a778d91f07b7d4617de53421 in wicket's branch refs/heads/WICKET-6129-scheduled-handler-notification from Sven Meier
          [ https://git-wip-us.apache.org/repos/asf?p=wicket.git;h=4ba83a5 ]

          WICKET-6129 move duplicated code into #executeExceptionRequestHandler

          Show
          jira-bot ASF subversion and git services added a comment - Commit 4ba83a5b2b434577a778d91f07b7d4617de53421 in wicket's branch refs/heads/ WICKET-6129 -scheduled-handler-notification from Sven Meier [ https://git-wip-us.apache.org/repos/asf?p=wicket.git;h=4ba83a5 ] WICKET-6129 move duplicated code into #executeExceptionRequestHandler
          Hide
          jira-bot ASF subversion and git services added a comment -

          Commit 03ea3af26d1fa7dfe442f257fd18cbdef8890ba9 in wicket's branch refs/heads/WICKET-6129-scheduled-handler-notification from Sven Meier
          [ https://git-wip-us.apache.org/repos/asf?p=wicket.git;h=03ea3af ]

          WICKET-6129 listeners are notified of all executed handlers now, so it is sufficient to listen for #onRequestHandlerResolved() only

          Show
          jira-bot ASF subversion and git services added a comment - Commit 03ea3af26d1fa7dfe442f257fd18cbdef8890ba9 in wicket's branch refs/heads/ WICKET-6129 -scheduled-handler-notification from Sven Meier [ https://git-wip-us.apache.org/repos/asf?p=wicket.git;h=03ea3af ] WICKET-6129 listeners are notified of all executed handlers now, so it is sufficient to listen for #onRequestHandlerResolved() only
          Hide
          jira-bot ASF subversion and git services added a comment -

          Commit 95c06fb984d0bd039523f9049b793cf480ae013e in wicket's branch refs/heads/WICKET-6129-scheduled-handler-notification from Sven Meier
          [ https://git-wip-us.apache.org/repos/asf?p=wicket.git;h=95c06fb ]

          WICKET-6129 RequestHandlerStack is not a stack, thus it is better be named RequestHandlerExecutor

          Show
          jira-bot ASF subversion and git services added a comment - Commit 95c06fb984d0bd039523f9049b793cf480ae013e in wicket's branch refs/heads/ WICKET-6129 -scheduled-handler-notification from Sven Meier [ https://git-wip-us.apache.org/repos/asf?p=wicket.git;h=95c06fb ] WICKET-6129 RequestHandlerStack is not a stack, thus it is better be named RequestHandlerExecutor
          Hide
          jira-bot ASF subversion and git services added a comment -

          Commit e1d6ba4258fb0340a53a65636fe3fd1789085e1d in wicket's branch refs/heads/WICKET-6129-scheduled-handler-notification from Sven Meier
          [ https://git-wip-us.apache.org/repos/asf?p=wicket.git;h=e1d6ba4 ]

          WICKET-6129 javadoc and deprecated: removeAll is removeScheduled now

          Show
          jira-bot ASF subversion and git services added a comment - Commit e1d6ba4258fb0340a53a65636fe3fd1789085e1d in wicket's branch refs/heads/ WICKET-6129 -scheduled-handler-notification from Sven Meier [ https://git-wip-us.apache.org/repos/asf?p=wicket.git;h=e1d6ba4 ] WICKET-6129 javadoc and deprecated: removeAll is removeScheduled now
          Hide
          jira-bot ASF subversion and git services added a comment -

          Commit 138ccca3023a5c01372cbe487f9be22d884b4461 in wicket's branch refs/heads/WICKET-6129-scheduled-handler-notification from Sven Meier
          [ https://git-wip-us.apache.org/repos/asf?p=wicket.git;h=138ccca ]

          WICKET-6129 javadoc; cleanup and corrected spelling

          Show
          jira-bot ASF subversion and git services added a comment - Commit 138ccca3023a5c01372cbe487f9be22d884b4461 in wicket's branch refs/heads/ WICKET-6129 -scheduled-handler-notification from Sven Meier [ https://git-wip-us.apache.org/repos/asf?p=wicket.git;h=138ccca ] WICKET-6129 javadoc; cleanup and corrected spelling
          Hide
          jira-bot ASF subversion and git services added a comment -

          Commit e02bdd8e7111ccfdce097a2841d6b61b64c0e7b9 in wicket's branch refs/heads/master from Sven Meier
          [ https://git-wip-us.apache.org/repos/asf?p=wicket.git;h=e02bdd8 ]

          WICKET-6129 further simplification: catch ReplaceHandlerException in RequestCycle only

          Show
          jira-bot ASF subversion and git services added a comment - Commit e02bdd8e7111ccfdce097a2841d6b61b64c0e7b9 in wicket's branch refs/heads/master from Sven Meier [ https://git-wip-us.apache.org/repos/asf?p=wicket.git;h=e02bdd8 ] WICKET-6129 further simplification: catch ReplaceHandlerException in RequestCycle only
          Hide
          jira-bot ASF subversion and git services added a comment -

          Commit 88db7274135b9ea293291936843e0b0e5473cffa in wicket's branch refs/heads/master from Sven Meier
          [ https://git-wip-us.apache.org/repos/asf?p=wicket.git;h=88db727 ]

          WICKET-6129 handlers were never executed nested actually, so no need to keep a stack of handlers

          Show
          jira-bot ASF subversion and git services added a comment - Commit 88db7274135b9ea293291936843e0b0e5473cffa in wicket's branch refs/heads/master from Sven Meier [ https://git-wip-us.apache.org/repos/asf?p=wicket.git;h=88db727 ] WICKET-6129 handlers were never executed nested actually, so no need to keep a stack of handlers
          Hide
          jira-bot ASF subversion and git services added a comment -

          Commit 8c1fb9b33c607395e3328ca967450a252ad3ca52 in wicket's branch refs/heads/master from Sven Meier
          [ https://git-wip-us.apache.org/repos/asf?p=wicket.git;h=8c1fb9b ]

          WICKET-6129 use execute() for exception execution too

          Show
          jira-bot ASF subversion and git services added a comment - Commit 8c1fb9b33c607395e3328ca967450a252ad3ca52 in wicket's branch refs/heads/master from Sven Meier [ https://git-wip-us.apache.org/repos/asf?p=wicket.git;h=8c1fb9b ] WICKET-6129 use execute() for exception execution too
          Hide
          jira-bot ASF subversion and git services added a comment -

          Commit 9c0c37e6e25344436c413bcc4900a0c4eafaa907 in wicket's branch refs/heads/master from Sven Meier
          [ https://git-wip-us.apache.org/repos/asf?p=wicket.git;h=9c0c37e ]

          WICKET-6129 ordered methods to follow invocation order

          Show
          jira-bot ASF subversion and git services added a comment - Commit 9c0c37e6e25344436c413bcc4900a0c4eafaa907 in wicket's branch refs/heads/master from Sven Meier [ https://git-wip-us.apache.org/repos/asf?p=wicket.git;h=9c0c37e ] WICKET-6129 ordered methods to follow invocation order
          Hide
          jira-bot ASF subversion and git services added a comment -

          Commit 80562f9b40c969ea2835a379d1200546f499441a in wicket's branch refs/heads/master from Sven Meier
          [ https://git-wip-us.apache.org/repos/asf?p=wicket.git;h=80562f9 ]

          WICKET-6129 reordered if-statements

          Show
          jira-bot ASF subversion and git services added a comment - Commit 80562f9b40c969ea2835a379d1200546f499441a in wicket's branch refs/heads/master from Sven Meier [ https://git-wip-us.apache.org/repos/asf?p=wicket.git;h=80562f9 ] WICKET-6129 reordered if-statements
          Hide
          jira-bot ASF subversion and git services added a comment -

          Commit 71f220266550eb5b6514400e3daa34eed9607a54 in wicket's branch refs/heads/master from Sven Meier
          [ https://git-wip-us.apache.org/repos/asf?p=wicket.git;h=71f2202 ]

          WICKET-6129 move duplicated code into #executeExceptionRequestHandler

          Show
          jira-bot ASF subversion and git services added a comment - Commit 71f220266550eb5b6514400e3daa34eed9607a54 in wicket's branch refs/heads/master from Sven Meier [ https://git-wip-us.apache.org/repos/asf?p=wicket.git;h=71f2202 ] WICKET-6129 move duplicated code into #executeExceptionRequestHandler
          Hide
          jira-bot ASF subversion and git services added a comment -

          Commit 0e55e547294d5e922fd8649175ad575af8574f9b in wicket's branch refs/heads/master from Sven Meier
          [ https://git-wip-us.apache.org/repos/asf?p=wicket.git;h=0e55e54 ]

          WICKET-6129 listeners are notified of all executed handlers now, so it is sufficient to listen for #onRequestHandlerResolved() only

          Show
          jira-bot ASF subversion and git services added a comment - Commit 0e55e547294d5e922fd8649175ad575af8574f9b in wicket's branch refs/heads/master from Sven Meier [ https://git-wip-us.apache.org/repos/asf?p=wicket.git;h=0e55e54 ] WICKET-6129 listeners are notified of all executed handlers now, so it is sufficient to listen for #onRequestHandlerResolved() only
          Hide
          jira-bot ASF subversion and git services added a comment -

          Commit dc356b95381bf1ebfbe317f8e5bba6e231a610d8 in wicket's branch refs/heads/master from Sven Meier
          [ https://git-wip-us.apache.org/repos/asf?p=wicket.git;h=dc356b9 ]

          WICKET-6129 RequestHandlerStack is not a stack, thus it is better be named RequestHandlerExecutor

          Show
          jira-bot ASF subversion and git services added a comment - Commit dc356b95381bf1ebfbe317f8e5bba6e231a610d8 in wicket's branch refs/heads/master from Sven Meier [ https://git-wip-us.apache.org/repos/asf?p=wicket.git;h=dc356b9 ] WICKET-6129 RequestHandlerStack is not a stack, thus it is better be named RequestHandlerExecutor
          Hide
          jira-bot ASF subversion and git services added a comment -

          Commit b3f4fa0b7e40f7be4266f1e28057cea751975671 in wicket's branch refs/heads/master from Sven Meier
          [ https://git-wip-us.apache.org/repos/asf?p=wicket.git;h=b3f4fa0 ]

          WICKET-6129 javadoc and deprecated: removeAll is removeScheduled now

          Show
          jira-bot ASF subversion and git services added a comment - Commit b3f4fa0b7e40f7be4266f1e28057cea751975671 in wicket's branch refs/heads/master from Sven Meier [ https://git-wip-us.apache.org/repos/asf?p=wicket.git;h=b3f4fa0 ] WICKET-6129 javadoc and deprecated: removeAll is removeScheduled now
          Hide
          jira-bot ASF subversion and git services added a comment -

          Commit eaa3bfa0fe498e542d7f96348a1009f7de59f6bc in wicket's branch refs/heads/master from Sven Meier
          [ https://git-wip-us.apache.org/repos/asf?p=wicket.git;h=eaa3bfa ]

          WICKET-6129 javadoc; cleanup and corrected spelling

          Show
          jira-bot ASF subversion and git services added a comment - Commit eaa3bfa0fe498e542d7f96348a1009f7de59f6bc in wicket's branch refs/heads/master from Sven Meier [ https://git-wip-us.apache.org/repos/asf?p=wicket.git;h=eaa3bfa ] WICKET-6129 javadoc; cleanup and corrected spelling
          Hide
          svenmeier Sven Meier added a comment -

          RequestCycleListeners are now notified as you'd expect it, i.e. in difference to Wicket 7.x:

          • #onRequestHandlerResolved() is called before all handlers to be executed
          • #onRequestHandlerExecuted() is called after all successful handlers (and only those)
          • #onExceptionRequestHandlerResolved() is called for all exception handlers, even those resulting from a previous exception retry.
          Show
          svenmeier Sven Meier added a comment - RequestCycleListeners are now notified as you'd expect it, i.e. in difference to Wicket 7.x: #onRequestHandlerResolved() is called before all handlers to be executed #onRequestHandlerExecuted() is called after all successful handlers (and only those) #onExceptionRequestHandlerResolved() is called for all exception handlers, even those resulting from a previous exception retry.

            People

            • Assignee:
              svenmeier Sven Meier
              Reporter:
              svenmeier Sven Meier
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development