Hibernate Architecture

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


Hibernate 5.3 features Hibernate 5 JPA Configuration Hibernate 5 persistence.xml example Hibernate 5 JPA Tutorial Hibernate and JPA Example How properties of a class are mapped to the columns of a database table in Hibernate? Hibernate 5 Annotations Maven dependency Hibernate 5 annotationconfiguration Doctype Hibernate-configuration 5 Hibernate 5 Dialect Hibernate 5 configuration dtd Hibernate 5 Hello World Getting started with Hibernate 5 Hibernate 5.2.10 jar Download Hibernate 5.2.10 Maven Dependency Hibernate 5 Maven Dependency Hibernate 5 native query example Hibernate 5 query deprecated When should you use Hibernate? What's new in Hibernate 5? How much time it takes to learn Hibernate? Hibernate envers custom revinfo table Hibernate 5 Envers Hibernate Envers get all revisions 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 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