Skip to content

Handle RejectedExecutionException in WebAsyncManager [SPR-13836] #18409

@spring-projects-issues

Description

@spring-projects-issues

Ian Chan opened SPR-13836 and commented

When a web interface is declared with 'Callable' return type is rejected by the AsyncTaskExecutor, a RejectedExecutionException can be thrown. This exception is currently not caught and the caller thread is still ticking until it times-out before ending.

A (workaround) solution is to use @ControllerAdvice and catch the RejectedExecutionException specifically - but that doesn't stop the timeout task and a stack trace in the logs when timeout expires.

A better solution is to catch the RejectedExecutionException when submitting to AsyncTaskExecutor in the first place (#947)


Affects: 3.2.16, 4.2.4

Referenced from: commits 29692fc, 1ea9dd0, 93298fc

Backported to: 3.2.17

Metadata

Metadata

Assignees

Labels

in: coreIssues in core modules (aop, beans, core, context, expression)status: backportedAn issue that has been backported to maintenance branchestype: bugA general bug

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions