Hi,
You might consider turning this upside down and first starting a JPA
transaction and then get the connection from OpenJPA to do your JDBC
work. Then both JPA and your JDBC code would be working with the same
connection.
Craig
On Jun 2, 2010, at 8:43 AM, Daryl Stultz wrote:
Hello, my project has a lot of work done direct to JDBC and some new
work
done through OpenJPA. I'm using 1.2.1 on Tomcat (non-container). I
have a
situation where a JDBC connection is obtained and a transaction is
started.
Then some OpenJPA querying is done. The Entity Manager obtains an
independent connection which means it doesn't read the state with
respect to
the JDBC transaction. Is there any way to get an Entity Manager to
join a
JDBC transaction? My setup uses a DataSource to supply a connection
to the
Entity Manager. It seems I could modify this to return the JDBC
connection,
but I'm guessing the EM would close it before my JDBC operation is
done.
Thanks.
--
Daryl Stultz
_____________________________________
6 Degrees Software and Consulting, Inc.
http://www.6degrees.com
http://www.opentempo.com
mailto:[email protected]
Craig L Russell
Architect, Oracle
http://db.apache.org/jdo
408 276-5638 mailto:[email protected]
P.S. A good JDO? O, Gasp!