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