Shop now Shop Clothing clo_fly_aw15_NA_shoes Shop All Shop All Amazon Fashion Cloud Drive Photos Shop Amazon Fire TV Shop now Shop Fire HD 6 Shop Kindle Paperwhite Shop now Shop Now Shop now
Start reading Harnessing Hibernate on your Kindle in under a minute. Don't have a Kindle? Get your Kindle here or start reading now with a free Kindle Reading App.

Deliver to your Kindle or other device


Try it free

Sample the beginning of this book for free

Deliver to your Kindle or other device

Sorry, this item is not available in
Image not available for
Image not available

Harnessing Hibernate [Kindle Edition]

James Elliott , Timothy M. O'Brien , Ryan Fowler
3.3 out of 5 stars  See all reviews (3 customer reviews)

Print List Price: £26.50
Kindle Price: £25.18 includes VAT* & free wireless delivery via Amazon Whispernet
You Save: £1.32 (5%)
* Unlike print books, digital books are subject to VAT.

Free Kindle Reading App Anybody can read Kindle books—even without a Kindle device—with the FREE Kindle app for smartphones, tablets and computers.

To get the free app, enter your e-mail address or mobile phone number.


Amazon Price New from Used from
Kindle Edition £25.18  
Paperback £26.50  
Celebrate 5 Years of Kindle
Celebrate 5 Years of Kindle: Bestsellers for 99p
For five days starting 2nd September, 2015 we'll reveal a selection of bestsellers from the last 5 years, on sale for 99p for one day only -- come back each day to see the next selection of favourites for 99p. >Shop now

Book Description

Harnessing Hibernate is an ideal introduction to the popular framework that lets Java developers work with information from a relational database easily and efficiently. Databases are a very different world than Java objects, and they often involve people with different skills and specializations. With Hibernate, bridging these two worlds is significantly easier, and with this book, you can get up to speed with Hibernate quickly.

Rather than present you with another reference, Harnessing Hibernate lets you explore the system, from download and configuration through a series of projects that demonstrate how to accomplish a variety of practical goals. The new edition of this concise guide walks you through Hibernate's primary features, which include mapping from Java classes to database tables, and from Java data types to SQL data types. You will also learn about Hibernate's data query and retrieval facilities, and much more.

By reading and following along with the examples, you can get your own Hibernate environment set up quickly and start using it for real-world tasks right away. Harnessing Hibernate teaches you how to:

  • Perform Object/Relational mapping
  • Work with persistent data from Java code
  • Work with groups and relationships between objects
  • Extend Hibernate's rich type support for your own needs
  • Simplify query creation using criteria and examples
  • Use the Hibernate Query Language (HQL) and understand how it differs from SQL
  • Use Hibernate in conjunction with Spring
  • Use Hibernate in conjunction with other packages, such as the Stripes web framework and the Eclipse IDE

Once you're past the first few chapters, you can jump to topics that you find particularly interesting or relevant. All background material and explanations of how Hibernate works and why is in the service of a focused task. Source code can be downloaded from the book's website.

If using SQL is an uncomfortable chore, Harnessing Hibernate offers you an effective and trouble-free method for working with the information you store in your applications.

Customers Who Bought This Item Also Bought

Page of Start over
This shopping feature will continue to load items. In order to navigate out of this carousel please use your heading shortcut key to navigate to the next or previous heading.

Product Description

Book Description

Step-by-step Guide to Java Persistence

About the Author

James Elliott is a senior software engineer at Berbee, with fifteen years' professional experience as a systems developer. He started designing with objects well before work environments made it convenient, and has a passion for building high-quality Java tools and frameworks to simplify the tasks of other developers.

Tim is a professional singer/programmer living and working in the Chicago area. He prefers Emacs to vi. Tim discovered programming on a TRS-80, and went on to study (and subsequently forget) Electrical Engineering at UVA. In his free time Tim likes to sleep, study music, build toys with microcontrollers, and participate in open source projects. Tim is active in the Jakarta Commons.

Ryan Fowler is a software engineer at Berbee in Madison, WI. He programmed Basic on Apple II machines for a while in elementary school at St. Stephen School in Grand Rapids, MI. He returned to coding in the computer science department at Alma College in Alma, MI while earning his bachelor's degree. Ryan skis, sails and rounds life out with some guitar playing when there's no snow or wind.

Product details

  • Format: Kindle Edition
  • File Size: 2723 KB
  • Print Length: 382 pages
  • Simultaneous Device Usage: Unlimited
  • Publisher: O'Reilly Media; 1 edition (22 April 2008)
  • Sold by: Amazon Media EU S.à r.l.
  • Language: English
  • ASIN: B0043GXMUC
  • Text-to-Speech: Enabled
  • X-Ray:
  • Word Wise: Not Enabled
  • Enhanced Typesetting: Not Enabled
  • Average Customer Review: 3.3 out of 5 stars  See all reviews (3 customer reviews)
  • Amazon Bestsellers Rank: #612,443 Paid in Kindle Store (See Top 100 Paid in Kindle Store)
  •  Would you like to give feedback on images?

