Affects: \<5.3.23>
I customized AsyncTaskExecutor to throw RejectedExecutionException when the queue is full, but I got twice the error message.
Comment From: sbrannen
Hi @babyblue94520,
Thanks for getting in touch, but it feels like this is a question that would be better suited to Stack Overflow. As mentioned in the guidelines for contributing, we prefer to use the issue tracker only for bugs and enhancements. Feel free to update this issue with a link to the re-posted question (so that other people can find it) or add some more details if you feel this is a genuine bug.
As a side note, you should avoid changing the state of your CustomAsyncTaskExecutor
bean within your TestController
. CustomAsyncTaskExecutor
is registered as a shared singleton bean. Consequently, its configuration should not be changed at runtime.
Comment From: babyblue94520
Hi @sbrannen :
I spent some time writing this example to fully reproduce the problem, Changing CustomAsyncTaskExecutor configuration on the fly is for the scenarios mentioned in README.md, not for actual use.
The current tracking result is that when DispatcherServlet processes async request, if the task throws an exception before entering AsyncExecutor, the data status in asyncManager is not processed normally, causing the request to enter DispatcherServlet again.