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