You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ji...@apache.org on 2023/08/10 11:09:16 UTC

[camel-quarkus] 02/02: Revisit #4048 to Springless JPA extension (#5147)

This is an automated email from the ASF dual-hosted git repository.

jiriondrusek pushed a commit to branch camel-4.0.0-upgrade
in repository https://gitbox.apache.org/repos/asf/camel-quarkus.git

commit 6a5e3b62f7b3baacfa49aaef1a1644a0935b65c4
Author: Zheng Feng <zh...@gmail.com>
AuthorDate: Tue Aug 8 08:31:26 2023 +0800

    Revisit #4048 to Springless JPA extension (#5147)
    
    * Revert "Fixed JPA (CAMEL-19225)"
    
    This reverts commit 256e2f9db81c0c5007e21933a5927a1a832ba0c7.
    
    * Revisit #4048 to Springless JPA extension
    
    * Apply suggestions from code review
    
    Co-authored-by: James Netherton <ja...@users.noreply.github.com>
    
    * Fix jpa docs
    
    * Refactor graal substitution
    
    ---------
    
    Co-authored-by: James Netherton <ja...@users.noreply.github.com>
---
 .../ROOT/pages/reference/extensions/jpa.adoc       | 29 ++++++++++-
 extensions/jpa/deployment/pom.xml                  |  4 --
 .../component/jpa/deployment/JpaProcessor.java     | 23 +++++++++
 extensions/jpa/runtime/pom.xml                     | 14 ++---
 .../jpa/runtime/src/main/doc/configuration.adoc    | 28 +++++++++-
 .../quarkus/component/jpa/CamelJpaProducer.java}   | 21 ++++----
 .../quarkus/component/jpa/CamelJpaRecorder.java}   | 19 +++----
 .../component/jpa/QuarkusTransactionStrategy.java} | 17 ++++---
 .../component/jpa/graal/JpaSubstitution.java       | 59 ++++++++++++++++++++++
 .../orm/jpa/SharedEntityManagerCreator.java}       | 15 +++---
 .../camel/quarkus/component/jpa/it/JpaRoute.java   |  9 ++--
 poms/bom/pom.xml                                   |  4 ++
 poms/bom/src/main/generated/flattened-full-pom.xml |  4 ++
 .../src/main/generated/flattened-reduced-pom.xml   | 19 ++-----
 .../generated/flattened-reduced-verbose-pom.xml    | 19 ++-----
 15 files changed, 200 insertions(+), 84 deletions(-)

diff --git a/docs/modules/ROOT/pages/reference/extensions/jpa.adoc b/docs/modules/ROOT/pages/reference/extensions/jpa.adoc
index 0b55384217..f5af553fd8 100644
--- a/docs/modules/ROOT/pages/reference/extensions/jpa.adoc
+++ b/docs/modules/ROOT/pages/reference/extensions/jpa.adoc
@@ -50,5 +50,32 @@ endif::[]
 
 The extension leverages https://quarkus.io/guides/hibernate-orm[Quarkus Hibernate ORM] to provide the JPA implementation via Hibernate.
 
-Refer to the https://quarkus.io/guides/hibernate-orm[Quarkus Hibernate ORM] documentation to see how to configure Hibernate and your datasource,
+Refer to the https://quarkus.io/guides/hibernate-orm[Quarkus Hibernate ORM] documentation to see how to configure Hibernate and your datasource.
+
+Also, it leverages https://quarkus.io/guides/transaction#programmatic-approach[Quarkus TX API] to provide `TransactionStrategy` implementation.
+
+When a single persistence unit is used, the Camel Quarkus JPA extension will automatically configure the JPA component with a
+`EntityManagerFactory` and `TransactionStrategy`.
+
+[id="extensions-jpa-configuration-configuring-jpamessageidrepository"]
+=== Configuring JpaMessageIdRepository
+It needs to use `EntityManagerFactory` and `TransactionStrategy` from the CDI container to configure the `JpaMessageIdRepository`:
+[source, java]
+----
+@Inject
+EntityManagerFactory entityManagerFactory;
+
+@Inject
+TransactionStrategy transactionStrategy;
+
+from("direct:idempotent")
+    .idempotentConsumer(
+        header("messageId"),
+        new JpaMessageIdRepository(entityManagerFactory, transactionStrategy, "idempotentProcessor"));
+----
+
+[NOTE]
+====
+Since it excludes the `spring-orm` dependency, some options such as `sharedEntityManager`, `transactionManager`  are not supported.
+====
 
