This week's book giveaway is in the Design forum.
We're giving away four copies of Design for the Mind and have Victor S. Yocco on-line!
See this thread for details.
Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Spring AOP

 
Amitt Thakkarr
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • 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
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • 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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic