Hibernate Architecture

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

Ads

Tutorials   
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 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 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.

Advertisements

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

Advertisements

 

Discuss: Hibernate Architecture   View All Comments

Post your Comment


Your Name (*) :
Your Email :
Subject (*):
Your Comment (*):
  Reload Image
 
 
Comments:10
srilakshmi
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
hibernate

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

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

Good information provided.
manoj
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
sachchidanand
July 25, 2012
hibernate

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

ok
vijay
July 13, 2013
what is hibernate pool memory

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

Ads

 

Ads