openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daryl Stultz <daryl.stu...@opentempo.com>
Subject Re: JDBC operation in JPA transaction
Date Fri, 16 Sep 2011 12:31:38 GMT
On Fri, Sep 16, 2011 at 5:34 AM, MiƂosz Tylenda <mtylenda@o2.pl> wrote:

> Try closing the connection:
>
> connection.executeUpdate(...);
> connection.close();
>
> Without closing, I suspect the entity manager and your JDBC update operate
> on different connections.
>
> It seems like closing the connection before the em commit would guarantee
different connections.


> The openjpa.ConnectionRetainMode property may also have some impact here.
>

I tried "transaction" and "always" with no change in behavior. I can work
around it in this case but would like to know how to do this effectively. I
do have a case where I want the EM to read uncommitted data manipulated by
JDBC.

-- 
Daryl Stultz
_____________________________________
6 Degrees Software and Consulting, Inc.
http://www.6degrees.com
http://www.opentempo.com
mailto:daryl.stultz@opentempo.com

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