More About the Author

Discover books, learn about writers, and more.

Customer Reviews

3.3 out of 5 stars
3.3 out of 5 stars
Most Helpful Customer Reviews
3 of 3 people found the following review helpful
2.0 out of 5 stars Lightweight - unfortunately not in a good way 19 Jun. 2008
Format:Paperback|Verified Purchase
I am normally a big fan of O'Reilly books but this needs to be more of a 'definitive guide'. I honestly feel that if you only read this book you really won't know what you are doing with Hibernate - it only skims over the subject and spends far too much time off-subject, talking about Maven etc.

For example, the book does not cover second-level caching in Hibernate. This is a key feature which can improve application performance, but there is no reference for it in the index and almost no mention of it in the book. It just says 'switch off caching' around page 50 and doesn't mention it again. Also, there is no discussion of locking strategies - e.g. optimistic vs pessimistic locking - which is essential to understand if you are building critical systems. Both of these are of course covered in the reference documentation as well as in books such as 'Pojos in Action'.

The books repeatedly says 'look at the reference documentation for more detail'. Personally, I think you'd be better off ONLY reading the reference documentation. The reference documentation is fewer pages and far more useful, as well as being free.
Comment | 
Was this review helpful to you?
1 of 1 people found the following review helpful
Format:Paperback|Verified Purchase
I really like the style of this book. It's written using a worked example, built up from first principles. I think this works really well because it gives the book a nice flow, and you see all the nuts and bolts in a logical order.

However, there are problems. As another reader mentioned, the book spends far too much time explaining Maven, which is unnecessary, and could be the subject of another book.
Although the style is clear, with plenty of code examples, I do feel that this book skims the surface. It's ok as a gentle introduction to Hibernate, but the text uses the phrase "refer to Hibernate reference manual for more details" a bit too often.

I was also very disappointed to find that although there is much discussion about how to handle object associations, there appears to be absolutely no discussion of object inheritance. This is a fundamental concept of Object oriented programming, and I would expect any Hibernate book to explore the techniques used to persist object hierarchies.

On balance, if you are already familiar with Hibernate, this is probably not the book for you. However newcomers will learn a lot from it, and the style is very accessible. Just don't expect to find a comprehensive guide to Hibernate here.
Comment | 
Was this review helpful to you?
0 of 2 people found the following review helpful
5.0 out of 5 stars Excellent book with clear examples 9 May 2008
This book is by far one of the best books on Hibernate. The main reason is the example code that go hand in hand with the book, and illustrates why Hibernate is so powerful. A decent clear example which simply solves the problem presented in each chapter is what every hard working developer needs from a book. Harnessing Hibernate delivers on this in spades.
Comment | 
Was this review helpful to you?
Most Helpful Customer Reviews on (beta) 3.6 out of 5 stars  24 reviews
26 of 27 people found the following review helpful
2.0 out of 5 stars Expected more 11 Jan. 2009
By Charlie - Published on
The chapter about eclipse and hibernate was somewhat useful, the rest was some sort of tedious tribute to ant, maven and open software in general. The main argument seems to avoid 'complex joins', why would you work with databases at all if you think joins between two tables is rocket science? What will you do if hibernate fails and you don't understand whats going on beneath? How can you design a good database if you find these things to complex?

I bought the book to learn HIBERNATE, not ant, not maven etc. The examples are poor, i.e it shows how to do a one-to-many relationship, what about other relationships?

To me, the hibernate documentation was much more useful, seriously.
12 of 12 people found the following review helpful
4.0 out of 5 stars Beginner's Hibernate 6 Oct. 2008
By Eric Jain - Published on
Nice step-by-step guide for building a web application that makes use of Hibernate. This fills in an important gap left by the official Hibernate documentation. However, a consequence of this approach is that much of the book ends up being devoted to explaining how to set up the chosen tools and frameworks (see table of contents). If you are instead looking for more in-depth information on topics such as session and object lifecycles, complicated mappings or performance, you'll find more information in the official Hibernate documentation (or in the corresponding section in the Spring documentation). This book really ought to have a less cute, but more descriptive title.
9 of 9 people found the following review helpful
2.0 out of 5 stars Not enough Hibernate Detail - Poor Book 7 Jan. 2009
By K. Langer - Published on
Format:Paperback|Verified Purchase
I ordered and read this book. Overall, I was able to get information from it but it was not complete enough. I ended up finding more answers from the internet and from "Beginning Hibernate" (Apress). The Apress book was ordered recently and is really meant for developers. It has a lot of clear examples and work around approaches for odd HQL things (i.e. use Views if you have HQL aggregate issues).

Where the Programming Hibernate lost me (my interest that is) was the extensive discussion about Maven. Who cares about Maven. It is a good build system but Maven is _not_ required to use Hibernate. Why discuss it? This book and the Apress books were about the same length (in pages) so much of the O'Reilly book was wasted talking about Maven when Hibernate (the purpose of the book) should have been discussed. Plus, it adds complexity if you need Maven to do the examples.

