rollbackFor « Transaction « Spring Q&A

Home
Spring Q&A
1.Annotation
2.AOP
3.Batch
4.Bean
5.Binding
6.Context
7.Core
8.Database
9.Development
10.EJB
11.Exception
12.File
13.GWT
14.Integration
15.Internationalization
16.Java EE
17.Job
18.JPA
19.JSF
20.Message
21.MVC
22.MVC Controller
23.Object
24.Remote
25.Roo
26.Security
27.Session
28.Spring Tool Suite
29.Struts
30.Test
31.Thread
32.Transaction
33.Web
34.Web Service
35.XML
Spring Q&A » Transaction » rollbackFor 

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

java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.