I'm trying to call a method in Spring-powered bean asynchronously using @Async
. I defined an executor in XML:
<task:executor id="emailTasksExecutor" pool-size="1" />
and here is my method:
@Override
@Async("emailTasksExecutor")
public void sendEmail()
{
...
}
And the method does not get called at all when I use qualifier (emailTasksExecutor
). However, if I remove it, everything works ok. But in this case the default executor is used and I need to change this behaviour.
I thought the problem is that my class does not implement any interfaces, and something went wrong with proxies. But extracting the interface did not help.