I want to within my own Bean call a method within itself which has its own @Async and @Transactional proxies but it isnt working.
public class MyClass {
private MyClass _selfWithProxy;
@PostConstruct
public void postContruct() {
_selfWithProxy = applicationContext.getBean(MyClass.class);
}
void myMethodA() {
_selfWithProxy.myMethodB()
}
@Async
@Transactinal
void myMethodB() {
//do stuff
}
However when I call myMethodA from another Bean the call to myMethodB does not intercept with an Async interceptor. I can see _selfWithProxy is a proxy bean, and the proxy activates but there are is no Async interceptor in the chain.
When I call myMethodB from another bean the @Async works, so I know it is setup correctly