using JDBC with persistence.xml

Posted by moshe shamy on Stack Overflow See other posts from Stack Overflow or by moshe shamy
Published on 2010-05-02T10:05:21Z Indexed on 2010/05/02 10:37 UTC
Read the original article Hit count: 176

Filed under:
|
|

I am building a framework that manage the access to the database.

the framework getting tasks from the user and handle a connection pooling that manage the access to the database. the user just send me SQL commands.

One of the feature that i would like to support is working with JPA, in this case i will provide entity manager. in some cases i would like to provide JDBC access as well as JPA access. the arguments for the database are written in XML file.

so for JPA i need to write the property in persistence.xml so it will be not so smart to write again the same arguments for JDBC. do you know if i can get the arguments of the database from persistence.xml, do you know if there is a source code that do it. or should i parse persistence.xml by myself?

© Stack Overflow or respective owner

Related posts about jpa

Related posts about java