Is it Spring proxy self-invocation or Spring proxy inter-object calls – or something completely different? I don’t know but I hope it makes sense to you anyway.
Several options for Spring proxy self-invocation
https://jira.springsource.org/browse/SPR-8450 and http://stackoverflow.com/questions/5152686/self-injection-with-spring show several options for self-invocation. For details follow the two links. Here’s just the hints:
- Option a: have the ApplicationContext auto-wired into your bean, then rather than using ‘this’ get the bean from the app context
- Option b: have the proxied bean injected into itself using @Resource(name=”yourbean”)
- Option c: use AspectJ
Note support for self injection was added in 4.3.0.RC1 (commit https://github.com/spring-projects/spring-framework/commit/4a0fa69ce469cae2e8c8a1a45f0b43f74a74481d)