No one.
In the default configuration, insert are executed at the last moment, they can, I mean, hibernate saves them until the end of the transaction or any other point (if there are flush commands, some other select commands ...).
But committing does not depend on it at all, committing only when you (or Spring!) Complete the transaction. So it depends on how you manage the transaction, if you are using Spring declarative transaction management, then it is important which method has the transaction attribute and which attribute it has.
source share