From the user perspective I would like to use the EntityManager like in JEE. So without any additional precautions.

Of course this is a lot more difficult as in JEE each ejb thread gets its own EntityManager instance. I would expect the aries jpa proxy around the EntityManager to make sure the EntityManagers are spearated by threads and are thread safe this way. Is this assumption correct?

Christian


Am 02.09.2014 09:55, schrieb Guillaume Nodet:
I was wondering if anyone could cast some lights on thread safety of the
EntityManager injected with the <jpa:context /> blueprint element.
Some time ago, I raised ARIES-885 and wrapped the inner detachedManager
into a synchronized wrapper, but there are still thread safety problems.
My main question, is how is the injected EntityManager supposed to be used
? Is is supposed to be thread safe or is the user supposed to synchronize
access to it ? I also see that each call is followed by a call to clear on
the shared EM, so I'm not quite sure what the effect is supposed to be.

Any thoughts welcomed !

Cheers,
Guillaume Nodet



--
Christian Schneider
http://www.liquid-reality.de

Open Source Architect
Talend Application Integration Division http://www.talend.com

Reply via email to