openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daryl Stultz <>
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 <> 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

Daryl Stultz
6 Degrees Software and Consulting, Inc.

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