I think you're going to want to have a separate EntityManager for each
worker thread and return detached copies of your entities to the main
thread.

If the data access is isolated to the worker thread(s) and the main thread
doesn't modify the entities you should be fine. If the app scales to have
multiple worker threads you'll want an EM for each thread to avoid the
problem you've just hit and transactional integrity issues.

But for now just moving the EM to the worker thread sounds like it'll work
for you.

-mike

On Fri, Jul 23, 2010 at 9:05 AM, Pandel <[email protected]> wrote:

>
> I must have misunderstood what you said. After enhancing the entities at
> build-time, I realized the BrokerImpl was still accessed when i called a
> getter of an entity. So I'm back to square one. All I've got left is to
> search for some hints in the OpenBooks application, but I doubt I will have
> any success.
> Does someone have any other ideas?
> Thanks in advance!
> --
> View this message in context:
> http://openjpa.208410.n2.nabble.com/Calling-a-getter-of-an-entity-will-access-the-broker-tp5325919p5329713.html
> Sent from the OpenJPA Users mailing list archive at Nabble.com.
>

Reply via email to