Hibernate Architecture

The Hibernate architecture includes numerous objects, for example, constant item, session industrial facility, exchange production line, connection factory, session, transaction etc.

The Hibernate architecture is sorted in four layers.

  • Java application layer
  • Hibernate structure layer
  • Backhand programming interface layer
  • Database layer

Let's see the outline of Hibernate architecture :

hibernate architecture

This is the high level architecture of Hibernate with mapping file and configuration file.

hibernate architecture

Hibernate framework uses many objects such as session factory, session, transaction etc. alongwith existing Java API such as JDBC (Java Database Connectivity), JTA (Java Transaction API) and JNDI (Java Naming Directory Interface).

Elements of Hibernate Architecture

For making the first Hibernate application, we should know the components of Hibernate architecture . They are as follows:


The SessionFactory is an industrial facility of session and customer of ConnectionProvider. It holds second dimension cache (discretionary) of data. The org.hibernate.SessionFactory interface gives factory method to get the object of Session.


The session object gives an interface between the application and data put away in the database. It is a brief lived and wraps the JDBC association. It is processing factory of Transaction, Query and Criteria. It holds a first-level reserve (compulsory) of data. The org.hibernate.Session interface gives techniques to embed, update and erase the item. It likewise gives factory factory strategies to Transaction, Query and Criteria.


The exchange object indicates the nuclear unit of work. It is discretionary. The org.hibernate.Transaction interface gives techniques to exchange management.


It is a factory factory of JDBC connections. It abstracts the application from DriverManager or DataSource. It is optional.


It is a factory factory of Transaction. It is optional.

javacodegeeks is optimized for learning.© javacodegeeks .
All Right Reserved and you agree to have read and accepted our term and condition