Just had a totally random thing happen with ColdSpring. I'm a big fan of the use-advice-as-advisor shortcut when you want to proxy every method on a bean. I use it all over the place. Tonight, however, it completely failed. No idea why. This app (PotD) has been running with the same version of ColdSpring for quite some time, all with out issue. I reloaded the app tonight to test a change, and it bombed trying to find the "matches" method on my Advice. Reverted my change, reloaded again, same issue. Restarted ColdFusion and still the same.
The fix was simple. Where I used to have this:
<bean id="transactionAdvice" class="sorter.cfcs.transactionadvice" />
I now have this:
<bean id="transactionAdvice" class="coldspring.aop.support.NamedMethodPointcutAdvisor"> <property name="advice"><bean class="sorter.cfcs.transactionadvice" /></property> <property name="mappedNames"><value>*</value></property> </bean>
Problem solved by being explicit, though it'd be nice not to have that extra XML in there since ColdSpring is supposed to infer it automatically. Oh well. And yes, that's the wrong id for the Advisor bean, but in the interest of getting the app back online, I just used the same name so all my proxy configurations wouldn't have to be updated. I'll go back and fix it at some point.
Comments are closed.