More Books
Hibernate: A J2EE Developer's Guide
Hibernate: A J2EE™ Developer's Guide
Table of Contents
Copyright
Acknowledgments
About the Author
Preface
Required Skills
Roadmap
Chapter 1. Overview
Why Object/Relational Mapping?
What Is Hibernate?
Comparing JDBC to Hibernate
Hibernate's Mapping System
Other Java/Database Integration Solutions
How to Obtain and Install
Supported Databases
Chapter 2. Getting Oriented
Application Architecture
Mapping Files
Generating Java Source
Application Configuration
Web Application
JSP Interface
Chapter 3. Starting from Java
Java Object Model
Generated Mapping Files
Generated Schema
Working with Artifacts and Owners
Chapter 4. Starting from an Existing Schema
Initial Schema
Using Middlegen
Generated Mapping Files
Generated Java
Working with the Database
Chapter 5. Mapping Files
Basic Structure
Mapping File Reference
Chapter 6. Persistent Objects
Sessions
Objects and Identity
Life-Cycle Methods
Chapter 7. Relationships
Database Relationships
Java Collection Relationships
Java Class Relationships
Any-Based Relationships
Bi-directional Relationships
Chapter 8. Queries
HQL
HQL Reference
Select
From
Where
Group By
Having
Order By
Criteria Queries
Native SQL Queries
Chapter 9. Transactions
Introduction to Transactions
Optimistic and Pessimistic Locking
Chapter 10. Performance
Finding and Solving Problems
Queries
Inserts
Connection Pooling
Caching
Chapter 11. Schema Management
Updating an Existing Schema
Generating Update and Drop Scripts
Chapter 12. Best Practices, Style Guide, Tips and Tricks
Reducing Code with Inversion of Control
Reducing Session Creation Impact with ThreadLocal
Using Hibernate as an EJB BMP Solution
Integrating with Other Technologies
Applications That Use Hibernate
Strategies for Getting Started
Chapter 13. Future Directions
Hibernate 3.0
EJB 3.0
Here and Now
Index
SYMBOL
A
B
C
D
E
F
G
H
I
J
K
L
M
N
O
P
Q
R
S
T
U
V
W
X

Hibernate 3.0

Gavin King, the creator of Hibernate, quite wisely avoids speaking of new features and functionality, but he does offer a preliminary preview of possible future directions for Hibernate 3 in his weblog at http://blog.hibernate.org/cgi-bin/blosxom.cgi/2004/04/02#three. In addition, a Hibernate roadmap has been posted at http://hibernate.bluemars.net/200.html.

To summarize the points made, the following are on the horizon as possible directions for Hibernate 3:

Virtualization: Session-level filtering of data. For example, you may wish to allow only data that belongs to a particular user to be viewed across an entire Web application. The virtualization feature will allow you to specify this at the session, instead of in your application code. This feature will probably be of special interest to Web application developers.

More Complex Relationships: As described in Chapter 7, Hibernate already offers support for a variety of complex relationships. Hibernate 3 will allow the use of a single class for multiple tables, table-per-concrete-class mappings, and the ability to use SQL to specify more complex discriminators.

Representation Independence: Allows a persistence model to be represented using entirely dynamic objects, instead of persistent objects. At some point, you may have realized that most JavaBeans could just as easily be represented by a single object with a single get/set property method (as described by the Apache BeanUtils, http://jakarta.apache.org/commons/beanutils/). This feature allows for a much broader suite of dynamic (i.e., runtime) discovery and manipulation of data.

JDK 1.5 Support: For more information on JDK 1.5, see http://java.sun.com/j2se/. Annotations allow XDoclet-style metadata to be embedded in a Java class file and easily accessed at runtime. Generics allow for more typesafe collections (i.e., less casting, more reliable compile-type checking).

Stored Procedures: This would be quite relevant if you are working on an application with legacy stored procedures.

Event-Driven Design: While the life-cycle methods described in Chapter 6 are reasonable, Hibernate lacks a full event model. Currently, the only way to instrument Hibernate to perform certain tasks is to download the source for Hibernate and add your own hooksand that is not the ideal situation.

New Parser Implementation: The grammar for HQL (as described in Chapter 8) is not fully documented and can be frustratingly vague in certain areas. Hibernate 3 should include a full grammar for HQL, as well as the ability to map new grammars on top of the existing implementation.

Declarative Session Management: Instead of session management constituting an explicit part of the application, Hibernate 3 will offer the ability to push this sort of detail into Hibernate and the session configuration.

Despite these changes, Hibernate 3 will not require JDK 1.5. As of this writing, Hibernate 3 is not even available as an alpha technology release.