Majid Sharif
Majid Sharif

Reputation: 11

Using multiple AutoProxyCreator for the same objects

I am using Spring.Net for IOC and AOP. It seems Spring.Net does not support multiple AutoProxyCreators. I have following classes:

[Facade]
public abstract class AbstractFacade{
}

[TransactionSupportFacade]
public abstract class AbstractTransactionSupportFacade{
}

Some classes are inherited from above classes, I have following xml configuration:

  <object type="Spring.Aop.Framework.AutoProxy.AttributeAutoProxyCreator , Spring.Aop">
    <property name="AttributeTypes">
      <list>
        <value>Common.Attributes.TransactionSupportFacadeAttribute, Common</value>
      </list>
    </property>
    <property name="InterceptorNames">
      <list>
        <value>JUTransactionInterceptor</value>
      </list>
    </property>
    <property name="CheckInherited">
      <value>true</value>
    </property>
  </object>

  <object type="Spring.Aop.Framework.AutoProxy.AttributeAutoProxyCreator , Spring.Aop">
    <property name="AttributeTypes">
      <list>
        <value>Common.Attributes.FacadeAttribute, Common</value>
      </list>
    </property>
    <property name="InterceptorNames">
      <list>
        <value>IdentifyServiceAspect</value>
        <value>PushIdentityAspect</value>
        <value>AuthenticationAdvice</value>
        <value>ValidationAspect</value>
        <value>ServiceCallResultWrapperAspect</value>
      </list>
    </property>
    <property name="CheckInherited">
      <value>true</value>
    </property>
  </object>

the problem raises here, only one of these AttributeAutoProxyCreators work at the same time, please help me to solve this problem.

Upvotes: 1

Views: 151

Answers (0)

Related Questions