Regis,
Pointcuts and their uses are covered in detail in chapter 5 of the Spring reference manual. The information in there should help you to get up and running with this.
Rob
Regis,
Pointcuts and their uses are covered in detail in chapter 5 of the Spring reference manual. The information in there should help you to get up and running with this.
Rob
Hello Rob,
Ok. I'll check the reference.
I should have done it before. Sorry.
Thanks for help.
Regis Santos
Hi
My webContext.xml looks like :
<!-- ========================= BUSINESS DELEGATE DEFINITIONS ========================= -->
<bean id="riDelegate"
class="com.standardchartered.cr.ri.delegate.impl.R IDelegateLocalImpl">
<property name="service" ref="riService" />
</bean>
<bean id="infDelegate"
class="com.standardchartered.cr.inf.delegate.impl. InfDelegateLocalImpl">
<property name="service" ref="infService" />
</bean>
<!-- ========================= STRUTS ACTION DEFINITIONS ========================= -->
<bean id="personAction" scope="prototype"
class="com.standardchartered.cr.ri.action.PersonAc tion">
<constructor-arg ref="riDelegate" />
<constructor-arg ref="infDelegate" />
</bean>
<!-- ========================= FOR CACHING ========================= -->
<bean id="appCacheManager" class="net.sf.ehcache.CacheManager">
<!-- constructor-arg index="0" type="java.net.URL"
value="classpath:/WEB-INF/ehcache.xml" /-->
</bean>
<aop:config>
<aopointcut id="getPersonByCriteriaPointcut"
expression="execution(* *..RIDelegateLocalImpl.getPersonByCriteria())" />
<aop:advisor id="methodCachingAdvisor"
advice-ref="methodCachingAdvice"
pointcut-ref="getPersonByCriteriaPointcut" />
</aop:config>
<bean id="methodCachingAdvice"
class="com.standardchartered.cr.ri.caching.interce ptor.MethodCachingInterceptor">
<property name="cacheManager" ref="appCacheManager" />
</bean>
<!-- =========================CACHING ENDS ========================= -->
the ehcache.xml is:
<ehcache>
<diskStore path="java.io.tmpdir" />
<defaultCache maxElementsInMemory="10" eternal="false"
timeToIdleSeconds="120" timeToLiveSeconds="120" overflowToDisk="true" />
<cache name="getPersonByCriteria" maxElementsInMemory="150" eternal="false"
overflowToDisk="true" timeToIdleSeconds="0" timeToLiveSeconds="86400" />
</ehcache>
But my MethodCachingInterceptor class is not getting called.
What could be the problem ? This is pretty urgent, if u can help...
Thanks in advance.....
I would take a look at the examples in the Spring reference manual, most of the time the issues related to interceptors are either internal method calls, the AOP expression not being correct or you are proxying interfaces and the AOP expression references the class instead.
http://www.springframework.org/docs/...l#aop-proxying
Last edited by karldmoore; Aug 29th, 2007 at 10:02 AM.
Barracuda Networks SSL VPN Lead Developer
http://pramatr.wordpress.com
http://twitter.com/karldmoore
http://www.linkedin.com/in/karldmoore
Any postings are my own opinion, and should not be attributed to my employer or clients.