You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When pool autocommit is disabled, inform Hibernate
Starting with Hibernate 5.2.10, the JPA property `hibernate.connection.provider_disables_autocommit`
should be set to true when the datasource has autocommit disabled in order to improve performance.
Fixes#9261
Copy file name to clipboardExpand all lines: spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/jdbc/metadata/CommonsDbcp2DataSourcePoolMetadata.java
+5Lines changed: 5 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -53,4 +53,9 @@ public String getValidationQuery() {
Copy file name to clipboardExpand all lines: spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/jdbc/metadata/DataSourcePoolMetadata.java
+8Lines changed: 8 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -71,4 +71,12 @@ public interface DataSourcePoolMetadata {
71
71
*/
72
72
StringgetValidationQuery();
73
73
74
+
/**
75
+
* The default auto-commit state of connections created by this pool.
76
+
* If not set ({@code null}), default is JDBC driver default
77
+
* (If set to null then the java.sql.Connection.setAutoCommit(boolean) method will not be called.)
78
+
* @return the default auto-commit state or {@code null}
Copy file name to clipboardExpand all lines: spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/jdbc/metadata/HikariDataSourcePoolMetadata.java
+5Lines changed: 5 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -66,4 +66,9 @@ public String getValidationQuery() {
Copy file name to clipboardExpand all lines: spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/jdbc/metadata/TomcatDataSourcePoolMetadata.java
+5Lines changed: 5 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -52,4 +52,9 @@ public String getValidationQuery() {
Copy file name to clipboardExpand all lines: spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/orm/jpa/HibernateJpaAutoConfiguration.java
0 commit comments