Skip to content

Commit cd4ef6f

Browse files
committed
Consistently refer to FlushMode.MANUAL instead of outdated NEVER
Closes gh-25158
1 parent 08474aa commit cd4ef6f

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

spring-orm/src/main/java/org/springframework/orm/hibernate5/support/OpenSessionInViewFilter.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2018 the original author or authors.
2+
* Copyright 2002-2020 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.
@@ -51,11 +51,11 @@
5151
* as well as for non-transactional execution (if configured appropriately).
5252
*
5353
* <p><b>NOTE</b>: This filter will by default <i>not</i> flush the Hibernate Session,
54-
* with the flush mode set to {@code FlushMode.NEVER}. It assumes to be used
54+
* with the flush mode set to {@code FlushMode.MANUAL}. It assumes to be used
5555
* in combination with service layer transactions that care for the flushing: The
5656
* active transaction manager will temporarily change the flush mode to
5757
* {@code FlushMode.AUTO} during a read-write transaction, with the flush
58-
* mode reset to {@code FlushMode.NEVER} at the end of each transaction.
58+
* mode reset to {@code FlushMode.MANUAL} at the end of each transaction.
5959
*
6060
* <p><b>WARNING:</b> Applying this filter to existing logic can cause issues that
6161
* have not appeared before, through the use of a single Hibernate Session for the

spring-tx/src/main/java/org/springframework/transaction/support/TransactionSynchronizationManager.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2019 the original author or authors.
2+
* Copyright 2002-2020 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.
@@ -383,7 +383,7 @@ public static void setCurrentTransactionReadOnly(boolean readOnly) {
383383
* as argument for the {@code beforeCommit} callback, to be able
384384
* to suppress change detection on commit. The present method is meant
385385
* to be used for earlier read-only checks, for example to set the
386-
* flush mode of a Hibernate Session to "FlushMode.NEVER" upfront.
386+
* flush mode of a Hibernate Session to "FlushMode.MANUAL" upfront.
387387
* @see org.springframework.transaction.TransactionDefinition#isReadOnly()
388388
* @see TransactionSynchronization#beforeCommit(boolean)
389389
*/

0 commit comments

Comments
 (0)