Is there a way to get the JDBC connection used by an entity manager ?
On one hand, I have legacy code that uses plain old JDBC code that I wish to reuse, and on the other hand, I am in a J2SE application context, and I prefer to use one EntityManager/Connection for all the application life span. My database is HSqldb and it don't support multiple connections.
I have found another EJB3 implementation from Kodo by SolarMetric, where EntityManger provides a "getConnection()" method that seems to fit the bill (
http://www.solarmetric.com/Software/Documentation/4.0.0EA/docs/javadoc/kodo/persistence/KodoEntityManager.html), and I was wondering if Hibernate offers a way to do the same.
Thanks,
Robert