Back Forum Reply New

Around Advice and RegexpMethodPointcutAdvisor

I am trying to intercept struts action methods using an Around Advice.  

public class ActionInterceptor extends DelegatingIntroductionInterceptor  {

public Object invoke(MethodInvocation methodInvocation) {     ... return methodInvocation.proceed();
}

}
lt;!-- Method 1 This is not working --gt;
lt;bean id=quot;actionAutoProxyquot;    class=quot;org..aop.support.RegexpMetho  dPointcutAdvisorquot;gt;
lt;property name=quot;patternquot;gt;   lt;valuegt;.*do.*lt;/valuegt;
lt;/propertygt;
lt;property name=quot;advicequot;gt;       lt;ref bean=quot;actionInterceptorquot;/gt;
lt;/propertygt;
lt;/beangt;

lt;!-- Method 2 This is working --gt;

lt;bean id=quot;actionAutoProxyquot;    class=quot;org..aop.framework.autoproxy  .BeanNameAutoProxyCreatorquot;gt;
lt;property name=quot;beanNamesquot;gt;   lt;valuegt;/loginlt;/valuegt;
lt;/propertygt;
lt;property name=quot;interceptorNamesquot;gt;
lt;listgt;       lt;valuegt;actionInterceptorlt;/valuegt;   lt;/listgt;
lt;/propertygt;
lt;/beangt;

Here the Method 2 works but not the Method 2.  Do we need to use a different class anywhere here ?  
Any help appreciated.
¥
Back Forum Reply New