Uploaded image for project: 'Red Hat Fuse'
  1. Red Hat Fuse
  2. ENTESB-7098

Allow for injection of entity managers rather than entity manager factories when camel → JPA

XMLWordPrintable

    • Icon: Feature Feature
    • Resolution: Done
    • Icon: Major Major
    • None
    • jboss-fuse-6.2.1, jboss-fuse-6.3
    • Camel, Hibernate
    • 0
    • 0% 0%
    • Todo

      At the moment when utilizing the JPA from camel the reference way is to inject singleton entity manager factories from the camel side to the hibernate side, leaving the creation of unique entity managers to the application level code.

      A reference example of this is located in the FuseByExample [camel-persistence-part1|https://github.com/FuseByExample/camel-persistence-part1/blob/jboss-fuse-6.3.0/jpa/src/main/resources/META-INF/spring/springJPA.xml#L22-L36 code.

      This is not desirable as it leaves further implementation details to the end developer and is prone to error where entity managers are injected directly leading to failing concurrent code as the JPA spec states that the entity manager is not thread safe.

              ggrzybek Grzegorz Grzybek
              rhn-support-rkieley Roderick Kieley
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: