Added no roll back example
This commit is contained in:
parent
1b4e5782ec
commit
3bf9bf4094
@ -35,4 +35,10 @@ public class CourseService {
|
||||
}
|
||||
}
|
||||
|
||||
@Transactional(noRollbackFor = { SQLException.class })
|
||||
public void createCourseDeclarativeWithNoRollBack(Course course) throws SQLException {
|
||||
courseDao.create(course);
|
||||
throw new SQLException("Throwing exception for demoing Rollback!!!");
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user