From 36985d89f70c9cdbe16b3d36e5800f192cdaf061 Mon Sep 17 00:00:00 2001 From: Benjamin Graf Date: Sun, 24 Nov 2024 20:16:55 +0100 Subject: [PATCH] Cast JtaTransactionManager to org.springframework.transaction.TransactionManager while calling TransactionManagerCustomizers.customize because method to be removed in Spring Boot 3.4.0 --- narayana-spring-boot-core/pom.xml | 2 +- .../narayana-spring-boot-sample-2ds/pom.xml | 2 +- .../narayana-spring-boot-sample-2pc/pom.xml | 2 +- narayana-spring-boot-samples/pom.xml | 2 +- narayana-spring-boot-starter-it/pom.xml | 2 +- narayana-spring-boot-starter/pom.xml | 2 +- .../boot/narayana/autoconfigure/NarayanaAutoConfiguration.java | 2 +- .../narayana/autoconfigure/NarayanaAutoConfigurationTest.java | 2 +- openshift/recovery-controller/pom.xml | 2 +- pom.xml | 2 +- 10 files changed, 10 insertions(+), 10 deletions(-) diff --git a/narayana-spring-boot-core/pom.xml b/narayana-spring-boot-core/pom.xml index 5ab0fd25..0e56d904 100644 --- a/narayana-spring-boot-core/pom.xml +++ b/narayana-spring-boot-core/pom.xml @@ -19,7 +19,7 @@ dev.snowdrop narayana-spring-boot-parent - 3.3.0-SNAPSHOT + 3.3.1-SNAPSHOT narayana-spring-boot-core diff --git a/narayana-spring-boot-samples/narayana-spring-boot-sample-2ds/pom.xml b/narayana-spring-boot-samples/narayana-spring-boot-sample-2ds/pom.xml index a21254ff..684c0cd9 100644 --- a/narayana-spring-boot-samples/narayana-spring-boot-sample-2ds/pom.xml +++ b/narayana-spring-boot-samples/narayana-spring-boot-sample-2ds/pom.xml @@ -4,7 +4,7 @@ dev.snowdrop narayana-spring-boot-samples - 3.3.0-SNAPSHOT + 3.3.1-SNAPSHOT narayana-spring-boot-sample-2ds diff --git a/narayana-spring-boot-samples/narayana-spring-boot-sample-2pc/pom.xml b/narayana-spring-boot-samples/narayana-spring-boot-sample-2pc/pom.xml index e2311300..9998078e 100644 --- a/narayana-spring-boot-samples/narayana-spring-boot-sample-2pc/pom.xml +++ b/narayana-spring-boot-samples/narayana-spring-boot-sample-2pc/pom.xml @@ -4,7 +4,7 @@ dev.snowdrop narayana-spring-boot-samples - 3.3.0-SNAPSHOT + 3.3.1-SNAPSHOT narayana-spring-boot-sample-2pc diff --git a/narayana-spring-boot-samples/pom.xml b/narayana-spring-boot-samples/pom.xml index f8e696cc..a3560ee7 100644 --- a/narayana-spring-boot-samples/pom.xml +++ b/narayana-spring-boot-samples/pom.xml @@ -4,7 +4,7 @@ dev.snowdrop narayana-spring-boot-parent - 3.3.0-SNAPSHOT + 3.3.1-SNAPSHOT narayana-spring-boot-samples diff --git a/narayana-spring-boot-starter-it/pom.xml b/narayana-spring-boot-starter-it/pom.xml index 859a18ea..c18507ba 100644 --- a/narayana-spring-boot-starter-it/pom.xml +++ b/narayana-spring-boot-starter-it/pom.xml @@ -19,7 +19,7 @@ dev.snowdrop narayana-spring-boot-parent - 3.3.0-SNAPSHOT + 3.3.1-SNAPSHOT narayana-spring-boot-starter-it diff --git a/narayana-spring-boot-starter/pom.xml b/narayana-spring-boot-starter/pom.xml index 74c0fed6..70841a45 100644 --- a/narayana-spring-boot-starter/pom.xml +++ b/narayana-spring-boot-starter/pom.xml @@ -19,7 +19,7 @@ dev.snowdrop narayana-spring-boot-parent - 3.3.0-SNAPSHOT + 3.3.1-SNAPSHOT narayana-spring-boot-starter diff --git a/narayana-spring-boot-starter/src/main/java/dev/snowdrop/boot/narayana/autoconfigure/NarayanaAutoConfiguration.java b/narayana-spring-boot-starter/src/main/java/dev/snowdrop/boot/narayana/autoconfigure/NarayanaAutoConfiguration.java index 74ed8755..3405867c 100644 --- a/narayana-spring-boot-starter/src/main/java/dev/snowdrop/boot/narayana/autoconfigure/NarayanaAutoConfiguration.java +++ b/narayana-spring-boot-starter/src/main/java/dev/snowdrop/boot/narayana/autoconfigure/NarayanaAutoConfiguration.java @@ -116,7 +116,7 @@ public JtaTransactionManager transactionManager(UserTransaction userTransaction, JtaTransactionManager jtaTransactionManager = new JtaTransactionManager(userTransaction, transactionManager); jtaTransactionManager.setTransactionSynchronizationRegistry(transactionSynchronizationRegistry); if (this.transactionManagerCustomizers != null) { - this.transactionManagerCustomizers.customize(jtaTransactionManager); + this.transactionManagerCustomizers.customize((org.springframework.transaction.TransactionManager) jtaTransactionManager); } return jtaTransactionManager; } diff --git a/narayana-spring-boot-starter/src/test/java/dev/snowdrop/boot/narayana/autoconfigure/NarayanaAutoConfigurationTest.java b/narayana-spring-boot-starter/src/test/java/dev/snowdrop/boot/narayana/autoconfigure/NarayanaAutoConfigurationTest.java index 18052c9c..741cebe8 100644 --- a/narayana-spring-boot-starter/src/test/java/dev/snowdrop/boot/narayana/autoconfigure/NarayanaAutoConfigurationTest.java +++ b/narayana-spring-boot-starter/src/test/java/dev/snowdrop/boot/narayana/autoconfigure/NarayanaAutoConfigurationTest.java @@ -102,6 +102,6 @@ void jtaTransactionManagerShouldBeCustomized() { this.configuration = new NarayanaAutoConfiguration(this.mockTransactionManagerCustomizersProvider); JtaTransactionManager jtaTransactionManager = this.configuration.transactionManager( this.mockUserTransaction, this.mockTransactionManager, this.mockTransactionSynchronizationRegistry); - verify(this.mockTransactionManagerCustomizers).customize(jtaTransactionManager); + verify(this.mockTransactionManagerCustomizers).customize((org.springframework.transaction.TransactionManager) jtaTransactionManager); } } diff --git a/openshift/recovery-controller/pom.xml b/openshift/recovery-controller/pom.xml index 1e44fa1d..f0300bdd 100644 --- a/openshift/recovery-controller/pom.xml +++ b/openshift/recovery-controller/pom.xml @@ -19,7 +19,7 @@ dev.snowdrop narayana-spring-boot-parent - 3.3.0-SNAPSHOT + 3.3.1-SNAPSHOT ../../pom.xml diff --git a/pom.xml b/pom.xml index fc28cf3b..786d2f24 100644 --- a/pom.xml +++ b/pom.xml @@ -18,7 +18,7 @@ 4.0.0 dev.snowdrop narayana-spring-boot-parent - 3.3.0-SNAPSHOT + 3.3.1-SNAPSHOT pom Narayana Spring Boot :: parent