I have this simplified escenario in a Spring application with Java and Hibernate for persistence provider:
@Transactional
void method1() { // some savings}
@Transactional
void method2() { // some savings}
When I run a parent method (not annotated as transactional)
void parentMethod() {
method1();
method2();
}
Can I make sure that when the method finishes the changes are impacted in the database immediately before the method is called? Or that changes could be flush to database later, with some delay?
I'm interested on other applications seeing the changes made in database immediately when method1 finishes (and before method2 be called)
Update My parent method is not defined in the same class, and the class and firm of the my parent method has not @Transactional annotation
Thanks!