Skip to content

Commit 8a5e47a

Browse files
committed
Explicit note on change of read-only handling in 4.1
Issue: SPR-8959 (cherry picked from commit 0280a2a)
1 parent 348eb91 commit 8a5e47a

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

spring-orm/src/main/java/org/springframework/orm/jpa/vendor/HibernateJpaDialect.java

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2014 the original author or authors.
2+
* Copyright 2002-2015 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -119,6 +119,13 @@ public class HibernateJpaDialect extends DefaultJpaDialect {
119119
* {@code Connection.setReadOnly(true)} for read-only transactions anymore either.
120120
* If this flag is turned off, no cleanup of a JDBC Connection is required after
121121
* a transaction, since no Connection settings will get modified.
122+
* <p><b>NOTE:</b> The default behavior in terms of read-only handling changed
123+
* in Spring 4.1, propagating the read-only status to the JDBC Connection now,
124+
* analogous to other Spring transaction managers. This may have the effect
125+
* that you're running into read-only enforcement now where previously write
126+
* access has accidentally been tolerated: Please revise your transaction
127+
* declarations accordingly, removing invalid read-only markers if necessary.
128+
* @since 4.1
122129
* @see java.sql.Connection#setTransactionIsolation
123130
* @see java.sql.Connection#setReadOnly
124131
*/

0 commit comments

Comments
 (0)