A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
Spring in Action
this week in the
Object Relational Mapping
renaming persistence.xml in JPA
Joined: May 12, 2010
Sep 13, 2011 05:56:41
AFAIK Spring provides a mechanism to rename the persistence.xml however I am wondering is this possible with just JPA.
so say, I want to call persistence.xml mypersistence.xml - is this possible?
Note the reason I need to do this is because when deployed in WebSphere, it automatically parses the persistence.xml and I don't want it to. Because I am not using Websphere JPA.
Joined: Oct 01, 2007
Sep 13, 2011 07:39:48
JPA requires the file be named persistence.xml,
If you are using EclipseLink, you can set the persistence
property "eclipselink.persistencexml" to give the path to the file. You can either pass this property in your properties Map, or set it as a system property.
Blog:Java Persistence Performance
I agree. Here's the link:
subject: renaming persistence.xml in JPA
How to use the JPA in JSF
JPA - What is the use of persistence.xml
password and connection's details in persistence.xml
Is it possible to store persistence.xml outside JAR-file?
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014