Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-6874

camel-jpa - Avoid sharing the same EntityManager object across JpaEndpoint, it's Producers & Consumers as per se EntityManagers are not thread-safe.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.12.0
    • 2.12.2, 2.13.0
    • camel-jpa
    • None
    • Unknown

    Description

      See http://camel.465427.n5.nabble.com/Build-failures-td5741273.html

      The JPA 2.0 Spec, section 7.2:

      An entity manager must not be shared among multiple concurrently executing threads, as the entity manager and persistence context are not required to be threadsafe. Entity managers must only be accessed in a single-threaded manner.

      The test org.apache.camel.processor.jpa.JpaProducerConcurrentTest is relevant in this context.

      Attachments

        Activity

          People

            bvahdat Babak Vahdat
            bvahdat Babak Vahdat
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: