Spring transaction when calling private method

Viewed 5671

I have two questions.

If I have a method:

@Transactional
public method1(){
    method2()
}

public method2(){
    dao.save()
}

If there is an exception in method2(), will there be a rollback?

Another question:
If I have a method:

@Transactional
public method1(){
    method2()
}

private void method2(){
    dao.save()
}

If there is an exception in method2(), will there be a rollback?

2 Answers
Related