Hyndavi, Have you considered registering your own Datasource in JNDI during initialization (before OpenJPA needs it)? Provided your data source fully implements javax.jdbc.DataSource and hands out fully implemented and/or wrapped connections, theoretically OpenJPA should look up the data source by name and use it to create connections. If you are in an app server environment there may be some restrictions on whether you can register your own objects in JNDI. I haven't tried this so I have no idea whether it'll work, but It might be worth a try.
-Jeremy On Tue, Aug 17, 2010 at 2:31 AM, hyndavi <[email protected]> wrote: > > Hi Mike, > > Thank you very much for your response. > > Yes. I have existing customized API that helps us to create Datasource and > Connection objects based on Database availablility. This also maintains > connection pools, checks Database availablility and etc. > > We are planning to use JPA going forward. With that we would like to > integrate this customized API. > > -Hyndavi. > -- > View this message in context: > http://openjpa.208410.n2.nabble.com/Integrating-existing-customized-Datasource-and-Connection-objects-in-JPA-tp5411498p5430996.html > Sent from the OpenJPA Users mailing list archive at Nabble.com. >
