Yes I'm aware of this situation, but as I stated clear the whole system is multithreaded but the application itself takes a lot of care by the use of ThreadLocal and synchronized blocks.
The EntityManagers itself are created in a ThreadLocal as well as the handlers for each webservice call, thus in each thread an own entity manager exists. Therefore, there should be no two entities shared among two threads here, or let me rephrase that: From the application point of view this cannot happen. The only thing that might be wrong is IBM's J9 implementation of ThreadLocal but I currently doubt this. How can it happen, that "someone" in that case does "something" to set pcStateManager 'null' and why. And even more 'how' ... what makes pcStateManager become 'null'? Your post does not clarify and just states things I've stated in my post. I'm aware that the property for openJPA regarding multithreading is solely for its internal structures. My problem here is actually very clear. Why is pcStateManager becoming 'null' even if the EntityManager that may cache the entities and the entities can only be accessed by the very same thread. -- View this message in context: http://openjpa.208410.n2.nabble.com/NullPointerException-in-pcGet-Method-tp5337474p5345282.html Sent from the OpenJPA Users mailing list archive at Nabble.com.
