• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

difference between JPA and Hibernate?

 
Ranch Hand
Posts: 224
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.

 
Ranch Hand
Posts: 2234
Eclipse IDE Firefox Browser Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Both are two different technologies that follow ORM specfications .

 
Rancher
Posts: 1337
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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).
 
author & internet detective
Posts: 41860
908
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Bartender
Posts: 4568
9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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?
 
reply
    Bookmark Topic Watch Topic
  • New Topic