Synopses & Reviews
Hibernate is an object/relational mapping (ORM) tool that also provides data querying and retrieval functions in a Java environment. Whether you are using simple objects or collections, Hibernate reduces your development time by handling most of the common data persistence tasks. This code-intensive text will take you through Hibernates major components and show you exactly how to use it to enhance your current development practices and toolsets.
You will learn how to install Hibernate, build the development environment, and configure Hibernate for a variety of databases, including DB2®, HypersonicSQL, MySQL®, Oracle®, and PostgreSQL. Then youll learn the details of connecting to databases using Hibernate, creating persistent classes and objects, working with SQL and HQL (the Hibernate Query Language), and managing transactions. Finally, you will take that basic knowledge into your real-world applications, learning to use Hibernate with other tools such as Eclipse, Tomcat, Maven, Struts, and Xdoclet.
What you will learn from this book
- How Hibernate maps objects to a relational database
- How to build a development environment for using Hibernate in a standalone context or in coordination with Tomcat
- Methods of creating persistent objects
- Query techniques using both traditional SQL and Hibernate Query Language
- The DAO design pattern and how to use DAO with Hibernate
- The application of Hibernate within a Maven project management system
- How to incorporate Aspect J and Hibernate for complete control
- How to use advanced caching techniques to improve Hibernates performance
- How to use XDoclet with Hibernate to reduce your development time
- The procedure for using Velocity and Struts with Hibernate
Who this book is for
This book is for professional Java developers who already know how to build sophisticated applications and have at least a general familiarity with databases, Java application development, and Web development. No prior experience with Hibernate is required.
Wrox Professional guides are planned and written by working programmers to meet the real-world needs of programmers, developers, and IT professionals. Focused and relevant, they address the issues technology professionals face every day. They provide examples, practical solutions, and expert education in new technologies, all designed to help programmers do a better job.
What is this book about?
This book is written for professional Java developers who already understand how to build server-side Java applications. The book assumes no previous experience with Hibernate, though readers should have a general familiarity with databases and Web development.
What does this book cover?
After a quick overview of Hibernate in the first two chapters, the authors jump right to the code. They show how to do the following:
- Obtain and install Hibernate
- Build the Hibernate development environment
- Use Hibernate to connect to databases
- Use Hibernate to create persistent classes and objects
- Use the Hibernate database query language and transaction management functions
- Use the Hibernate APIs
After covering these essentials, the authors go further, showing readers how to use Hibernate in the real world. This means demonstrating how to use Hibernate with other popular tools that readers are using (including Eclipse, Tomcat, Maven, Struts, and XDoclet). This book takes a very real-world, hands-on approach to these topics and includes many working code examples, as well as a sophisticated sample application.
? Shows developers how to make the most of Hibernate, a simpler and more flexible alternative to the cumbersome, proprietary Enterprise Java Beans (EJB)
? Hibernate is as popular as Struts and works together with other
Java open source tools, including Struts, Eclipse, Spring, and JBoss
? The lead author is Eric Pugh, a key member of the Hibernate team; the book covers the new 2.2 Hibernate release
? Explains everything from navigating the Hibernate development environment to using Hibernate to create persistent classes and objects or run database queries
About the Author
is a member of the Maven development team and an experienced Java enterprise developer specializing in database application design and development, and open source tool integration. He has contributed Hibernate-related code to many projects, including XDoclet and OSWorkflow, and is currently leading development of the Hibernate plugin for Maven. Eric has built several Hibernate applications for clients (including a Web-based lab automation application) and regularly uses Hibernate with Eclipse and Maven. In addition to writing documentation and specifications, Eric has written for OnJava.
Joseph D. Gradecki is a software engineer at Comprehensive Software Solutions, where he works on their SABIL product, an enterprise-level securities processing system. He has built numerous dynamic, enterprise application using Java, Hibernate, MySQL, XML, AspectJ, servlets, JSPs, Resin, BroadVision, and other technologies. He is the author of Mastering JXTA and the co-author of MySQL and Java Developers Guide and Professional Java Tools for Extreme Programming. Joe holds Bachelors and Masters degrees in Computer Science and is currently pursuing a Ph.D.
Table of Contents
Chapter 1: Introduction to Mapping Objects to Relational Databases.
Chapter 2: Introduction to Hibernate.
Chapter 3: Hibernate Development Environment.
Chapter 4: Database Connecting and Schema Generation.
Chapter 5: Creating Persistent Classes.
Chapter 6: Working with Collections.
Chapter 7: Using Persistent Objects.
Chapter 8: Hibernate Query Language.
Chapter 9: Hibernate Caching.
Chapter 10: Hibernate Transactions and Locking.
Chapter 11: J2EE and Hibernate.
Chapter 12: Hibernate and DAO Design Pattern.
Chapter 13: Hibernate and XDoclet.
Chapter 14: Hibernate and Maven.
Chapter 15: Hibernate Extensions.
Chapter 16: Hibernate and Eclipse.
Chapter 17: Using Velocity, Struts, and Hibernate.
Chapter 18: Hibernate and AspectJ.
Appendix A: Hibernate Database Connectivity.
Appendix B: Getting Involved with Hibernate.
More Information on Open Source.