tomee-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Cole Ferrier <>
Subject Re: Different behavior - Tomee Plus 7.0.3 vs Tomee plume 7.0.3 - JTA managed database connections
Date Tue, 25 Apr 2017 18:27:05 GMT
After pounding my head for half a day, trying to build a demo that failed...
i think i figured it out.

when using eclipselink (plume)
if the first thing you do is use the entitymanager and you do a "write"
transaction, then you get the database connection to do something else with
the database, you get that "write" connection.

If you get the database connection first, or you only have ran what it
thinks are read only sql.. then your database connection and your jpa
connection are two different connections.

when using openjpa (tomee plus)
it behaves as i would expect, regardless of what you do or do first, both
the JPA and datasource are the same connection.

It looks like if you are using eclipselink/plume, if you edit yoru
persistence.xml and add:

<property name="eclipselink.jdbc.exclusive-connection.mode" 	value="Always"
<property name=""

then you get the openjpa behavior.. and the behavior documented on

i got the idea for that setting from:

based on all of this. i'm not sure if i could call this a Tomee issue... i'm
curious what the jee spec says should happen...

View this message in context:
Sent from the TomEE Users mailing list archive at

View raw message