Aug 16th, 2012, 05:21 AM
@Async task configuration problem within lifecycle managed bean
Spring does not pick up asynchronous task configuration when @Async is used within a lifecycle managed bean. Although documentation in chapter 26.5.2 hints: "@Async can not be used in conjunction with lifecycle callbacks such as @PostConstruct", this actually does not only apply to the lifecycle method itself, but to all methods within the bean (at least when the class is implementing the InitializingBean interface - which it does in my case for historical reasons).
Would be great if this could be clarified in the documentation, as this has cost me and probably others some time to figure out.
Tags for this Thread