Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Spring @Async with multiple exception handlers [SPR-14381] #18954

Closed
spring-projects-issues opened this issue Jun 20, 2016 · 1 comment
Closed
Assignees
Labels
status: declined A suggestion or change that we don't feel we should currently apply type: enhancement A general enhancement

Comments

@spring-projects-issues
Copy link
Collaborator

spring-projects-issues commented Jun 20, 2016

Mukund Jalan opened SPR-14381 and commented

Currently if I am using XML configuration, as per #13635 I can specify exception-handler in tag task:annotation-driven to specify an exception handling strategy for all the @Async methods in my system. If I have multiple executors, I can specify value to the @Async annotation and have a different executor configured. Similarly, if I need to specify a different exception handler, there is no provision to have it for different scenarios.

I hope to have a provision to specify the class of my AsyncUncaughtExceptionHandler in @Async annotation.


No further details from SPR-14381

@spring-projects-issues
Copy link
Collaborator Author

Stéphane Nicoll commented

I don't think that the fact you can configure something via the annotation is an argument to provide something else. A common uncaught exception handler feels right and we're not keen on adding more customizations there.

You can always "dispatch" based on the method handle or use AsyncTaskExecutor.submit with your own Callable for such specific scenario.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: declined A suggestion or change that we don't feel we should currently apply type: enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

2 participants