Reputation: 49
@Transactional
public class someClass implements someInterface {
@override
public void insertData() {
updateOtherTable();
}
private updateOtherTable() {
//will this use above transaction or will not use any transaction?
}
}
Upvotes: 2
Views: 1527
Reputation: 1786
Spring proxies your public insertData method so everything in that method is executed in a transaction. So yes transaction is applied for your private method also.
Upvotes: 4