aspose file tools*
The moose likes EJB and other Java EE Technologies and the fly likes difference between JPA and Hibernate? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "difference between JPA and Hibernate?" Watch "difference between JPA and Hibernate?" New topic
Author

difference between JPA and Hibernate?

Satyajeet Kadam
Ranch Hand

Joined: Oct 19, 2006
Posts: 215
Q1) Kindly let me know the difference between JPA and Hibernate?

As i as i know JPA is a specification from Sun Microsystem.Hibernate and Top link also providing the implementation of it.This has been done to avoid vendor Locking.

Ravi Kiran Va
Ranch Hand

Joined: Apr 18, 2009
Posts: 2234

Both are two different technologies that follow ORM specfications .


Save India From Corruption - Anna Hazare.
Lester Burnham
Rancher

Joined: Oct 14, 2008
Posts: 1337
As i as i know JPA is a specification from Sun Microsystem. Hibernate and Top link also providing the implementation of it.

That's correct (except the spec is from the JCP, but that's quibbling over minor differences). Other JPA implementations also exist, like OpenJPA.

Both are two different technologies that follow ORM specfications.

This is not correct: JPA is the specification, Hibernate/TopLink are the implementations.

It should be noted that some implementations (Hibernate, specifically) also have their own API which is different from JPA. Using that would lead to difficulties when considering a switch to a different implementation (the vendor lock-in mentioned above).
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 30537
    
150

Hibernate provides 2 APIs - one is JPA. So you can use Hibernate's implementation of JPA without vendor lock in if you use those APIs.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
Matthew Brown
Bartender

Joined: Apr 06, 2010
Posts: 4392
    
    8

Jeanne Boyarsky wrote:Hibernate provides 2 APIs - one is JPA. So you can use Hibernate's implementation of JPA without vendor lock in if you use those APIs.

Is there an advantage to using the non-JPA Hibernate API? Or is it just there for historical reasons?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: difference between JPA and Hibernate?