I am using jetty, version 7.0.1 if that matters.
Sometimes I have some quite long running tasks on a server which I would like to cancel/stop if the client disconnects (in case of GET requests, not e.g. POST file uploads). It seems this is not the case, and that tasks continue to run to completion.
Perhaps I can use ServletRequestListener.requestDestoryed listener to get notification of such tasks but what is recommended approach for stoping the request thread? What about releasing resources like database connections, file handles or running tasks (executor service)?
What is the recommended approach in stopping such tasks as soon as possible?