> I think I am saying anything context related is
> invalid for anything other than a container thread.
>
Ditto.
If an async thread really needs to know something context related, then we
could put appropriate methods onto AsyncContext. eg
/* @return The ServletContext that called startAsync */
ServletContext getAsyncServletContext()
Or we can just tell applications that they need to get values they want
prior to starting the async thread.
I think that is the best option. Something like:
>
> public interface ServletDispatchListener extends EventListener {
> void requestStart (ServletDispatchEvent sre);
> void contextEntry (ServletDispatchEvent sre);
> void contextExit (ServletDispatchEvent sre);
> void requestEnd (ServletDispatchEvent sre);
> }
>
Looks good, except I would probably say requestCompleted rather than
requestEnd, so that matches with the complete() method.
Also maybe requestReceived rather than requestStart?
But eitherway, the semantics are good.
cheers
--
Greg Wilkins <gregw_at_intalio.com> @ Webtide - *an Intalio subsidiary*
http://eclipse.org/jetty HTTP, SPDY, Websocket server and client that scales
http://www.webtide.com advice and support for jetty and cometd.