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 orm.xml and persistence.xml Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Certification » EJB Certification (SCBCD/OCPJBCD)
Bookmark "orm.xml and persistence.xml" Watch "orm.xml and persistence.xml" New topic

orm.xml and persistence.xml

kumar mahesh

Joined: Nov 28, 2007
Posts: 16
Please explain the difference between these two xmls?. What is the purpose of orm.xml?.
Moayad Abu Jaber
Ranch Hand

Joined: Jan 15, 2008
Posts: 80
persistence.xml used to define the JDBC driver and connectivtey with database additional that you define the unit name.

orm.xml you can skipped it and use the annotation insted of that.
orm.xml used to mapping object to database.

best regards,

Best Regards,
Moayad Abu Jaber
SCJP 5.0, SCWCD 1.4, SCBCD 5.0
Fei Wong

Joined: Jun 15, 2009
Posts: 11
hi juz wan to ask can we use other name like abc.xml instead of orm.xml?

Thanl you very much
I agree. Here's the link:
subject: orm.xml and persistence.xml
It's not a secret anymore!