Hello
related to this topic small problem with oval and spring aop
I found in spring manual 6.3 this warning
I'm using BeanNameAutoProxyCreator and <aop:scoped-proxy /> . I think that could be my problem.The <aop:config> style of configuration makes heavy use of Spring's auto-proxying mechanism. This can cause issues (such as advice not being woven) if you are already using explicit auto-proxying via the use of BeanNameAutoProxyCreator or suchlike. The recommended usage pattern is to use either just the <aop:config> style, or just the AutoProxyCreator style.
To solve it, i think i need to describe both my configs for oap:
andCode:<bean id="account" factory-bean="accountDao" factory-method="getAccount" scope="request"> <constructor-arg value="1" /> <aop:scoped-proxy /> </bean>
using <aop:config>Code:<bean id="ovalGuardInterceptor" class="net.sf.oval.guard.GuardInterceptor" /> <bean class="org.springframework.aop.framework.autoproxy.BeanNameAutoProxyCreator"> <property name="proxyTargetClass" value="true" /> <property name="beanNames" value="account" /> <property name="interceptorNames"><list><value>ovalGuardInterceptor</value></list></property> </bean>
Only question.. how to do it?
Any ideas?


Reply With Quote
