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.

Christian

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
http://www.liquid-reality.de

Open Source Architect
http://www.talend.com

Reply via email to