Hi,
I was wondering if it was possible to use Spring AOP to intercept methods invoked from a flow definition file like so
flow-definition file :
I'm trying to intercept the call to the save method. While browsing the web I read that since Webflow uses reflexion to call methods it cannot be done directly so I decided to create the pointcut on the DAO that the bean MessageService uses to persist the object in the database like so :PHP Code:
<action-state id="saveAndClose">
<transition on="yes" to="endEdit">
<evaluate expression="messageService.save(flowScope.message)" />
</transition>
</action-state>
here is my aspectPHP Code:
<aop:config>
<aop:aspect ref="applicationConfigUtil">
<aop:pointcut
expression="execution (* mypackage.MessageDao.save(..))"
id="pcSaveMessage" />
<aop:after method="reload" pointcut-ref="pcSaveMessage"/>
</aop:aspect>
</aop:config>
But the advice method never gets called. Is there a way to accomplish this (without using full AspectJ implementation) ?PHP Code:
@Component
public class ApplicationConfigUtil implements Serializable{
public void reload(){
System.out.println("Reloading");
}
}
Any ideas?
-----
I'm using :
Spring Webflow : 2.3.0
Spring : 3.0.5


Reply With Quote
