Hi Pawel!

I fear you are hitting a rather lightly used path in OpenJPA.
Although I wonder why you can hit a race condition?
An EntityManager - and thus it's entities - are intended to be accessed only 
from a single thread at a time.
Storing entities in a shared cache or whatever concurrently used object is 
always a bad idea.

Can you probably shade a light on why you need those compat modes in the first 
place?
Usually one doesn't need it if the app is properly designed.
Are you probably working on an ancient legacy code. And in that case, what 
patterns do they use to work with JPA?

txs and LieGrue,
strub


> Am 12.07.2019 um 15:37 schrieb Pawel Veselov <pawel.vese...@gmail.com>:
> 
> Hello.
> 
> https://issues.apache.org/jira/browse/OPENJPA-2792
> 
> Has took me a while to track down, and leaves quite unpleasant surprises,
> as your entities become detached without warning, which leads to phantom
> NPEs at places you never expect to happen.
> 
> -- 
> With best of best regards
> Pawel S. Veselov

Reply via email to