tdu
05-01-2006, 06:44 PM
I have developed a UpdateContactAdvice. I want to apply that advice only to Update and Upsert method in my IContact interface.
Here is my config:
<object id="UpsertContactAdvice"
type="Spring.Aop.Support.RegularExpressionMethodPointcut Advisor,Spring.Aop">
<property name="advice">
<object type="Aspects.Validations.UpsertContactAdvice,Aspects">
<constructor-arg index="0" ref="UpsertValidationInterface"/>
</object>
</property>
<property name="pattern" >
<list>
<value>UpsertContact</value>
<value>UpdateContact</value>
</list>
</property>
</object>
It didn't work. The UpsertContact and UpdateContact both methods are not fired up with the advice.
But, if I replace the
<property name="pattern" >
<list>
<value>UpsertContact</value>
<value>UpdateContact</value>
</list>
</property>
with this
<property name="pattern" value="UpsertContact" >
</property>
It did fired up the advice when I calls UpsertContact method. What did I wrong or how can I make the regularexpression work the way as it suppose to?
Thanks
Here is my config:
<object id="UpsertContactAdvice"
type="Spring.Aop.Support.RegularExpressionMethodPointcut Advisor,Spring.Aop">
<property name="advice">
<object type="Aspects.Validations.UpsertContactAdvice,Aspects">
<constructor-arg index="0" ref="UpsertValidationInterface"/>
</object>
</property>
<property name="pattern" >
<list>
<value>UpsertContact</value>
<value>UpdateContact</value>
</list>
</property>
</object>
It didn't work. The UpsertContact and UpdateContact both methods are not fired up with the advice.
But, if I replace the
<property name="pattern" >
<list>
<value>UpsertContact</value>
<value>UpdateContact</value>
</list>
</property>
with this
<property name="pattern" value="UpsertContact" >
</property>
It did fired up the advice when I calls UpsertContact method. What did I wrong or how can I make the regularexpression work the way as it suppose to?
Thanks