If I do use the transactional annotation over a method and at the same time also use the Aspect then how will spring behave for this? Will it create aspect proxy over the transaction proxy object? Or spring is that intelligent to mix up both proxy object's logic?
Please correct me if my understanding is totally wrong here.
AOP Proxies are created by a
BeanPostProcessor
, the most specific one inAbstractAutoProxyCreator
hirearchy with the following stepsAopUtils.findAdvisorsThatCanApply()
.OrderComparator
, seeAbstractAdvisorAutoProxyCreator.sortAdvisors()
.So usually, only a proxy is involved.
However as Marten said if you create proxies by other ways that are unknown for AutorProxyCreator, you can get proxies of proxies easily.
For example:
With
Will output: