How to handle client cancellation request in Spring 3?

I have a controller with a method mapped to @RequestMapping and it returns an object in JSON format, so it also has @ResponseBody. Part of getting the object that it should return is wait () for the object in the producer / consumer situation.

The client can, of course, cancel its request at any time, but I want to be able to abort this wait () command, which the controller does when the client cancels. Currently, the ajax request throws a client-side error with a statusType timeout, and I can handle it on the client side. But it seems that there is still a thread waiting on the server side that I want to clear.

But how?

I seem to recall how to get Socket Closed error types in old web applications, I don’t see this happening with this Spring 3 app on WebLogic 10.3

I see the entry this way when the client request is canceled, when the controller sits on wait ():

"<[STUCK] ExecuteThread: '0' for the queue: 'weblogic.kernel.Default (self-tuning)' is busy for" 623 "seconds working on the request, etc."

+5
source share

All Articles