File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Object Relational Mapping and the fly likes Why does Hibernate use JPA? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "Why does Hibernate use JPA?" Watch "Why does Hibernate use JPA?" New topic

Why does Hibernate use JPA?

Swerrgy Smith
Ranch Hand

Joined: Mar 26, 2010
Posts: 91
Hi all,

I would like to know why does Hibernate use JPA while both of them are data persistence frameworks?
Does that mean there is a tight coupling between Hibernate and JPA?
I read that JPA is the interface while Hibernate is the actual implementation, but it seems that the annotations which they provide (@Table, @Column ...) is in an actual library (javax.persistence ...) and not just interface.

For example, when we declare an entity in Hibernate, we use JPA annotation like below:

Thank you very much.
Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 63529

Hibernate doesn't use JPA, it is a JPA implementation. So yes, it provides the implementations for the JPA interfaces.

It also has its own proprietary API and set of annotations.

[Asking smart questions] [About Bear] [Books by Bear]
I agree. Here's the link:
subject: Why does Hibernate use JPA?
jQuery in Action, 3rd edition