I\'m using Hibernate + spring + @Transactional
annotations to handle transactions in my application.
Transaction manager is declared as follows:
Create another annotation, e.g. @NoRollbackTransactional
, something like:
@Transactional(noRollbackFor = RuntimeException.class)
public @interface NoRollbackTransactional {
}
And use this on your methods. On the other hand I agree with Donal's comment, you should revise your transaction scopes, imho it is generally not a good idea to call @Transactional
from another @Transactional
.