If you are getting into Hibernate, check out the Apress book first. Then look at this book.
7 of 8 people found the following review helpful
3.0 out of 5 stars Only really an Introduction 31 Oct. 2008
By Alex Turner - Published on
Format:Paperback|Verified Purchase
I am totally new to hibernate, and I was hoping for a book that would serve as a comprehensive guide to hibernate. I was rather disappointed. The book constantly says: you can do this really neato thing, but it's beyond the scope of this book. The chapter on HQL was very brief indeed really only scratching the surface, which was a bit surprising as it would seem to me that using HQL would be a very common task which would benefit from in depth coverage. The chapter on annotations was also a bit light as this seems to be the new preferred way to use hibernate amongst developers today.

Despite these grumbles with the book, I found it a helpful and clear introduction to hibernate that did at least give me an overview in a clear and concise manner. The coverage of features in hibernate 3 was good too, as other books have become a bit dated. The later chapters on how to integrate hibernate with other tools are very useful, and I found the inclusion of stripes particularly poignant. It's a good book, but not great if what you want is an in depth understanding of hibernate.
12 of 16 people found the following review helpful
5.0 out of 5 stars Harness Hibernate... fast 10 Jun. 2008
By W. Lehman - Published on
Format:Paperback|Verified Purchase
Harnessing Hibernate is a fine book, which uses the most efficient ways to achieve its goal. Though focusing on Hibernate, the book enlists the usage of various frameworks such as Spring Framework, Stripes and Maven.

Part I: Hibernate in a hurry: The core

The book starts with how you should build which used to be a dread. The authors choose to use Ant - Maven task, which is cool. I use Maven directly, but that's beside the point. Both approaches are better than finding the JARs on the web.

HSQLDB is what the book recommends and for some reason it makes sense </sarcasm>. It really is the best way to go. I am not suggesting to format your Oracle DB server and install HSQLDB; but I am suggesting you stay focused and worry about the big DB later; the book goes back to a larger DB; so don't worry too much right now.

The Project Hierarchy:
This one, I must admit, I do not care for; I think Maven directory structure is better and one should not have to create this manually, but that's probably personal. This is later reviewed in Chapter 12: Maven in More Depth.

Core hibernate:
The book doesn't mess around too much. It explains how to configure hibernate and before long you find your hands in hibernate mapping. From chapter 2 through chapter 9 you'll find yourself in the core of Hibernate: mapping, hibernate configuration, persistent objects (creating and finding), collections and associations, richer associations, custom value types, annotations, criteria queries and a look at HQL.

Part II: Playing nice with others: beyond the core

MySQL - a nice short intro to MySQL is shown.

Hibernate and Eclipse - yes, this is in here too (and up to date Eclipse v3.3). And just in time for you to get ready for a later chapter, Spring and Hibernate, which is the way J2EE is going anyway (lightweight).

Maven in more depth - Maven does not have many books out there and this is a very nice in depth explanation. If you think you've gotten short changed, take a look at Java Power Tools (you'll love that book too). The chapter is enough to get you moving with Maven, and if your Maven experience is anything like mine, you'll never go back to Ant.

Hibernate and Spring - this book could not have gotten any better than this. Spring, is like a dream. Rod Johnson, Colin Sampaleanu and team have done it well. Unlike the other monolithic approach, Spring takes advantage of already existing frameworks and offers this invisible layer to allow you to focus on what's important; your business code... and, of course, the book delivers. It shows you how Spring simplifies Hibernate development. If you're new to layered development a la separation of concerns (SoC) the book first introduces you to the DAO pattern. It then continues with the reason so many of us like the Spring framework: HibernateDAOSupport and the HibernateTemplate. Although I prefer to use the HibernateTemplate directly and avoid loosing my one chance at inheritance, I agree with the book examples. The authors are tying to help you understand what kind of support Spring offers.

Stripes with Spring and Hibernate - Now, the book could just end here and be done with it, but no, it continues with the web app. I mean, wow. The book ends with style. It uses Tomcat - and I think it does it to prove a point. You don't need a fancy big server to get J2EE running these days. Stripes is a cool project to work with and I thank the authors for introducing me to a framework I was clueless about.

This book is truly amazing. If you're looking for an in-depth approach to Hibernate take a look at Java Persistence with Hibernate. If, however, you're an impatient developer this is the book for you. I think it offers just enough in-depth theory and it keeps you awake with frequent easy to understand code.

James Elliott, Timothy M. O'Brien and Ryan Fowler; I thank you all for writing this book.

Were these reviews helpful?   Let us know
Search Customer Reviews

Customer Discussions

This product's forum
Discussion Replies Latest Post
No discussions yet

Ask questions, Share opinions, Gain insight
Start a new discussion
First post:
Prompts for sign-in

Search Customer Discussions
Search all Amazon discussions

Look for similar items by category