Friday, March 31, 2017

What is session in Hibernate

1.       What is session?

Session:-

Open the session/connection with database software from hibernate application.
Internally encapsulates the JDBC con that is collected from JDBC con pool represented by session factory object.
The main component in hibernate application to provide the form of objects Based  on  these instruction. Hibernate framework internally uses JDBC code with SQL Queries to perform persistence operations.
It is the object of java class that implements org.hibernate.Session(I).

Session session=factory.openSession();

Makes SessionFactory object to create 1 hibernate session object encapsulating the JDBC connection object  this session object is useful to maintain domain class objects and to  provide persistence instances of hibernate framework.

No comments:

Post a Comment