aries-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christian Schneider <>
Subject Re: jpa: Alternative solution for wrapped EntityManager
Date Fri, 07 Nov 2014 09:50:07 GMT
Hi Giuseppe,

I think the ThreadLocal is necessary. We want to make sure that calls on 
the same thread always go to the same EntityManager.


On 07.11.2014 10:29, Giuseppe Gerla wrote:
> Thanks Christian
> I think I understand. So before each transactional method (not only
> persist) you create an EntityManager and then you close it.
> I'm not sure that you can simplify the JTAEntityManagerHandler class.
> I think that the only change that we can do is to simplify the pool
> management removing the ThreadLocal and the using a simple resourcepool.
> If you want I can try to prepare an example on my trunk.

Christian Schneider

Open Source Architect

View raw message