When getObject() on ProxyFactoryBean is called it might not be fully initialized yet, leading to an exception. This is fine, but the empty Advisor chain is never rebuilt, not even after initialization has finished. This leads to 'no-op' proxies which don't do anything.

Issue: SPR-7582

Comment From: iarroyo

+1

Comment From: adperezmorales

I faced the same problem while using constructor injection of proxies in proxies. I sorted it out using targetName in ProxyFactoryBean instead of target referencing the bean, because changing bean order definition is not always possible. This fix can be helpful in many situations

Comment From: jhoeller

On review, we're going with a simpler change (just covering late initialization, not re-initialization) for the original report #12238. Thanks for the pull request, in any case, and sorry that it took so long...