This week's book giveaway is in the OCPJP forum. We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line! See this thread for details.
ran vi wrote:What is hibernate annotations and what is JPA.
I am thinking hibernate annotations are nothing but implementation of JPA. Is that correct?
Can any one explain this in detail?
JPA is a specification. In the specification it does talk about the JPA Annotations. Hibernate implements those Annotations and it also includes Hibernate only annotations that the JPA spec doesn't cover. Like delete orphan cascade option. There is no such option in the JPA spec about delete orphans. But you do have a delete orphan cascade option in Hibermate, although that is kind of a bad example because it is an attribute of an Annotation rather than an Annotation itself.
But just know that Hibernate has some annotations that go beyond those from the JPA spec.
JPA is a specification and Hibernate is an implementation of that specification. There are some vendor specific annotation as happens everywhere when the standards are implemented. you can check the tutorial on implmenting JPA using Hiberenate
JPA is just specification/Standard and there is no implementation in that.
Frameworks like hibernate and Topilink will implement those specification (What ever mentioned in JPA).Without those frameworks like hibernate OR toplink we can't use JPA.
Is my understanding correct?