Merge branch '5.3.x'

This commit is contained in:
Juergen Hoeller
2022-03-25 18:08:55 +01:00
4 changed files with 52 additions and 18 deletions

View File

@@ -79,7 +79,7 @@ import org.springframework.transaction.support.ResourceTransactionDefinition;
* @author Costin Leau
* @since 2.0
* @see HibernateJpaVendorAdapter
* @see org.hibernate.Session#setFlushMode
* @see org.hibernate.Session#setHibernateFlushMode
* @see org.hibernate.Transaction#setTimeout
*/
@SuppressWarnings("serial")
@@ -349,10 +349,9 @@ public class HibernateJpaDialect extends DefaultJpaDialect {
this.readOnly = readOnly;
}
@SuppressWarnings("deprecation")
public void resetSessionState() {
if (this.previousFlushMode != null) {
this.session.setFlushMode(this.previousFlushMode);
this.session.setHibernateFlushMode(this.previousFlushMode);
}
if (this.needsConnectionReset &&
this.session.getJdbcCoordinator().getLogicalConnection().isPhysicallyConnected()) {