Hi everybody!
I've looked at chapter 6.7 Concise proxy definitions and worked the suggestions into my config - works like a charm with a lot less xml!
Is possible to do the following: I have got a template (an abstract bean -> baseManager) that is extened by actual managers (e.g. entityTypeManager). Now I want to inherit transactionAttributes from my baseManager and declare some additional methods as well. But if I run the example above, only the the "new" methods will be executed within a transaction, which makes sense actually, since I am redefining the transactionAttributes.
Since this seems to be wrong, I wonder whether there is another approach to solve this (inherit tx-methods and define additional ones) without rewriting the inherited definitions.Code:<bean id="baseManager" abstract="true" class="org.springframework.transaction.interceptor.TransactionProxyFactoryBean"> <property name="transactionManager" ref="transactionManager"/> <property name="transactionAttributes"> <props> <prop key="save*">PROPAGATION_REQUIRED</prop> <prop key="delete*">PROPAGATION_REQUIRED</prop> ... </props> </property> ... </bean> <bean id="entityTypeManager" parent="baseManager"> <property name="target"> ... </property> <!-- additional methods that require tx support --> <property name="transactionAttributes"> <props> <prop key="getById*">PROPAGATION_REQUIRED</prop> <prop key="getByName">PROPAGATION_REQUIRED</prop> </props> </property> </bean>
Regards,
Tom


Reply With Quote