File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes EJB Certification (SCBCD/OCPJBCD) and the fly likes Is persistence.xml required Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » EJB Certification (SCBCD/OCPJBCD)
Bookmark "Is persistence.xml required" Watch "Is persistence.xml required" New topic

Is persistence.xml required

rakesh sugirtharaj
Ranch Hand

Joined: Dec 16, 2007
Posts: 151

I m new to EJB so this may sound naive. I see that the only required tag in persistence.xml is persistence unit with name and all others are optional. My question is, in such a case is persistence.xml file required? Should every project using JPA must have a persistence.xml?

Devaka Cooray
ExamLab Creator

Joined: Jul 29, 2008
Posts: 3921

persistence.xml is required for setting a persistence unit on JPA.

Author of ExamLab ExamLab - a free SCJP / OCPJP exam simulator
What would SCJP exam questions look like? -- Home -- Twitter -- How to Ask a Question
I agree. Here's the link:
subject: Is persistence.xml required
It's not a secret anymore!