rollbackFor « Transaction « Spring Q&A

1. Spring @Transactional - Can I Override rollbackFor

I am calling a service which has the following annotation:

public void myMethodA(....) throws ExceptionA {
I am calling this method from an other method in another Spring Bean.
public void mainEntryPointMethod(....) throws ExceptionB ...

2. @Transactional rollbackFor question

Supposing I mark a method @Transactional(rollbackFor = PersistenceException.class) in my Service layer and have a catch block as follows within the method.

     } ...

3. Problem with @Transactional rollbackFor

Problem with @Transactional rollbackFor Hi all, I am currently stuck with the following problem. My method is marked with the @Transactional annotation. So far so good. However, I want to rollback ...

4. @Transactional and specified rollbackFor Exceptions

@Transactional and specified rollbackFor Exceptions I'm having a problem getting rollback to work for specified exceptions. If I force my method to throw RuntimeException then the transaction is rolled back successfully. ...

5. best way to set rollbackFor using transaction annotation

Hi, I am using spring transaction annotation and it is causing pain for me to set the rollback flag on each and every file (as shown below) @Transactional(rollbackFor=Exception.class) Is ...