beautypg.com

3 hibernate framework, Hibernate overview, Hibernate projects – HP Integrity NonStop J-Series User Manual

Page 90: Hibernate annotations, Hibernate entitymanager, Chapter 3: hibernate framework

background image

3 Hibernate Framework

Hibernate Overview

Hibernate is an object-relational mapping (ORM) tool for Java environments that provides a
framework for mapping a data representation from an object model to a relational data model
with an SQL-based schema.

Hibernate provides configuration files to map Java classes with database tables, and to configure
database connectivity properties, such as the database URL, database credentials, connection
pooling configuration parameters, and so on. It also provides data query and retrieval facilities.

The NonStop system provides a platform comprising of JVM and a servlet container to run
applications that use Hibernate.

NOTE:

Any mention of Hibernate in this document implies association with Hibernate versions

3.5.1, 3.6.8, and 4.1.1. The dialects are different for these versions. You must download the
required dialect and integrate it with the appropriate version of Hibernate as necessary. To get
the most recent features, HP recommends you to download the latest dialect and Hibernate versions.
For information on Hibernate, see

http://www.hibernate.org

.

Backward compatibility of the Hibernate dialect is not supported. For example, Hibernate 3.6.8
dialect is not compatible with Hibernate version 3.5.1.

Spring 3.X does not support HibernateTemplate when integrated with Hibernate 4.

Hibernate Projects

In addition to the Hibernate core framework, the JBoss community maintains other projects, such
as Hibernate EntityManager, Hibernate Annotations, Hibernate Shards, and so on. Among these
projects, only Hibernate EntityManager and Hibernate Annotations are presently certified for use
on the NonStop platform.

Hibernate Annotations

In Hibernate, the application metadata is commonly provided to the Java Virtual Machine (JVM)
through XML files. You can also use Annotations to provide the application metadata.

Annotations enable you to provide the metadata for the Object and Relational Table mapping by
including the metadata information in the Plain Old Java Objects (POJO) file along with the code.
This helps you to understand the table structure and POJO simultaneously during application
development. This also reduces the complexity of the application because you need not maintain
separate files for the metadata.

To leverage the above-mentioned features of Annotations in Hibernate, the Hibernate community
provides the Hibernate Annotations package.

The Hibernate Annotations package includes:

Standardized Java Persistence and EJB 3.0 (JSR 220) object/relational mapping annotations

Hibernate-specific extension annotations for performance optimization and special mappings

NOTE:

The Annotation feature is supported on Java 5.0 and later versions.

Hibernate EntityManager

Java EE provides EJB3 specifications to standardize the basic APIs and the metadata required for
any object/relational persistence mechanism. The Hibernate community provides the Hibernate
EntityManager project, which implements the programming interfaces and lifecycle rules as defined
by the EJB3 persistence specifications.

90

Hibernate Framework

This manual is related to the following products: