This is an automated email from the ASF dual-hosted git repository. ppalaga pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/camel-quarkus.git
The following commit(s) were added to refs/heads/main by this push: new d94de00470 Fix #3914 to get TransactionManager and UserTransaction from Arc container d94de00470 is described below commit d94de00470c8e54fc8f74064c244995d8226196c Author: Zheng Feng <zh.f...@gmail.com> AuthorDate: Wed Jul 13 15:55:25 2022 +0800 Fix #3914 to get TransactionManager and UserTransaction from Arc container --- .../org/apache/camel/quarkus/component/jpa/CamelJpaRecorder.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/extensions/jpa/runtime/src/main/java/org/apache/camel/quarkus/component/jpa/CamelJpaRecorder.java b/extensions/jpa/runtime/src/main/java/org/apache/camel/quarkus/component/jpa/CamelJpaRecorder.java index ee5940b556..38fc108477 100644 --- a/extensions/jpa/runtime/src/main/java/org/apache/camel/quarkus/component/jpa/CamelJpaRecorder.java +++ b/extensions/jpa/runtime/src/main/java/org/apache/camel/quarkus/component/jpa/CamelJpaRecorder.java @@ -19,6 +19,7 @@ package org.apache.camel.quarkus.component.jpa; import javax.transaction.TransactionManager; import javax.transaction.UserTransaction; +import io.quarkus.arc.Arc; import io.quarkus.runtime.RuntimeValue; import io.quarkus.runtime.annotations.Recorder; import org.apache.camel.component.jpa.JpaComponent; @@ -28,8 +29,8 @@ import org.springframework.transaction.jta.JtaTransactionManager; public class CamelJpaRecorder { public RuntimeValue<JpaComponent> createJpaComponent() { - TransactionManager transactionManager = com.arjuna.ats.jta.TransactionManager.transactionManager(); - UserTransaction userTransaction = com.arjuna.ats.jta.UserTransaction.userTransaction(); + TransactionManager transactionManager = Arc.container().instance(TransactionManager.class).get(); + UserTransaction userTransaction = Arc.container().instance(UserTransaction.class).get(); JpaComponent component = new JpaComponent(); component.setTransactionManager(new JtaTransactionManager(userTransaction, transactionManager));