openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Dick <michael.d.d...@gmail.com>
Subject Re: EntityManager used in multiple threads
Date Thu, 17 Sep 2009 20:51:54 GMT
I think it's possible, but it would make me nervous since the EM is carrying
state. You'd want to set <property name="openjpa.Multithreaded"
value="true"/>, and there may be other considerations (metadata preloading
might help too).

-mike

On Thu, Sep 17, 2009 at 2:22 PM, Daryl Stultz <daryl@6degrees.com> wrote:

> On Thu, Sep 17, 2009 at 3:19 PM, Michael Dick <michael.d.dick@gmail.com
> >wrote:
>
> > I think Daryl's suggestion of creating an EntityManager for each user is
> > your best solution. Having multiple threads access the same EntityManager
> > is
> > generally not a good idea (easy to shoot yourself in the foot).
> >
>
> It still may be possible with a single user depending on the nature of the
> app: start a long process in one window, switch to another to mess with
> configuration...
>
> --
> Daryl Stultz
> _____________________________________
> 6 Degrees Software and Consulting, Inc.
> http://www.6degrees.com
> mailto:daryl@6degrees.com
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message