For example, a service class has 2 public method (mA and mB), mA will call mB. in configuration, I surround an interceptor iB on mB. Normally, if call mA, interceptor iB won't be invoked as it is called inside another service bean method. But in my case, I want to interceptor also can be invoke, ie, call mA->interceptor iB-> mB. Is there any solution?
For code:
ConfigurationCode:public class ServiceBean{ public void mA(){ mB(); } public void mB(){ //... do something } }
Code:<bean id="iB" class="org.springframework.orm.hibernate3.HibernateInterceptor"> <property name="sessionFactory" ref="sessionFactory"/> </bean> <aop:config proxy-target-class="true"> <aop:advisor advice-ref="iB" pointcut="execution(* *..service.ServiceBean.mB(..))"/> </aop:config>


Reply With Quote