You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by GitBox <gi...@apache.org> on 2022/08/25 13:13:26 UTC

[GitHub] [camel-quarkus] jamesnetherton commented on a diff in pull request #4049: Springless JPA extension

jamesnetherton commented on code in PR #4049:
URL: https://github.com/apache/camel-quarkus/pull/4049#discussion_r954949601


##########
extensions/jpa/runtime/pom.xml:
##########
@@ -44,14 +49,14 @@
             <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>
+            <groupId>org.springframework</groupId>
+            <artifactId>spring-tx</artifactId>

Review Comment:
   Could maybe scope as `provided`?
   
   Not sure if it'd be possible eventually to remove this entirely. It'd be nice if we could.



##########
extensions/jpa/runtime/src/main/java/org/apache/camel/quarkus/component/jpa/DefaultTransactionStrategySubstitution.java:
##########
@@ -0,0 +1,49 @@
+/*
+ * 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;
+
+import javax.persistence.EntityManagerFactory;
+
+import com.oracle.svm.core.annotate.Substitute;
+import com.oracle.svm.core.annotate.TargetClass;
+import org.apache.camel.component.jpa.DefaultTransactionStrategy;
+import org.springframework.transaction.PlatformTransactionManager;
+import org.springframework.transaction.support.TransactionTemplate;
+
+@TargetClass(DefaultTransactionStrategy.class)
+final public class DefaultTransactionStrategySubstitution {

Review Comment:
   I wonder if we could annotate this class with `@Delete` instead of doing the method substitutions? If we are forcing the transaction strategy in the extension, then in theory there should be nothing that needs access to it.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org