Is there a way to enable disable aspects/proxying at run-time ?
Below are my bean definitions.
Basically, I am applying spring's PerformanceMonitorInterceptor as my advisorCode:<bean id="performanceAdvice" class="org.springframework.aop.interceptor.PerformanceMonitorInterceptor"/> <aop:config> <aop:pointcut id="executePointCut" expression="execution(* IDao.execute*(..))" /> <aop:advisor id="PerfAdvisorForExecutepointcut" pointcut-ref="executePointCut" advice-ref="performanceAdvice"/> </aop:config>
for all objects that impl my interface IDao and for the methods that match the
pattern execute*
The aop configs work fine and I am able to get the performance metrics
from PerformanceMonitorInterceptor ..
But how would I enable/disable this proxying at run-time ?


Reply With Quote