Summary: | Notification for expired session sent to still initializing servlet context | ||
---|---|---|---|
Product: | Tomcat 7 | Reporter: | boschman <sverre.boschman> |
Component: | Catalina | Assignee: | Tomcat Developers Mailing List <dev> |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | P2 | ||
Version: | 7.0.33 | ||
Target Milestone: | --- | ||
Hardware: | PC | ||
OS: | Linux |
Description
boschman
2013-01-31 07:59:11 UTC
Configuring an application in a Filter.init() method is a poor design choice. Application initialization should happen in a ServletContextListener. There is a little ambiguity in section 6.2.1 of the Servlet specification but your interpretation (that Filter#init() must be called for all filters before requests are served) is consistent with how the Tomcat developers have implemented filter initialization. That said, I do not see how the behavior you describe can occur. The background processing method exits immediately if the component is not available - which it isn't when the Filters are being started. I have moved the starting/stopping of the thread since the thread can't do anything until the start method completes so there is no point starting it earlier. However, that shouldn't change the current behavior. I also found and fixed a problem in Tomcat trunk where the test for component availability was being skipped. However, Tomcat 7 does not exhibit that problem. Marking this as fixed due to the Tomcat 8 fix. |