I would like to integrate JPA with my existing code.
My requirment is like i would not specify jpa provider in my persistence.xml file. After deploying, the container will pick the default jpa provider. For example, if it is JBOSS, it will pick hibernate as default jpa provider, or if it is WebSphere then it will pick openjpa as default provider. So it depends on App Server that we use.
I have a service that build Datasources and Connection objects. I would like to use this service to supply Datasource and Connection for my EntityManager. I could not find any property that i can pass Datasource object or Connection object to the EntityManager.
How could pass my costomized datasource and customized connection objects to EntityManager other than default connection establishment that hibernate or openjpa creates ?
|