Description
Phil Webb opened SPR-14490 and commented
Originally raised on the Spring Boot issue tracker:
spring-projects/spring-boot#6429
—
here is an issue introduced in Spring 4.2.6.RELEASE (used by Spring Boot 1.3.4.RELEASE) which means that it is possible for @Async
annotated method calls to become blocked. This happens when you have nested @Async
annotated calls which use the default task executor, and you have a task executor defined in your application context (but not explicitly used).
I have created a proof of concept here https://github.com/foygl/spring-async-problem
I've only tested this with Spring Boot so I'm not sure if this is a wider Spring problem or just an issue with Spring Boot (although I suspect the former). I've replicated this in Spring Boot version 1.4.0.RC1 (i.e. Spring 4.3.1.RELEASE) so this problem still exists in the latest version.
Thanks
—
Using Spring Boot 1.3.3 with the following in the build script also shows the issue:
ext['spring.version'] = '4.2.6.RELEASE'
Affects: 4.2.6
Issue Links:
- Regression: Early instantiation of a bean prevents proxying for @Async in 4.2.x but works in 4.1.x [SPR-14030] #18602 Regression: Early instantiation of a bean prevents proxying for
@Async
in 4.2.x but works in 4.1.x