Is it possible, that Spring.Net Aspects don't work with Asp.Net Controller?
I want to configure transactions on Action methods of Controllers but the proxy doesn't seem to trigger.
<object id="ControllerClassPointcut" type="Spring.Aop.Support.SdkRegularExpressionMethodPointcut, Spring.Aop">
<property name="patterns">
<list>
<value>xxx.Controllers.CompanyController.*</value>
</list>
</property>
</object>
<aop:config>
<aop:advisor pointcut-ref="ControllerClassPointcut" advice-ref="TxAdvice"/>
<!-- TxAdvice taken from ServiceContext -->
</aop:config>
<tx:advice id="TxAdvice" transaction-manager="TransactionManager">
<tx:attributes>
<tx:method name="*" propagation="Required"/>
</tx:attributes>
</tx:advice>
and the action method of the CompanyController is:
[HttpPost]
public virtual ActionResult Create(Guid id, CompanyonViewModel vm)
{
...
}
but I the advice does not take effect although the pointcut is recognized. If I take an other class than a controller as pointcut it works.
for some methods the advice works. For example for the setter for the repository. But Sprint.Net does not recognize that the action method "Create" is called
Candidate is: 'xxx.Controllers.CompanyController.set_CompanyService'; pattern is 'xxx.Controllers.CompanyController.*'; matched=True Candidate advisor [DefaultObjectFactoryPointcutAdvisor: pointcut [Spring.Aop.Support.SdkRegularExpressionMethodPointcut]; advice object = 'TxAdvice'] accepted for targetType [xxx.Controllers.CompanyController]
Thanks for your help