diff --git a/extensions/jpa/deployment/pom.xml b/extensions/jpa/deployment/pom.xml
index 3738c46d17..445540193c 100644
--- a/extensions/jpa/deployment/pom.xml
+++ b/extensions/jpa/deployment/pom.xml
@@ -38,10 +38,6 @@
             <groupId>org.apache.camel.quarkus</groupId>
             <artifactId>camel-quarkus-core-deployment</artifactId>
         </dependency>
-        <dependency>
-            <groupId>org.apache.camel.quarkus</groupId>
-            <artifactId>camel-quarkus-support-spring-deployment</artifactId>
-        </dependency>
         <dependency>
             <groupId>org.apache.camel.quarkus</groupId>
             <artifactId>camel-quarkus-jpa</artifactId>
diff --git a/extensions/jpa/deployment/src/main/java/org/apache/camel/quarkus/component/jpa/deployment/JpaProcessor.java b/extensions/jpa/deployment/src/main/java/org/apache/camel/quarkus/component/jpa/deployment/JpaProcessor.java
index 6d53641456..adfc8405b8 100644
--- a/extensions/jpa/deployment/src/main/java/org/apache/camel/quarkus/component/jpa/deployment/JpaProcessor.java
+++ b/extensions/jpa/deployment/src/main/java/org/apache/camel/quarkus/component/jpa/deployment/JpaProcessor.java
@@ -16,8 +16,16 @@
  */
 package org.apache.camel.quarkus.component.jpa.deployment;
 
+import io.quarkus.arc.deployment.AdditionalBeanBuildItem;
+import io.quarkus.deployment.annotations.BuildProducer;
 import io.quarkus.deployment.annotations.BuildStep;
+import io.quarkus.deployment.annotations.ExecutionTime;
+import io.quarkus.deployment.annotations.Record;
 import io.quarkus.deployment.builditem.FeatureBuildItem;
