Added no roll back example
This commit is contained in:
+6
@@ -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!!!");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user