File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Object Relational Mapping and the fly likes Hibernte3 and 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 "Hibernte3 and JPA" Watch "Hibernte3 and JPA" New topic
Author

Hibernte3 and JPA

Ashish Yannam
Greenhorn

Joined: Sep 05, 2007
Posts: 19
Hi,

I want to know about the difference between the Hibernate3 and the Java Persistence API. Hibernate3 is said to be a part of JPA, can anyone please explain me on that,
Cor Takken
Ranch Hand

Joined: May 21, 2007
Posts: 58
Hibernate3 is not a part of JPA. JPA is a description of interfaces and services available in EBJ. Hibernate3 just happens to support JPA and the entitymanager of Hibernate can be assigned to perform the persistency effort, so effectively taking work away from the EJB layer.

The correct way of stating this is that Hibernate3 implements JPA interfaces, not the other way around. Now, why is it that Hibernate implements JPA so well? The fact that Hibernate (or rather the organisation behind Hibernate) was involved heavily in the process of defining JPA may have something to do with this


SCJP 1.5
Dolphins are grey, but they dream in colour.
Ashish Yannam
Greenhorn

Joined: Sep 05, 2007
Posts: 19
Thanks,

Can you please suggest me some book for Hibernate.
Cameron Wallace McKenzie
author and cow tipper
Saloon Keeper

Joined: Aug 26, 2006
Posts: 4968
    
    1

Currently, this forum is promoting my book, Hibernate Made Easy. Ask some more questions, and you'll have an opportunity to win a free copy! You can find more about the book by following my signature links.

Thanks for asking!

-Cameron McKenzie
Ashish Yannam
Greenhorn

Joined: Sep 05, 2007
Posts: 19
Hi

How is this book different from other Hibernate books.
Does it provide sample tutorials which would be useful for the ones new to Hibernate.
Being new to Hibernate, I often find problems in finding good examples by which I can start up.
Cameron Wallace McKenzie
author and cow tipper
Saloon Keeper

Joined: Aug 26, 2006
Posts: 4968
    
    1

From a previous post:

One of the ways the book stands out is through its bright yellow, green and blue cover, but that's probably not what you meant.



Well, I should first say that I own a copy of Data Persistence with Hibernate (DPWH), and I refer to it often. DPWH is really the reference manual for Hibernate, and I think we're very lucky to have such a complete reference manual available to us. Similarly, the Caveat Emptor application that is referenced both on the website you list, and in the DPWH book, is an excellent example of a production type system.

But having said that, I think there's a real need for a book that provides very simple examples and explanations. For example, in my book, you can find very simple examples of one-to-one, one-to-many, many-to-many and inheritance mappings with a corresponding runnable class that will allow you to run and test these mappings without the need for a web, ejb or Spring container. That way people can test very simple examples, and then customize them for their own purposes. In my opinion, this is the best way to learn.

When I first started to learn Hibernate, I found it frustrating. I knew Hibernate could do some awesome things, but I just couldn't find a resource that helped me get up and running quickly, with some simple and straight forward examples that would help me understand how Hibernate worked, and what was going on behind the scenes. And from what I read from reviews on other books on Amazon, it seemed to me that I wasn't alone in my frustration. This book is really a response to that feeling. My goal is to get people up and running with Hibernate quickly, and help them leverage this great data persistence mechanism.

Furthermore, my book is very focussed in its content. While DPWH covers mappings and annotations, and a little bit of Spring, and even JBoss Seam, my book really just focuses on one objective, and that's teaching you how to use Hibernate. And it has been my experience that when people really, really understand how Hibernate works, and how it should be used, integrating Hibernate into Seam, JSF, Spring and any other application out there, integration becomes easy, because you really understand what is going on.

-Cameron McKenzie
Ashish Yannam
Greenhorn

Joined: Sep 05, 2007
Posts: 19
Hi,

Thank you so much for that information. This is a kind of book I am really looking at. This would really make understanding of Hibernate and its implementations very simple.

I hope, I have this book in my collection soon.
Thank you once again for the guidance.
arulk pillai
Author
Ranch Hand

Joined: May 31, 2007
Posts: 3275
I can already see some good review comments at Amazon.com.


500+ Java Interview Questions and Answers | Java job hunting know how & Java resumes
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Hibernte3 and JPA