+import org.apache.camel.component.jpa.JpaComponent;
+import org.apache.camel.quarkus.component.jpa.CamelJpaProducer;
+import org.apache.camel.quarkus.component.jpa.CamelJpaRecorder;
+import org.apache.camel.quarkus.core.deployment.spi.CamelRuntimeBeanBuildItem;
 
 class JpaProcessor {
 
@@ -27,4 +35,19 @@ class JpaProcessor {
     FeatureBuildItem feature() {
         return new FeatureBuildItem(FEATURE);
     }
+
+    @Record(ExecutionTime.RUNTIME_INIT)
+    @BuildStep
+    void configureJpaComponentBean(
+            BuildProducer<AdditionalBeanBuildItem> additionalBeans,
+            BuildProducer<CamelRuntimeBeanBuildItem> camelRuntimeBean,
+            CamelJpaRecorder recorder) {
+        additionalBeans.produce(new AdditionalBeanBuildItem(CamelJpaProducer.class));
+
+        camelRuntimeBean.produce(
+                new CamelRuntimeBeanBuildItem(
+                        "jpa",
+                        JpaComponent.class.getName(),
+                        recorder.createJpaComponent()));
+    }
 }
diff --git a/extensions/jpa/runtime/pom.xml b/extensions/jpa/runtime/pom.xml
index 1a8c05a9f7..7cb1dc7a33 100644
--- a/extensions/jpa/runtime/pom.xml
+++ b/extensions/jpa/runtime/pom.xml
@@ -36,6 +36,11 @@
     </properties>
 
     <dependencies>
+	<dependency>
+            <groupId>org.graalvm.sdk</groupId>
+            <artifactId>graal-sdk</artifactId>
+            <scope>provided</scope>
+        </dependency>
         <dependency>
             <groupId>io.quarkus</groupId>
             <artifactId>quarkus-hibernate-orm</artifactId>
@@ -44,19 +49,10 @@
             <groupId>org.apache.camel.quarkus</groupId>
             <artifactId>camel-quarkus-core</artifactId>
         </dependency>
-        <dependency>
-            <groupId>org.apache.camel.quarkus</groupId>
-            <artifactId>camel-quarkus-support-spring</artifactId>
-        </dependency>
         <dependency>
             <groupId>org.apache.camel</groupId>
             <artifactId>camel-jpa</artifactId>
         </dependency>
-
-        <dependency><!-- https://github.com/apache/camel-quarkus/issues/4084 -->
-            <groupId>org.springframework</groupId>
-            <artifactId>spring-tx</artifactId>
-        </dependency>
     </dependencies>
 
     <build>
diff --git a/extensions/jpa/runtime/src/main/doc/configuration.adoc b/extensions/jpa/runtime/src/main/doc/configuration.adoc
index f398236b25..0be017ccf1 100644
--- a/extensions/jpa/runtime/src/main/doc/configuration.adoc
+++ b/extensions/jpa/runtime/src/main/doc/configuration.adoc
@@ -1,3 +1,29 @@
 The extension leverages https://quarkus.io/guides/hibernate-orm[Quarkus Hibernate ORM] to provide the JPA implementation via Hibernate.
 
-Refer to the https://quarkus.io/guides/hibernate-orm[Quarkus Hibernate ORM] documentation to see how to configure Hibernate and your datasource,
+Refer to the https://quarkus.io/guides/hibernate-orm[Quarkus Hibernate ORM] documentation to see how to configure Hibernate and your datasource.
+
+Also, it leverages https://quarkus.io/guides/transaction#programmatic-approach[Quarkus TX API] to provide `TransactionStrategy` implementation.
+
+When a single persistence unit is used, the Camel Quarkus JPA extension will automatically configure the JPA component with a
+`EntityManagerFactory` and `TransactionStrategy`.
+
+=== Configuring JpaMessageIdRepository
+It needs to use `EntityManagerFactory` and `TransactionStrategy` from the CDI container to configure the `JpaMessageIdRepository`:
+[source, java]
+----
+@Inject
+EntityManagerFactory entityManagerFactory;
+
+@Inject
+TransactionStrategy transactionStrategy;
+
+from("direct:idempotent")
+    .idempotentConsumer(
+        header("messageId"),
+        new JpaMessageIdRepository(entityManagerFactory, transactionStrategy, "idempotentProcessor"));
+----
+
+[NOTE]
+====
+Since it excludes the `spring-orm` dependency, some options such as `sharedEntityManager`, `transactionManager`  are not supported.
+====
diff --git a/extensions/jpa/deployment/src/main/java/org/apache/camel/quarkus/component/jpa/deployment/JpaProcessor.java b/extensions/jpa/runtime/src/main/java/org/apache/camel/quarkus/component/jpa/CamelJpaProducer.java
similarity index 64%
copy from extensions/jpa/deployment/src/main/java/org/apache/camel/quarkus/component/jpa/deployment/JpaProcessor.java
copy to extensions/jpa/runtime/src/main/java/org/apache/camel/quarkus/component/jpa/CamelJpaProducer.java
index 6d53641456..25ffd6e2c7 100644
--- a/extensions/jpa/deployment/src/main/java/org/apache/camel/quarkus/component/jpa/deployment/JpaProcessor.java
+++ b/extensions/jpa/runtime/src/main/java/org/apache/camel/quarkus/component/jpa/CamelJpaProducer.java
@@ -14,17 +14,18 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.camel.quarkus.component.jpa.deployment;
+package org.apache.camel.quarkus.component.jpa;
 
-import io.quarkus.deployment.annotations.BuildStep;
-import io.quarkus.deployment.builditem.FeatureBuildItem;
+import jakarta.enterprise.context.ApplicationScoped;
+import jakarta.enterprise.context.Dependent;
+import jakarta.enterprise.inject.Produces;
+import org.apache.camel.component.jpa.TransactionStrategy;
 
-class JpaProcessor {
-
-    private static final String FEATURE = "camel-jpa";
-
-    @BuildStep
-    FeatureBuildItem feature() {
-        return new FeatureBuildItem(FEATURE);
+@Dependent
+public class CamelJpaProducer {
+    @Produces
+    @ApplicationScoped
+    public TransactionStrategy quarkusTransactionStrategy() {
+        return new QuarkusTransactionStrategy();
     }
 }
diff --git a/extensions/jpa/deployment/src/main/java/org/apache/camel/quarkus/component/jpa/deployment/JpaProcessor.java b/extensions/jpa/runtime/src/main/java/org/apache/camel/quarkus/component/jpa/CamelJpaRecorder.java
similarity index 63%
copy from extensions/jpa/deployment/src/main/java/org/apache/camel/quarkus/component/jpa/deployment/JpaProcessor.java
copy to extensions/jpa/runtime/src/main/java/org/apache/camel/quarkus/component/jpa/CamelJpaRecorder.java
index 6d53641456..658d5424ee 100644
--- a/extensions/jpa/deployment/src/main/java/org/apache/camel/quarkus/component/jpa/deployment/JpaProcessor.java
+++ b/extensions/jpa/runtime/src/main/java/org/apache/camel/quarkus/component/jpa/CamelJpaRecorder.java
@@ -14,17 +14,18 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.camel.quarkus.component.jpa.deployment;
+package org.apache.camel.quarkus.component.jpa;
 
-import io.quarkus.deployment.annotations.BuildStep;
-import io.quarkus.deployment.builditem.FeatureBuildItem;
+import io.quarkus.runtime.RuntimeValue;
+import io.quarkus.runtime.annotations.Recorder;
+import org.apache.camel.component.jpa.JpaComponent;
 
-class JpaProcessor {
+@Recorder
+public class CamelJpaRecorder {
 
-    private static final String FEATURE = "camel-jpa";
-
-    @BuildStep
-    FeatureBuildItem feature() {
-        return new FeatureBuildItem(FEATURE);
+    public RuntimeValue<JpaComponent> createJpaComponent() {
+        JpaComponent component = new JpaComponent();
+        component.setTransactionStrategy(new QuarkusTransactionStrategy());
+        return new RuntimeValue<>(component);
     }
 }
diff --git a/extensions/jpa/deployment/src/main/java/org/apache/camel/quarkus/component/jpa/deployment/JpaProcessor.java b/extensions/jpa/runtime/src/main/java/org/apache/camel/quarkus/component/jpa/QuarkusTransactionStrategy.java
similarity index 61%
copy from extensions/jpa/deployment/src/main/java/org/apache/camel/quarkus/component/jpa/deployment/JpaProcessor.java
copy to extensions/jpa/runtime/src/main/java/org/apache/camel/quarkus/component/jpa/QuarkusTransactionStrategy.java
index 6d53641456..755968491a 100644
--- a/extensions/jpa/deployment/src/main/java/org/apache/camel/quarkus/component/jpa/deployment/JpaProcessor.java
+++ b/extensions/jpa/runtime/src/main/java/org/apache/camel/quarkus/component/jpa/QuarkusTransactionStrategy.java
@@ -14,17 +14,18 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.camel.quarkus.component.jpa.deployment;
 
-import io.quarkus.deployment.annotations.BuildStep;
-import io.quarkus.deployment.builditem.FeatureBuildItem;
+package org.apache.camel.quarkus.component.jpa;
 
-class JpaProcessor {
+import io.quarkus.narayana.jta.QuarkusTransaction;
+import io.quarkus.narayana.jta.RunOptions;
+import org.apache.camel.component.jpa.TransactionStrategy;
 
-    private static final String FEATURE = "camel-jpa";
+import static io.quarkus.narayana.jta.QuarkusTransaction.runOptions;
 
-    @BuildStep
-    FeatureBuildItem feature() {
-        return new FeatureBuildItem(FEATURE);
+public class QuarkusTransactionStrategy implements TransactionStrategy {
+    @Override
+    public void executeInTransaction(Runnable runnable) {
+        QuarkusTransaction.run(runOptions().semantic(RunOptions.Semantic.JOIN_EXISTING), runnable);
     }
 }
diff --git a/extensions/jpa/runtime/src/main/java/org/apache/camel/quarkus/component/jpa/graal/JpaSubstitution.java b/extensions/jpa/runtime/src/main/java/org/apache/camel/quarkus/component/jpa/graal/JpaSubstitution.java
new file mode 100644
index 0000000000..b7672a1fa9
--- /dev/null
+++ b/extensions/jpa/runtime/src/main/java/org/apache/camel/quarkus/component/jpa/graal/JpaSubstitution.java
@@ -0,0 +1,59 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.camel.quarkus.component.jpa.graal;
+
+import com.oracle.svm.core.annotate.Alias;
+import com.oracle.svm.core.annotate.Delete;
+import com.oracle.svm.core.annotate.Substitute;
+import com.oracle.svm.core.annotate.TargetClass;
+import jakarta.persistence.EntityManagerFactory;
+import org.apache.camel.component.jpa.DefaultTransactionStrategy;
+import org.apache.camel.component.jpa.JpaComponent;
+import org.apache.camel.component.jpa.JpaEndpoint;
+import org.apache.camel.component.jpa.TransactionStrategy;
+
+final public class JpaSubstitution {
+}
+
+@TargetClass(JpaEndpoint.class)
+final class JpaEndpointSubstitution {
+    @Alias
+    private TransactionStrategy transactionStrategy;
+
+    @Substitute
+    protected EntityManagerFactory createEntityManagerFactory() {
+        throw new UnsupportedOperationException("createEntityManagerFactory is not supported");
+    }
+
+    @Substitute
+    public TransactionStrategy getTransactionStrategy() {
+        return transactionStrategy;
+    }
+}
+
+@TargetClass(JpaComponent.class)
+final class JpaComponentSubstitution {
+    @Substitute
+    private void createTransactionStrategy() {
+    }
+}
+
+@TargetClass(DefaultTransactionStrategy.class)
+@Delete
+final class DefaultTransactionStrategySubstitution {
+}
diff --git a/extensions/jpa/deployment/src/main/java/org/apache/camel/quarkus/component/jpa/deployment/JpaProcessor.java b/extensions/jpa/runtime/src/main/java/org/springframework/orm/jpa/SharedEntityManagerCreator.java
similarity index 69%
copy from extensions/jpa/deployment/src/main/java/org/apache/camel/quarkus/component/jpa/deployment/JpaProcessor.java
copy to extensions/jpa/runtime/src/main/java/org/springframework/orm/jpa/SharedEntityManagerCreator.java
index 6d53641456..07f90799be 100644
--- a/extensions/jpa/deployment/src/main/java/org/apache/camel/quarkus/component/jpa/deployment/JpaProcessor.java
+++ b/extensions/jpa/runtime/src/main/java/org/springframework/orm/jpa/SharedEntityManagerCreator.java
@@ -14,17 +14,14 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.camel.quarkus.component.jpa.deployment;
 
-import io.quarkus.deployment.annotations.BuildStep;
-import io.quarkus.deployment.builditem.FeatureBuildItem;
+package org.springframework.orm.jpa;
 
-class JpaProcessor {
+import jakarta.persistence.EntityManager;
+import jakarta.persistence.EntityManagerFactory;
 
-    private static final String FEATURE = "camel-jpa";
-
-    @BuildStep
-    FeatureBuildItem feature() {
-        return new FeatureBuildItem(FEATURE);
+public abstract class SharedEntityManagerCreator {
+    public static EntityManager createSharedEntityManager(EntityManagerFactory emf) {
+        throw new UnsupportedOperationException("createSharedEntityManager is not supported");
     }
 }
diff --git a/integration-tests/jpa/src/main/java/org/apache/camel/quarkus/component/jpa/it/JpaRoute.java b/integration-tests/jpa/src/main/java/org/apache/camel/quarkus/component/jpa/it/JpaRoute.java
index 6f3bf380f2..737dcd7bd1 100644
--- a/integration-tests/jpa/src/main/java/org/apache/camel/quarkus/component/jpa/it/JpaRoute.java
+++ b/integration-tests/jpa/src/main/java/org/apache/camel/quarkus/component/jpa/it/JpaRoute.java
@@ -22,16 +22,19 @@ import jakarta.enterprise.context.ApplicationScoped;
 import jakarta.inject.Inject;
 import jakarta.persistence.EntityManagerFactory;
 import org.apache.camel.builder.RouteBuilder;
+import org.apache.camel.component.jpa.TransactionStrategy;
+import org.apache.camel.processor.idempotent.jpa.JpaMessageIdRepository;
 import org.apache.camel.quarkus.component.jpa.it.model.Fruit;
 
-import static org.apache.camel.processor.idempotent.jpa.JpaMessageIdRepository.jpaMessageIdRepository;
-
 @ApplicationScoped
 public class JpaRoute extends RouteBuilder {
 
     @Inject
     EntityManagerFactory entityManagerFactory;
 
+    @Inject
+    TransactionStrategy transactionStrategy;
+
     @Override
     public void configure() throws Exception {
         String jpaEndpoint = "jpa:" + Fruit.class.getName();
@@ -72,7 +75,7 @@ public class JpaRoute extends RouteBuilder {
         from("direct:idempotent")
                 .idempotentConsumer(
                         header("messageId"),
-                        jpaMessageIdRepository(entityManagerFactory, "idempotentProcessor"))
+                        new JpaMessageIdRepository(entityManagerFactory, transactionStrategy, "idempotentProcessor"))
                 .log("Consumes messageId: ${header.messageId}")
                 .to("mock:idempotent");
 
diff --git a/poms/bom/pom.xml b/poms/bom/pom.xml
index 9d0214dbcc..d4b4b6dba9 100644
--- a/poms/bom/pom.xml
+++ b/poms/bom/pom.xml
@@ -1578,6 +1578,10 @@
                         <groupId>org.apache.camel</groupId>
                         <artifactId>camel-spring</artifactId>
                     </exclusion>
+                    <exclusion>
+                        <groupId>org.springframework</groupId>
+                        <artifactId>spring-orm</artifactId>
+                    </exclusion>
                 </exclusions>
             </dependency>
             <dependency>
diff --git a/poms/bom/src/main/generated/flattened-full-pom.xml b/poms/bom/src/main/generated/flattened-full-pom.xml
index 69b7d4b8c7..2daf86885b 100644
--- a/poms/bom/src/main/generated/flattened-full-pom.xml
+++ b/poms/bom/src/main/generated/flattened-full-pom.xml
@@ -1516,6 +1516,10 @@
             <groupId>org.apache.camel</groupId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} -->
             <artifactId>camel-spring</artifactId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} -->
           </exclusion>
+          <exclusion>
+            <groupId>org.springframework</groupId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} -->
+            <artifactId>spring-orm</artifactId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} -->
+          </exclusion>
         </exclusions>
       </dependency>
       <dependency>
diff --git a/poms/bom/src/main/generated/flattened-reduced-pom.xml b/poms/bom/src/main/generated/flattened-reduced-pom.xml
index 05a4cce50d..f9cfca0b7a 100644
--- a/poms/bom/src/main/generated/flattened-reduced-pom.xml
+++ b/poms/bom/src/main/generated/flattened-reduced-pom.xml
@@ -1516,6 +1516,10 @@
             <groupId>org.apache.camel</groupId>
             <artifactId>camel-spring</artifactId>
           </exclusion>
+          <exclusion>
+            <groupId>org.springframework</groupId>
+            <artifactId>spring-orm</artifactId>
+          </exclusion>
         </exclusions>
       </dependency>
       <dependency>
@@ -6569,21 +6573,6 @@
           </exclusion>
         </exclusions>
       </dependency>
-      <dependency>
-        <groupId>org.springframework</groupId>
-        <artifactId>spring-orm</artifactId>
-        <version>6.0.11</version>
-        <exclusions>
-          <exclusion>
-            <groupId>org.springframework</groupId>
-            <artifactId>spring-beans</artifactId>
-          </exclusion>
-          <exclusion>
-            <groupId>org.springframework</groupId>
-            <artifactId>spring-core</artifactId>
-          </exclusion>
-        </exclusions>
-      </dependency>
       <dependency>
         <groupId>org.springframework</groupId>
         <artifactId>spring-tx</artifactId>
diff --git a/poms/bom/src/main/generated/flattened-reduced-verbose-pom.xml b/poms/bom/src/main/generated/flattened-reduced-verbose-pom.xml
index 4a08d4801d..a40e3abfff 100644
--- a/poms/bom/src/main/generated/flattened-reduced-verbose-pom.xml
+++ b/poms/bom/src/main/generated/flattened-reduced-verbose-pom.xml
@@ -1516,6 +1516,10 @@
             <groupId>org.apache.camel</groupId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} -->
             <artifactId>camel-spring</artifactId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} -->
           </exclusion>
+          <exclusion>
+            <groupId>org.springframework</groupId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} -->
+            <artifactId>spring-orm</artifactId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} -->
+          </exclusion>
         </exclusions>
       </dependency>
       <dependency>
@@ -6569,21 +6573,6 @@
           </exclusion>
         </exclusions>
       </dependency>
-      <dependency>
-        <groupId>org.springframework</groupId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} -->
-        <artifactId>spring-orm</artifactId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} -->
-        <version>6.0.11</version><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} -->
-        <exclusions>
-          <exclusion>
-            <groupId>org.springframework</groupId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} -->
-            <artifactId>spring-beans</artifactId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} -->
-          </exclusion>
-          <exclusion>
-            <groupId>org.springframework</groupId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} -->
-            <artifactId>spring-core</artifactId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} -->
-          </exclusion>
-        </exclusions>
-      </dependency>
       <dependency>
         <groupId>org.springframework</groupId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} -->
         <artifactId>spring-tx</artifactId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} -->