want declarative transactional management example in spring aop……..
Actually Here
<aop:config>
<aop:advisor advice-ref="addAdvice" pointcut="execution(* com.DAO.*.*(..))"/>
</aop:config>
<tx:advice id="addAdvice" transaction-manager="transactionManager">
<tx:attributes>
<tx:method name="add*" propagation="REQUIRED" rollback-for="" />
</tx:attributes>
</tx:advice>
So here what i want to write actually rollback-for=”” , is there any method or any else?
and if method then where will it that method put?
in
rollback-foryou specify the name of the exception. For example if you you want to rollback foryour.pkg.NoProductInStockException, you writeThis will make the transaction be rolled back if it encounters an exception that matches the specified. If an exception is thrown that does not match, it is propagated to the caller of the service or wrapped into a
TransactionRolledBackExceptionThe transaction documentation explains: