diff --git a/spring-orm/src/main/java/org/springframework/orm/hibernate5/support/OpenSessionInViewFilter.java b/spring-orm/src/main/java/org/springframework/orm/hibernate5/support/OpenSessionInViewFilter.java index a68af6f7786e..ec23f51c025b 100644 --- a/spring-orm/src/main/java/org/springframework/orm/hibernate5/support/OpenSessionInViewFilter.java +++ b/spring-orm/src/main/java/org/springframework/orm/hibernate5/support/OpenSessionInViewFilter.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2018 the original author or authors. + * Copyright 2002-2020 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -51,11 +51,11 @@ * as well as for non-transactional execution (if configured appropriately). * *

NOTE: This filter will by default not flush the Hibernate Session, - * with the flush mode set to {@code FlushMode.NEVER}. It assumes to be used + * with the flush mode set to {@code FlushMode.MANUAL}. It assumes to be used * in combination with service layer transactions that care for the flushing: The * active transaction manager will temporarily change the flush mode to * {@code FlushMode.AUTO} during a read-write transaction, with the flush - * mode reset to {@code FlushMode.NEVER} at the end of each transaction. + * mode reset to {@code FlushMode.MANUAL} at the end of each transaction. * *

WARNING: Applying this filter to existing logic can cause issues that * have not appeared before, through the use of a single Hibernate Session for the diff --git a/spring-tx/src/main/java/org/springframework/transaction/support/TransactionSynchronizationManager.java b/spring-tx/src/main/java/org/springframework/transaction/support/TransactionSynchronizationManager.java index 19f20f8571e5..df9132d13d51 100644 --- a/spring-tx/src/main/java/org/springframework/transaction/support/TransactionSynchronizationManager.java +++ b/spring-tx/src/main/java/org/springframework/transaction/support/TransactionSynchronizationManager.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2019 the original author or authors. + * Copyright 2002-2020 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -383,7 +383,7 @@ public static void setCurrentTransactionReadOnly(boolean readOnly) { * as argument for the {@code beforeCommit} callback, to be able * to suppress change detection on commit. The present method is meant * to be used for earlier read-only checks, for example to set the - * flush mode of a Hibernate Session to "FlushMode.NEVER" upfront. + * flush mode of a Hibernate Session to "FlushMode.MANUAL" upfront. * @see org.springframework.transaction.TransactionDefinition#isReadOnly() * @see TransactionSynchronization#beforeCommit(boolean) */