104
|
As you state JPA is just a specification, meaning there is no implementation. You can annotate your classes as much as you would like with JPA annotations, however without an implementation nothing will happen. Think of JPA as the guidelines that must be followed or an interface, while Hibernate's JPA implementation is code that meets the API as defined by the JPA specification and provides the under the hood functionality.
When you use Hibernate with JPA you are actually using the Hibernate JPA implementation. The benefit of this is that you can swap out Hibernate's implementation of JPA for another implementation of the JPA specification. When you use straight Hibernate your locking into the implementation because other ORMs may use different methods/configurations and annotations, therefore you cannot just switch over to another ORM.
For a more detailed explanation of this answer read my blog entry.
| |||
12
|
From the Wiki.
As told in the JCP page the Eclipse link is the Reference Implementation for JPA. Have look at this answer for bit more on this.
JPA itself has features that will make up for a standard ORM framework. Since JPA is a part of Java EE spec, you can use JPA alone in a project and it should work with any Java EE compatible Servers. Yes, these servers will have the implementations for the JPA spec.
Hibernate is the most popular ORM framework, once the JPA got introduced hibernate conforms to theJPA specifications. Apart from the basic set of specification that it should follow hibernate provides whole lot of additional stuff.
|
1 comment:
Great blog, continue the good work
http://www.prokr.net/2016/09/thermal-insulation-companies-5.html
http://www.prokr.net/2016/09/thermal-insulation-companies-4.html
http://www.prokr.net/2016/09/thermal-insulation-companies-3.html
Post a Comment