On Wed, Dec 12, 2018 at 8:21 AM Philippe Marschall <kustos@gmx.net> wrote:


On 11.12.18 01:47, Stuart Douglas wrote:
> On Sun, Dec 9, 2018 at 9:58 PM Philippe Marschall <kustos@gmx.net> wrote:
> ....
>
> I don't know if this would be worth it at the moment, as this would mean
> that Undertow would require JDK11 to build.

Yes, it was a commercial feature on before 11 and the API changed from 8
to 9.
  > It does look like a useful
> handler though. The next major version of Undertow is likely to require
> JDK11, so maybe we could consider it then.

Sure, I just wanted to bring it up. It can be maintained outside of the
project without any issues.


> ...
>
> This can definitely happen, even for non-async servlet, as the request
> starts in the IO thread and finishes in a worker thread.

Is there a way to register a listener when a request gets scheduled and
unscheduled from a thread?

If you only care about Servlet you can use io.undertow.servlet.api.ThreadSetupHandler, other that this we don't really have the concept of dispatch listeners that you would need to implement this for the general case.

Stuart
 

Cheers
Philippe