dressina
07-02-2007, 03:52 AM
Hello,
When using an abstract TransactionProxyFactoryObject to define common TransactionAttributes for my beans, can I then "merge" or "add" to that list on the child bean definitions? It seems like when I define TransactionAttributes on the child bean, it ignores the parent attributes. Thanks, Aaron
<object id="TxProxyConfigurationTemplate" abstract="true"
type="Spring.Transaction.Interceptor.TransactionProxyFac toryObject, Spring.Data">
<property name="PlatformTransactionManager" ref="HibernateTransactionManager"/>
<property name="TransactionAttributes">
<name-values>
<!-- Add common methods across your services here -->
<add key="Update*" value="PROPAGATION_REQUIRED"/>
<add key="Delete*" value="PROPAGATION_REQUIRED"/>
</name-values>
</property>
</object>
<object id="ChildManager" parent="TxProxyConfigurationTemplate">
<property name="TransactionAttributes">
<name-values>
<add key="PostAndClose" value="PROPAGATION_REQUIRED"/>
</name-values>
</property>
<property name="Target">
...
</property>
</object>
When using an abstract TransactionProxyFactoryObject to define common TransactionAttributes for my beans, can I then "merge" or "add" to that list on the child bean definitions? It seems like when I define TransactionAttributes on the child bean, it ignores the parent attributes. Thanks, Aaron
<object id="TxProxyConfigurationTemplate" abstract="true"
type="Spring.Transaction.Interceptor.TransactionProxyFac toryObject, Spring.Data">
<property name="PlatformTransactionManager" ref="HibernateTransactionManager"/>
<property name="TransactionAttributes">
<name-values>
<!-- Add common methods across your services here -->
<add key="Update*" value="PROPAGATION_REQUIRED"/>
<add key="Delete*" value="PROPAGATION_REQUIRED"/>
</name-values>
</property>
</object>
<object id="ChildManager" parent="TxProxyConfigurationTemplate">
<property name="TransactionAttributes">
<name-values>
<add key="PostAndClose" value="PROPAGATION_REQUIRED"/>
</name-values>
</property>
<property name="Target">
...
</property>
</object>