camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject [1/2] camel git commit: Pass in used EM in the exchange when created in the jpa consumer
Date Sat, 27 Feb 2016 11:31:46 GMT
Repository: camel
Updated Branches:
  refs/heads/camel-2.16.x 0cf8e0484 -> c7d7d31cc
  refs/heads/master 0844722e3 -> e17768bde


Pass in used EM in the exchange when created in the jpa consumer


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/e17768bd
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/e17768bd
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/e17768bd

Branch: refs/heads/master
Commit: e17768bde9a1fabc9e8b4a0272116486fed268b0
Parents: 0844722
Author: Claus Ibsen <davsclaus@apache.org>
Authored: Sat Feb 27 12:30:20 2016 +0100
Committer: Claus Ibsen <davsclaus@apache.org>
Committed: Sat Feb 27 12:30:20 2016 +0100

----------------------------------------------------------------------
 .../main/java/org/apache/camel/component/jpa/JpaConsumer.java  | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/e17768bd/components/camel-jpa/src/main/java/org/apache/camel/component/jpa/JpaConsumer.java
----------------------------------------------------------------------
diff --git a/components/camel-jpa/src/main/java/org/apache/camel/component/jpa/JpaConsumer.java
b/components/camel-jpa/src/main/java/org/apache/camel/component/jpa/JpaConsumer.java
index 42b5ff0..1e295e2 100644
--- a/components/camel-jpa/src/main/java/org/apache/camel/component/jpa/JpaConsumer.java
+++ b/components/camel-jpa/src/main/java/org/apache/camel/component/jpa/JpaConsumer.java
@@ -116,7 +116,7 @@ public class JpaConsumer extends ScheduledBatchPollingConsumer {
                     DataHolder holder = new DataHolder();
                     holder.manager = entityManager;
                     holder.result = result;
-                    holder.exchange = createExchange(result);
+                    holder.exchange = createExchange(result, entityManager);
                     answer.add(holder);
                 }
 
@@ -502,10 +502,10 @@ public class JpaConsumer extends ScheduledBatchPollingConsumer {
         }
     }
 
-    protected Exchange createExchange(Object result) {
+    protected Exchange createExchange(Object result, EntityManager entityManager) {
         Exchange exchange = getEndpoint().createExchange();
         exchange.getIn().setBody(result);
-        exchange.getIn().setHeader(JpaConstants.ENTITYMANAGER, entityManager);
+        exchange.getIn().setHeader(JpaConstants.ENTITY_MANAGER, entityManager);
         return exchange;
     }
 


Mime
View raw message