• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
  • Rob Spoor
  • Junilu Lacar
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Carey Brown
Bartenders:

Spring AOP

 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

some one asked me one question "In Spring AOP we give the configuration for jointpoint (expressions for method matching): so the question was how Spring container knows that the Methods are getting called"

Thank,
Amit
 
ranger
Posts: 17347
11
Mac IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Amitt Thakkarr wrote:Hi,

some one asked me one question "In Spring AOP we give the configuration for jointpoint (expressions for method matching): so the question was how Spring container knows that the Methods are getting called"

Thank,
Amit



It doesn't need to know that the method is called. It is in the initialization phase/BeanPostProcessors that are looking at the pointcut expression and when if finds matches, it creates a Dynamic Proxy around that object, so the client gets the proxy and calls the method on the proxy. So the proxy has the advice code with it, as well as the real object.

Mark
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic