How to configure DB connection in a Servlet based JPA application

Posted by deamon on Stack Overflow See other posts from Stack Overflow or by deamon
Published on 2010-06-05T15:33:21Z Indexed on 2010/06/05 15:42 UTC
Read the original article Hit count: 203

Filed under:
|
|
|
|

By default DB connections of JPA applications are configured in the META-INF/persistence.xml, when the application is not deployed to a full Java EE application server. In my opinion it is not very elegant to place such environment specific configuration into a file that is inside a .war file. How could a DB connection of a Servlet based JPA application be configured more flexible (=outside of the .war file)?

© Stack Overflow or respective owner

Related posts about java

Related posts about database