Spring proxy self-invocation

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

One thought on “Spring proxy self-invocation

Leave a Reply