- Hibernate (Java)
Infobox Software
name = Hibernate
developer =Red Hat
latest release version = 3.3.1 GA
latest release date = release date|2008|09|11
operating system =Cross-platform (JVM )
latest preview version =
latest preview date =
platform =Java Virtual Machine
programming language = Java
genre =Object-relational mapping
license =GNU Lesser General Public License
website = http://www.hibernate.orgHibernate is an
object-relational mapping (ORM) library for the Java language, providing a framework for mapping an object-orienteddomain model to a traditionalrelational database . Hibernate solvesObject-Relational impedance mismatch problems by replacing direct persistence-related database accesses with high-level object handling functions. The Hibernate 2.1 framework won aJolt Award in 2005. [ [http://www.ddj.com/architect/184415340?pgno=15 Jolt winners 2005] ]Hibernate is free as
open source software that is distributed under theGNU Lesser General Public License .Feature summary
Hibernate's primary feature is mapping from Java classes to database tables (and from Java data types to
SQL data types). Hibernate also provides data query and retrieval facilities. Hibernate generates the SQL calls and relieves the developer from manual result set handling and object conversion, keeping the application portable to all SQL databases, with database portability delivered at very little performance overhead.Hibernate provides transparent persistence for
Plain Old Java Object s (POJOs). The only strict requirement for a persistent class is a no-argument constructor, not compulsorily "public". (Proper behavior in some applications also requires special attention to the "equals()" and "hashCode()" methods. [http://www.hibernate.org/109.html] )Hibernate provides a "dirty checking" feature that avoids unnecessary database write actions by performing SQL updates only on the modified fields of persistent objects.
Hibernate can be used both in standalone Java applications and in
Java EE applications using servlets orEJB session beans.History
Hibernate was developed by a team of Java software developers around the world led by Gavin King. JBoss, Inc. (now part of
Red Hat ) later hired the lead Hibernate developers and worked with them in supporting Hibernate.The current version of Hibernate is Version 3.x . This version has new features like a new Interceptor/Callback architecture, user defined filters, and JDK 5.0 Annotations (Java's
metadata feature). Hibernate 3 is also very close to theEJB 3.0 specification (although it was finished before theEJB 3.0 specification was released by the Hibernate wrapper for the Core module which provides conformity with the JSR 220 JPA Entity Manager standard).Application programming interface
The Hibernate API is provided in the
Java package [http://www.hibernate.org/hib_docs/v3/api/index.html org.hibernate] .[http://www.hibernate.org/hib_docs/v3/api/org/hibernate/SessionFactory.html org.hibernate.SessionFactory] interface
References immutable and threadsafe object creating new Hibernate sessions. Hibernate-based applications are usually designed to make use only of a single instance of the class implementing this interface (often exposed using a singleton design pattern).
[http://www.hibernate.org/hib_docs/v3/api/org/hibernate/Session.html org.hibernate.Session] interface
Represents a Hibernate session i.e. the main point of the manipulation performed on the database entities. The latter activities include (among the other things) managing the persistence state (transient, persisted, detached) of the objects, fetching the persisted ones from the database and the management of the transaction demarcation.
Session is intended to last as long as the logical transaction on the database. Due to the latter feature Session implementations are not expected to be threadsafe nor to be used by multiple clients.
See also
*
EJB 3.0
*NHibernate
*Spring Framework (Java)
*Serialization
*iBATIS
*Service Data Object
*Struts
*Terracotta Cluster
*TopLink
*EclipseLink
*OpenJPA References
* Christian Bauer, Gavin King: Java Persistence with Hibernate, Manning Publications Company, ISBN 1-932394-88-5
* Christian Bauer, Gavin King: Hibernate In Action, Manning Publications Company, ISBN 1-932394-15-X
* Will Iverson: Hibernate: A J2EE Developer's Guide, Addison Wesley Professional, ISBN 0-321-26819-9
* James Elliott: Hibernate: A Developer's Notebook, O'Reilly, ISBN 0-596-00696-9External links
* [http://www.hibernate.org Hibernate Home Page]
* [http://www.javafree.org/content/view.jf?idContent=3 Interview with Gavin King, founder of Hibernate]
* [http://www.visualbuilder.com/java/hibernate/tutorial/ Hibernate Tutorial]
* [http://www.hibernate.org/hib_docs/reference/en/html/index.html Hibernate Reference Documentation]
Wikimedia Foundation. 2010.