Hi Yeah lets ensure those headers are not lost. You are welcome to create a JIRA ticket. Also if you want to provide a fix, then you can for example see how camel-mybatis preservers the headers.
On Fri, Jul 2, 2021 at 7:36 PM Calle Andersson <calleanders...@hotmail.com> wrote: > > Hi, > > > > 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 > -- Claus Ibsen ----------------- http://davsclaus.com @davsclaus Camel in Action 2: https://www.manning.com/ibsen2