I couldn't find a definitive answer to this in the docs, and although there seems to be a logical answer, one can't be sure. The scenario is this - you have a xml-based transaction definition, like:
<tx:advice id="txAdvice" transaction-manager="jpaTransactionManager">
<tx:attributes>
<tx:method name="*" propagation="REQUIRED" />
</tx:attributes>
</tx:advice>
Which advises all service methods. But then you have @Transactional
on a concrete class/method, where you want to override the propagation
attribute.
It is clear that @Transactional
at method-level overrides the same one at class-level, but does it override the <tx:advice>
(and actually, the <aop:pointcut>
)?
I hope two interceptors won't be created on the same class, (and whichever happens to be first will start the transaction)