Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
Ravi Kiran Va
Ranch Hand
Posts: 2234
Eclipse IDE Firefox Browser Redhat
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Jaikiran Pai
Marshal
Pie
Posts: 10447
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic