Preface

Hibernate, like all other object/relational mapping tools, requires metadata that governs the transformation of data from one representation to the other (and vice versa). In Hibernate 2.x, mapping metadata is most of the time declared in XML text files. Another option is XDoclet, utilizing Javadoc source code annotations and a preprocessor at compile time. The same kind of annotation support is now available in the standard JDK, although more powerful and better supported by tools. IntelliJ IDEA, and Eclipse for example, support auto-completion and syntax highlighting of JDK 5.0 annotations. Annotations are compiled into the bytecode and read at runtime (in Hibernate's case on startup) using reflection, so no external XML files are needed.

The EJB3 specification recognizes the interest and the success of the transparent object/relational mapping paradigm. The EJB3 specification standardizes the basic APIs and the metadata needed for any object/relational persistence mechanism. Hibernate EntityManager implements the programming interfaces and lifecycle rules as defined by the EJB3 persistence specification. Together with Hibernate Annotations, this wrapper implements a complete (and standalone) EJB3 persistence solution on top of the mature Hibernate core. You may use a combination of all three together, annotations without EJB3 programming interfaces and lifecycle, or even pure native Hibernate, depending on the business and technical needs of your project. You can at all times fall back to Hibernate native APIs, or if required, even to native JDBC and SQL.

This release is based on the final release of the EJB 3.0 / JPA specification (aka JSP-220) and support all the specification features (including the optional ones). Most of the Hibernate features and extensions are also available through Hibernate specific annotations compared to the specification are also available. While the Hibernate feature coverage is now very high, some are still missing. The eventual goal is to cover all of them. See the JIRA road map section for more informations.

If you are moving from previous Hibernate Annotations versions, please have a look at http://www.hibernate.org/371.html for a migration guide.