like that method1
@Transactional(rollbackFor = Exception.class)
public void reduce(list) {
for (someone : list) {
xxx
}
}
or method2
public void reduce(list) {
for (someone : list) {
reduceOne();
}
}
@Transactional(rollbackFor = Exception.class)
private void reduceOne(one) {
xxx
}
which one is better for concurrent system? and why?
if choose method2, how to resolve someone reduce fail?