Book review: Pro JPA 2: Mastering the Java Persistence API
Z Jacek Laskowski - Wiki Projektanta Java EE
Pro JPA 2: Mastering the Java™ Persistence API by Mike Keith, Merrick Schincariol (Apress, December 2009)
By no stretch of the imagination could you believe the JPA 2.0 specification goes into detail better
With mixed feelings I'm writing the book review of Pro JPA 2: Mastering the Java Persistence API by Mike Keith and Merrick Schincariol (Apress, December 2009). On the one hand I'd highly recommend the book to anyone who is interested in the JPA 2.0 specification and doesn't anticipate reading more than a single book about JPA (to have a complete understanding of the subject), but on the other hand it is a book that takes ages to read and even more to digest. It was beginning to try my patience yet I couldn't stop reading it. The more I delved in the book the more 'Aha'-moments struck me.
I first thought I was well prepared for the book and I knew quite a lot about JPA 1.0 in theory and practice, but it took me just a few chapters to realize that I had just scratched the surface of the JPA specification and I'd still dare to call it an extensive JPA knowledge. I couldn't have been wrong more. I had no doubts that the JPA 2.0 was quite new to me with its Criteria API and dynamic, typesafe (or strongly typed) queries or embedded objects and their collection mappings or validation and constraints as well as the outside the server deployment, but still thought I was not going to be surprised so often even in the areas I felt strong.
With all these enhancements it's hard to expect a single book can give enough explanation to cover the intricacies of the JPA 2.0 specification, but I have no doubt the authors made every effort to write one. There are almost 500 pages divided among 15 chapters ranging from the unsurprisingly, introductory chapter 1. "Introduction" to the chapter 15. "Migration" with the chapter 9. "Criteria API" in between. If you think you could skip some parts of the book to learn more about JPA faster, you couldn't be more mistaken. However you look at it, the book is not an easy task to read it from a cover to cover, but I think there's no other way to get the most out of it and appreciate its value. You'll certainly miss these skipped chapters if you decide to skip some as the extensive JPA coverage grows gradually with samples all over the book. You skip one chapter and a whole raft of examples are gone. Something not to be missed if you wanna go pro.
The authors are very diligent in describing each and every detail of the JPA spec without having the broader view put aside. They carry a reader gently and with a great care through the JPA complexity to make the subject easy to follow and understand. They quickly present an overview of the previous versions of the EJB spec with its pre-JPA CMPs, the current persistence standards like JDBC and JDO and delve into the parts of the newest EJB 3.1 and Java EE 6 areas to guide you to the proper use of JPA in your projects. Every detail is taken care of with many examples and comments. New JPA 2.0 changes are very noticeable to the eye with TIP box-markers so you can very easily find these places for later study.
If only there were books like Pro JPA 2: Mastering the Java Persistence API published you'd never look elsewhere for additional coverage of the subject.
