I have the following declaration:
<tx:advice id="txAdvice" transaction-manager="transactionManager">
<tx:attributes>
<tx:method name="*"/>
</tx:attributes>
</tx:advice>
I wrapped of the transactions all methods from the pointcut patterns.
But I want custom wrap one of the method.
Does has Spring.Net functionality of the “black list” for tx:advice?
I don’t think there is “black list” functionality in the
<tx:advice ... />tag. The transaction advice will always be applied to the matching methods.I think the intention of the
<tx:attributes ... />list is to specify which transaction attributes to use (depending on the name of the method) not to exclude methods from being wrapped in a transaction.If you’re only interested in applying custom transaction properties to a specific method, this can easily be done. For instance, if you want to set
read-only=trueinstead of the default valuefalseforVerySpecificMethod:The first matching method name will specifiy the transaction attributes to use so now,
VerySpecificMethodwill be executed within a read-only transaction. Other methods will use the default valuefalse.