AOP declared without indicating when the advice to be fired
Naresh Shanmugam
Ranch Hand
Joined: Jul 16, 2010
Posts: 76
posted
0
I saw <aop:config> having <aop:pointcut> and <aop:advisor> but there is nothing like <aop:before> / <aop:after> / <aop:around> / <aop:after-returning> / <aop:after-throwing>. Just Wondering at what point of time the advice will be invoked. Any body have any idea on this?
Well, it looks like a performance monitor that you wouldn't want running in production, but something you can turn on or off at anytime when you need it.
Maybe they have a console that they can go to to turn it on to run <aop:before>
There is more missing than what was posted. Also in Transactions configured with xml there isn't an <aop:before> etc to configure that. But I don't think that is why in your case.
Mark, This code is logging the amount of time taken to execute each method. There is a single method called "invokeUnderTrace(final MethodInvocation invocation, final Logger logger)" in the "PerformanceInterceptor", which is being called. I did not turn ON anything. Is there any thing like default method which gets called when neither of this <aop:before> / <aop:after> / <aop:around> / <aop:after-returning> / <aop:after-throwing> is given??
Naresh Shanmugam wrote:Mark, This code is logging the amount of time taken to execute each method. There is a single method called "invokeUnderTrace(final MethodInvocation invocation, final Logger logger)" in the "PerformanceInterceptor", which is being called. I did not turn ON anything. Is there any thing like default method which gets called when neither of this <aop:before> / <aop:after> / <aop:around> / <aop:after-returning> / <aop:after-throwing> is given??
I think the term interceptor gives you your answer. You are intercepting calls with an Interceptor.
Mark
Naresh Shanmugam
Ranch Hand
Joined: Jul 16, 2010
Posts: 76
posted
0
Mark,
You mean to say since we are using PerformanceMonitorInterceptor the "intercept()" method in it would be called automatically.
Please correct me if I am wrong.
subject: AOP declared without indicating when the advice to be fired