This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Object Relational Mapping and the fly likes How dos the application will know the path of persistence.xml file Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "How dos the application will know the path of persistence.xml file" Watch "How dos the application will know the path of persistence.xml file" New topic
Author

How dos the application will know the path of persistence.xml file

Ravi Kiran Va
Ranch Hand

Joined: Apr 18, 2009
Posts: 2234

Hi ,

I am seeing examples for ConatierManaged EntityManager



Inside web.xml file :


Please tell me how the Application will know the path of persistence.xml file .

Thank you for reading


Save India From Corruption - Anna Hazare.
Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 9961
    
163

The possible locations of the persistence.xml is pre-defined by the JPA spec. But the user application does not need to know the location of the persistence.xml. It's upto the persistence provider (like Hibernate) to search and find the persistence.xml in appropriate locations.

[My Blog] [JavaRanch Journal]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How dos the application will know the path of persistence.xml file
 
Similar Threads
Using EntityManager from a servlet?
Store multiple persistence units in one entity manager factory?
How to work with multiple persistence units
javax.persistence.PersistenceException: No Persistence provider for EntityManager - WebApplication
Mess with EntityManagers and EntityManagerFactory