[MAGNOLIA-2870] ServletDispatchingFilter is not dispatching destroy() method to wrapped servlet Created: 18/Sep/09  Updated: 23/Jan/13  Resolved: 13/Nov/09

Status: Closed
Project: Magnolia
Component/s: core
Affects Version/s: 4.1
Fix Version/s: 4.2

Type: Bug Priority: Minor
Reporter: Erik Alphenaar Assignee: Philipp Bärfuss
Resolution: Fixed Votes: 0
Labels: Core, Magnolia, ServletDispatchingFilter, destroy
Remaining Estimate: 0.5h
Time Spent: Not Specified
Original Estimate: 0.5h

Attachments: File ServletDispatchingFilter.patch    
Template:
Patch included:
Yes
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Bug DoR:
[ ]* Steps to reproduce, expected, and actual results filled
[ ]* Affected version filled
Date of First Response:

 Description   

The ServletDispatchingFilter calls the init() method of the wrapped servlet on start-up.

When the contents of the servlets tree in /server/filters/servlets are changed in the magnolia admincentral, magnolia reloads the filter chain
to enable the changes to be processed, and thus creates a new instance, and calls the init() method.
The destroy method of the wrapped servlet does not seem to be called.

In my opinion it would be nice to also dispatch the destroy method to the wrapped servlet. At the moment the destroy() is completely ignored
by the ServletDispatchingFilter. This might lead to unexpected behaviour in some scenarios.



 Comments   
Comment by Magnolia International [ 13/Nov/09 ]

Applied patch, thanks !
(with the slight change that it now first delegates to the servlet's destroy method)

Generated at Mon Feb 12 03:40:55 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.