0 votes
in JAVA by
What is Hibernate Session and How to Get it?

1 Answer

0 votes
by

A Session is used to get a physical connection with a database. The Session object is lightweight and designed to be instantiated each time an interaction is needed with the database. Persistent objects are saved and retrieved through a Session object.

Behind the scenes, the Hibernate Session wraps a JDBC java.sql.Connection and acts as a factory for org.hibernate.Transaction instances. It maintains a generally "repeatable read" persistence context (first level cache) of the application domain model.

Related questions

0 votes
asked Apr 15, 2023 in JAVA by Robindeniel
0 votes
asked Apr 14, 2023 in JAVA by SakshiSharma
...