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

Chris Watts updated CAMEL-8054:
-------------------------------
    Attachment: CAMEL-8054-sharedEntityManager-2.13.patch

The improvements made in CAMEL-7364 are more around reusing a passed in 
EntityManager for JpaMessageIdRepository / JpaProducer - that refactoring 
didn't really affect the consumer.

This change is really focused around the use case of a jpa consumer and the 
JpaTransactionManager (if using a JtaTransactionManager it may have an affect, 
depending on whether it's using CMP or not.

The first patch I submitted had a few bugs, attached 
(CAMEL-8054-sharedEntityManager-2.13.patch) is the complete patch for 2.13, 
including a unit test.
I'll do another patch for 2.14.

> Use SharedEntityManager to reduce connections
> ---------------------------------------------
>
>                 Key: CAMEL-8054
>                 URL: https://issues.apache.org/jira/browse/CAMEL-8054
>             Project: Camel
>          Issue Type: New Feature
>          Components: camel-jpa
>    Affects Versions: 2.13.2
>            Reporter: Chris Watts
>         Attachments: CAMEL-8054-sharedEntityManager-2.13.patch, 
> camel-sharedEntityManager.patch
>
>
> When using JpaTransactionManager it "Binds a JPA EntityManager from the 
> specified factory to the thread". Meaning that on top of the EntityManager 
> created for each JpaConsumer, each time it creates a new EntityManager.
> New property:
> *sharedEntityManager* - whether to use spring's SharedEntityManager for the 
> consumer/producer. Sets joinTransaction=false
> Also added as a property to the JpaComponent.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to