rollbackFor « Transaction « Spring Q&A





1. Spring @Transactional - Can I Override rollbackFor    stackoverflow.com

I am calling a service which has the following annotation:

@Transactional(rollbackFor=ExceptionA.class)
public void myMethodA(....) throws ExceptionA {
.
.
}
I am calling this method from an other method in another Spring Bean.
@Transactional(rollbackFor=ExceptionB.class)
public void mainEntryPointMethod(....) throws ExceptionB ...

2. @Transactional rollbackFor question    stackoverflow.com

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

try{
    serverStore.update(persistableObject);
     } ...

3. Problem with @Transactional rollbackFor    forum.springsource.org

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    forum.springsource.org

@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    forum.springsource.org

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 ...