[ 
https://issues.apache.org/jira/browse/CAMEL-16824?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17388543#comment-17388543
 ] 

Claus Ibsen commented on CAMEL-16824:
-------------------------------------

In Camel 3.4, the exchange headers disappears when using the JPA component 
(example using Endpoint DSL):

.to(jpa(DummyEntity.class.getName()).persistenceUnit("dummyPU").query("SELECT c 
FROM " + DummyEntity.class.getName() + " c"))



I believe the headers dissappears since the exchange pattern is InOut (I use 
the JPA component in a route which implements a REST service using REST DSL) 
according to the following code found inside JPAProducer:

Message target = exchange.getPattern().isOutCapable() ? exchange.getOut() : 
exchange.getIn();

target.setBody(answer);

(for further details, see 
https://github.com/apache/camel/blob/camel-3.4.x/components/camel-jpa/src/main/java/org/apache/camel/component/jpa/JpaProducer.java#L188
 )



The headers from the in message doesn’t seem to be copied to the out message.



Is this by design or a bug or have I been looking at the wrong place and drawn 
wrong conclusions?



Thanks in advance,

Calle


> camel-jpa - Do not lose headers
> -------------------------------
>
>                 Key: CAMEL-16824
>                 URL: https://issues.apache.org/jira/browse/CAMEL-16824
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-jpa
>            Reporter: Claus Ibsen
>            Priority: Major
>             Fix For: 3.12.0
>
>




--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to