https://issues.apache.org/bugzilla/show_bug.cgi?id=57314
Mark Thomas <ma...@apache.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Blocks|57315 | Resolution|--- |WONTFIX --- Comment #3 from Mark Thomas <ma...@apache.org> --- The Servlet Specification is not clear on the expected interaction between a ServletRequestListener and async requests. The relevant references I could find were: <quote source="Table 11-3"> Lifecycle | A servlet request has started being processed by Web components. | javax.servlet.ServletRequestListener </quote> <quote source="ServletRequestListener Javadoc"> Interface for receiving notification events about requests coming into and going out of scope of a web application. A ServletRequest is defined as coming into scope of a web application when it is about to enter the first servlet or filter of the web application, and as going out of scope as it exits the last servlet or the first filter in the chain. </quote> That is all pretty clear prior to Servlet 3.0 async. With async, I agree it gets murkier. As far as I am aware, downstream users of Tomcat have passed the TCK without any changes in this area so there is no clarification to be obtained from that source. Tomcat's interpretation of the current language is that a request that is in async mode is still "in the scope of the web application" until the dispatch() or complete() call has been processed. I appreciate the issues this causes for the use of ThreadLocals but the current behaviour is not going to change without some clarification from the Servlet EG. It is usual that, when such clarification is made, the changes are back-ported to earlier versions so if this is clarified in Servlet 4.0, any changes should get back-ported to Tomcat 8 and Tomcat 7. Obviously, one possible result of asking for clarification is that the EG confirms that Tomcat's behaviour is correct. There are use cases for the current behaviour so my personal view is that a new listener is required. Unfortunately, that would make back-porting much less likely (although we could back-port a Tomcat specific listener). -- You are receiving this mail because: You are the assignee for the bug. --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org