File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Reply 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: 8143
    
  52

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?
javax.persistence.PersistenceException: No Persistence provider for EntityManager - WebApplication
How to work with multiple persistence units
Mess with EntityManagers and EntityManagerFactory
Store multiple persistence units in one entity manager factory?