On Apr 26, 2007, at 2:10 AM, tbee wrote:
Is it possible to provide an actual JDBC connection instead of connect
You can supply the datasource instance in a PersistenceUnitInfo, but
I certainly hope you can't provide a connection.
The business model I'm trying to construct will work inside an
application which does direct JDBC. There is already a connection
it would be a waste of resource to have two. I can always hack
special Driver for this. Another solution would be to use the
Are you running inside a javaee app server? (not standalone tomcat)
If so there's a very good chance that all the connection handles
obtained within the same jta transaction actually use the same
physical connection to the database. Geronimo certainly does this.
One concern: how many actual JDBC connections are opened during a
assume that only one is opened and that the JPA "transaction"
concept is not
directly related to the JDBC transactions. That JDBC transactions
used during a JPA transaction's commit phase.
If you use table based "sequences" and supply a non-jta-datasource as
well as a jta datasource, typically 2 connections will be used.
However, if you are in an environment that does connection pooling
this won't make much difference.
Hope this helps
View this message in context: http://www.nabble.com/provide-an-
Sent from the open-jpa-dev mailing list archive at Nabble.com.