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

camel-jpa producer does not reuse existing EntityManager in transaction and create its own one

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • fuse-7.11.1-GA
    • fuse-7.10-GA
    • Camel
    • None
    • False
    • None
    • False
    • Release Notes
    • % %
    • +
    • Automated
    • Release Note
    • Hide
      • Download and unzip the reproducer.zip, and import it to the eclipse.
      • By following the README file in the project, setup postgresql.
      • Start CamelContext(withouttest). Make sure spring.datasource.myds.hikari.maximumPoolSize=1 is defined n the application.properties.
      Show
      Download and unzip the reproducer.zip, and import it to the eclipse. By following the README file in the project, setup postgresql. Start CamelContext(withouttest). Make sure spring.datasource.myds.hikari.maximumPoolSize=1 is defined n the application.properties. Execute curl http://localhost:8080/dog

    Description

      camel-jpa producer does not reuse  the existing EntityManager in transaction and create its own one.

      This happens when JpaTransactionManager is used. It creates an EntityManager for transactions in the doBegin() method.
      So there will be two EntityManagers and two connections even if there is only one route for the jpa producer.

      Attachments

        Issue Links

          Activity

            People

              zfeng@redhat.com Zheng Feng
              rhn-support-hfuruich Hisao Furuichi
              Stefan Veres Stefan Veres
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: