You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Claus Ibsen (JIRA)" <ji...@apache.org> on 2019/07/31 09:07:00 UTC

[jira] [Resolved] (CAMEL-8388) camel-jpa - Do not store CamelEntityManager as a header

     [ https://issues.apache.org/jira/browse/CAMEL-8388?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Claus Ibsen resolved CAMEL-8388.
--------------------------------
    Resolution: Won't Fix

Okay so there is an option on the endpoint you can turn on|off for this

> camel-jpa - Do not store CamelEntityManager as a header
> -------------------------------------------------------
>
>                 Key: CAMEL-8388
>                 URL: https://issues.apache.org/jira/browse/CAMEL-8388
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-jpa
>            Reporter: Claus Ibsen
>            Priority: Minor
>             Fix For: Future
>
>
> We should try to avoid storing headers with are transient such as JpaEntityManager and other kinds. But instead allow access to them using a JpaMessage type that has a getter method to it,
> Then ppl can access it using
> {code}
> EntityManager em = exchange.getIn(JpaMessage.class).getEntityManager();
> {code}
> See SO for a problem when using as a header
> http://stackoverflow.com/questions/28608301/apache-camel-aggregate-persistence-and-hibernate



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)