Hibernate - Explain the role of Session interface in Hibernate.

Explain the role of Session interface in Hibernate.

- Session interface is a single threaded object. The representation of single unit of work with the Java application and the persistence database is done by this object. The wrapping of a JDBC connection is the emphasized role of a Session interface object. This is the major interface between Java application and Hibernate. This is a runtime interface. The beginning and ending of a transaction cycle is bounded by the session interface. The purpose of this interface is to perform create, read and delete operations for the objects that are mapped with entity classes.

Explain the role of Session interface in Hibernate.

- In hibernate, the Session interface wraps a JDBC connection, holds a mandatory (first-level) cache of persistent objects, used when navigating the object graph or looking up objects by identifier and is a factory for Transaction

- Session session = sessionFactory.openSession();

- The Session interface is the primary interface used by hibernate applications.

- It is a single-threaded, short-lived object representing a conversation between the application and the persistent store.

- It allows you to create query objects to retrieve persistent objects.
Hibernate - What is a SessionFactory?
What is a SessionFactory? - The SessionFactory is the concept that is a single data store and thread safe..
Hibernate - Role of SessionFactory interface plays
Role of SessionFactory interface plays - The SessionFactory is used to create Sessions...
Hibernate - Difference between load() and get() in Hibernate.
Difference between load() and get() in Hibernate - The load() method throws an exception,when the unique id could not found in the database...
Post your comment
Discussion Board
Role Session interface in Hibernate
Session interface is the primary interface used by hibernate application. it is Single threaded Short-Lived Object Representing a Conversation between the application and Persistence Store. It allow toy to Create a Query Object to Retrieve Persistence Object
Session session = SessionFactory.openSession();
vaibhav kotiyal 06-5-2012