Hibernate Architecture

In this lesson you will learn the architecture of Hibernate. The following diagram describes the high level architecture of hibernate.



Hibernate Examples Hibernate 5 build SessionFactory Example Hibernate 5 SessionFactory Example Hibernate 5 Annotation Example How to download Hibernate 5.x? Hibernate 5 Features Hibernate 5 Tutorials Learning Hibernate ORM - Free Training/Tutorial videos of Hibernate ORM with Java How to write hello world example program in Hibernate? How to create one to one relationship in Hibernate 4 with Annotation? How to calculate minimum in Hibernate using the min() Function Hibernate ORM 4.2.21.Final Released - Create CURD application in latest Hibernate Hibernate ORM 4.2.21 Tutorial - Learn Hibernate ORM Framework Hibernate Error: Failed to create sessionFactory object.java.lang.NoClassDefFoundError How to create Hibernate Project in Eclipse? Examples of Hibernate Criteria Query Hibernate ORM 4.3.6.Final released Hibernate ORM 4.2.14.Final released Hibernate 4.3.4 Released: Hibernate 4.3.4.Final Maven dependency Hibernate association and join example Learn Hibernate programming with Examples Introduction to Hibernate Framework Hibernate Tutorial: Learn Hibernate with examples Hibernate 4.3 Hello World: Example Hibernate ORM 4.3.1.Final released How to create SessionFactory in Hibernate 4.3.1? Hibernate 4 Hello World: Example of Hello World program Hibernate 4 create Session Factory: Example of creating Session Factory in Hibernate 4 Hibernate 4.3 and JPA 2.1 Example What is Hibernate in Java? Hibernate Overview and Architecture What is JPA 2.1? Hibernate 4.3.0.Final Maven dependency Hibernate 4.3 ORM Features Hibernate 4.3 Tutorial Hibernate Criteria average example Hibernate Criteria load all objects from table Hibernate Criteria Hibernate ORM 4.3.0.Final released Hibernate beginner tutorial Hibernate Session.delete() Example Hibernate save or update method example Hibernate Load Example Hibernate save Example - Rose India Hibernate 4 tutorials Hibernate Example Step by Step in Eclipse Hibernate Configuration files Setup Hibernate Environment Hibernate Architecture Hibernate Overview Hibernate 4.2 Tutorial

Hibernate Architecture


In this lesson you will learn the architecture of Hibernate. 

There are three components of Hibernate architecture:

  • Connection manager

  • Transaction manager

  • ORM

The following diagram describes the high level architecture of hibernate:

The above diagram shows that Hibernate is using the database and configuration data to provide persistence services (and persistent objects) to the application.

To use Hibernate, it is required to create Java classes that represents the table in the database and then map the instance variable in the class with the columns in the database. Then Hibernate can be used to perform operations on the database like select, insert, update and delete the records in the table. Hibernate automatically creates the query to perform these operations.

Hibernate architecture has three main components:

  • Connection Management
    Hibernate Connection management service provide efficient management of the database connections. Database connection is the most expensive part of interacting with the database as it requires a lot of resources of open and close the database connection.  

  • Transaction management:
    Transaction management service provide the ability to the user to execute more than one database statements at a time.

  • Object relational mapping:
    Object relational mapping is technique of mapping the data representation from an object model to a relational data model. This part of the hibernate is used to select, insert, update and delete the records form the underlying table. When we pass an object to a Session.save() method, Hibernate reads the state of the variables of that object and executes the necessary query.

Hibernate is very good tool as far as object relational mapping is concern, but in terms of connection management and transaction management, it is lacking in performance and capabilities. So usually hibernate is being used with other connection management and transaction management tools. For example apache DBCP is used for connection pooling with the Hibernate.

Hibernate provides a lot of flexibility in use. It is called "Lite" architecture when we only uses the object relational mapping component. While in "Full Cream" architecture all the three component Object Relational mapping, Connection Management and Transaction Management) are used.


Share on Google+Share on Google+

Hibernate Architecture

Posted on: January 19, 2008 If you enjoyed this post then why not add us on Google+? Add us to your Circles



Discuss: Hibernate Architecture   View All Comments

Post your Comment

Your Name (*) :
Your Email :
Subject (*):
Your Comment (*):
  Reload Image
August 21, 2011
hibernet and java

plz send java information
V Srinivasan
October 18, 2011
About the Tutorial

Very good tutorial
rajdeo kumar
October 26, 2011

The above diagram is not completely showing the internal arcchitecture.
December 2, 2011
cursors in oralce

What is cursors in Oracle DB
January 6, 2012
Nice Article

Good information provided.
March 31, 2012
java hibernate

full information with practical of hibernet.. and how to run hibernate
Lawrence Philips
July 6, 2012
proofreading for syntax

"Transaction management service provide the ability to the user to execute more than one database statements at a time." Transaction management service provides the ability to the user to be able to execute more than one database statement at a time. This is an excellent and very useful tutorial, but it should be edited for syntax
July 25, 2012

pls provide how to start project on hibernate.
September 28, 2012

July 13, 2013
what is hibernate pool memory

i have completed in hibernate application but some times pool memory problem