From 79cc0ec4aa591d2e3ed68a5325ebc5e2cf8b4944 Mon Sep 17 00:00:00 2001 From: Juergen Hoeller Date: Wed, 10 Jan 2024 13:07:20 +0100 Subject: [PATCH] Make prepareSynchronization overridable again Closes gh-32000 --- .../support/AbstractPlatformTransactionManager.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spring-tx/src/main/java/org/springframework/transaction/support/AbstractPlatformTransactionManager.java b/spring-tx/src/main/java/org/springframework/transaction/support/AbstractPlatformTransactionManager.java index 5187b3de1cf8..0ada2671fb70 100644 --- a/spring-tx/src/main/java/org/springframework/transaction/support/AbstractPlatformTransactionManager.java +++ b/spring-tx/src/main/java/org/springframework/transaction/support/AbstractPlatformTransactionManager.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2023 the original author or authors. + * Copyright 2002-2024 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. @@ -571,7 +571,7 @@ private DefaultTransactionStatus newTransactionStatus( /** * Initialize transaction synchronization as appropriate. */ - private void prepareSynchronization(DefaultTransactionStatus status, TransactionDefinition definition) { + protected void prepareSynchronization(DefaultTransactionStatus status, TransactionDefinition definition) { if (status.isNewSynchronization()) { TransactionSynchronizationManager.setActualTransactionActive(status.hasTransaction()); TransactionSynchronizationManager.setCurrentTransactionIsolationLevel(