PDA

View Full Version : Inherited TransactionAttributes


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>

Mark Pollack
07-02-2007, 02:37 PM
Hi,

Merging of dictionary values between parent/child is not yet supported, it is supported in Spring Java 2.x at the moment. There was another forum post (http://forum.springframework.net/showthread.php?t=2631) related to this and I've now created a JIRA entry (http://opensource.atlassian.com/projects/spring/browse/SPRNET-620). I've placed it under the RC1 release.

Cheers,
Mark

dressina
07-02-2007, 06:10 PM
Cool... thanks Mark.