This content has been marked as final. Show 1 reply
Well it works, right out of the box: no EntityManager.clear or merge calls needed in the "original" thread - but I have no idea if this is safe, supposed to work or should be avoided at all costs
Okay, avoid! First I thought it works, but now it doesn't: so if it worked at all (was quite tired when I tried it), its absolutely unreliable.
For the record: I moved to a different approach:
1st) cache my persistent entities
2nd) detach from them
3rd) work on the cached state, update them as I need to (even from different threads)
4th) update the cached state periodically with a Timer
Thats accurate enough for me and I can react on events like callbacks immediately.