Get the tools you need to learn Java skills fast!
Video tutorials, eBooks, hands-on lab exercises, sample code.
A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
The Software Craftsman
this week in the
Spring AOP issue
Joined: Aug 09, 2007
Aug 27, 2009 13:38:11
I wrote a "band-aid" fix for a live application as a Spring AOP class implementing MethodInterceptor (the app only has about 6-9 months to live, so a "correct" fix wasn't worth it).
However, I added the following lines to my applicationContext.xml file to apply the aspect but the MethodInterceptor never gets invoked.
<bean id="equipmentSummaryReport" class="com.whatever.reports.equipment.EquipmentSummaryReportImpl"/> <bean id="equipmentSummaryReportAdvice" class="com.whatever.aop.EquipmentTypeSummaryReportAdvice"> <property name="dataSource"> <ref bean="dataSource"/> </property> </bean> <bean id="esrAutoProxyCreator" class="org.springframework.aop.framework.autoproxy.BeanNameAutoProxyCreator"> <property name="proxyTargetClass" value="true"/> <property name="interceptorNames"> <list> <idref bean="equipmentSummaryReportAdvice"/> </list> </property> <property name="beanNames" value="equipmentSummaryReport" /> </bean>
Can anyone assist?
Joined: Nov 24, 2005
Aug 27, 2009 22:57:08
It looks fine from here. How are you getting a reference to equipmentSummaryReport ?
All roads lead to JavaRanch
subject: Spring AOP issue
Struts2 with Spring AOP
Problem with Spring AOP
Spring Transaction using Spring AOP
Spring Transaction by AOP
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2015