flush all sub sessions before commit when 2PC is not used

Description

When 2PC is not used, it can be interesting to minimize the risk and flush all operations before running all the commits.
We might be able to guess that and disable the internal Hibernate flush for each session in this case,
we also could let this as a recommended pattern for users (trigger flush manually before commit)
or we could do it during transaction.commit() maybe optionally (define a flag property)

Environment

None

Status

Assignee

Max Ross

Reporter

Emmanuel Bernard

Labels

None

Feedback Requested

None

Feedback Requested By

None

backPortable

None

Suitable for new contributors

None

Pull Request

None

backportDecision

None

backportReEvaluate

None

Components

Affects versions

Priority

Minor
Configure