|
|
|
@ -1,5 +1,5 @@ |
|
|
|
/* |
|
|
|
/* |
|
|
|
* Copyright 2002-2020 the original author or authors. |
|
|
|
* Copyright 2002-2022 the original author or authors. |
|
|
|
* |
|
|
|
* |
|
|
|
* Licensed under the Apache License, Version 2.0 (the "License"); |
|
|
|
* Licensed under the Apache License, Version 2.0 (the "License"); |
|
|
|
* you may not use this file except in compliance with the License. |
|
|
|
* you may not use this file except in compliance with the License. |
|
|
|
@ -80,7 +80,7 @@ import org.springframework.transaction.support.ResourceTransactionDefinition; |
|
|
|
* @author Costin Leau |
|
|
|
* @author Costin Leau |
|
|
|
* @since 2.0 |
|
|
|
* @since 2.0 |
|
|
|
* @see HibernateJpaVendorAdapter |
|
|
|
* @see HibernateJpaVendorAdapter |
|
|
|
* @see org.hibernate.Session#setFlushMode |
|
|
|
* @see org.hibernate.Session#setHibernateFlushMode |
|
|
|
* @see org.hibernate.Transaction#setTimeout |
|
|
|
* @see org.hibernate.Transaction#setTimeout |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
@SuppressWarnings("serial") |
|
|
|
@SuppressWarnings("serial") |
|
|
|
@ -360,10 +360,9 @@ public class HibernateJpaDialect extends DefaultJpaDialect { |
|
|
|
this.readOnly = readOnly; |
|
|
|
this.readOnly = readOnly; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@SuppressWarnings("deprecation") |
|
|
|
|
|
|
|
public void resetSessionState() { |
|
|
|
public void resetSessionState() { |
|
|
|
if (this.previousFlushMode != null) { |
|
|
|
if (this.previousFlushMode != null) { |
|
|
|
this.session.setFlushMode(this.previousFlushMode); |
|
|
|
this.session.setHibernateFlushMode(this.previousFlushMode); |
|
|
|
} |
|
|
|
} |
|
|
|
if (this.needsConnectionReset && |
|
|
|
if (this.needsConnectionReset && |
|
|
|
this.session.getJdbcCoordinator().getLogicalConnection().isPhysicallyConnected()) { |
|
|
|
this.session.getJdbcCoordinator().getLogicalConnection().isPhysicallyConnected()) { |
|
|
|
|