What role does the Session interface play in Hibernate?
Submitted by: AdministratorThe 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.
Session session = sessionFactory.openSession();
Session interface role:
* Wraps a JDBC connection
* Factory for Transaction
* Holds a mandatory (first-level) cache of persistent objects, used when navigating the object graph or looking up objects by identifier
Submitted by: Administrator
Session session = sessionFactory.openSession();
Session interface role:
* Wraps a JDBC connection
* Factory for Transaction
* Holds a mandatory (first-level) cache of persistent objects, used when navigating the object graph or looking up objects by identifier
Submitted by: Administrator
Read Online Hibernate Job Interview Questions And Answers
Top Hibernate Questions
☺ | How does Hibernate distinguish between transient (i.e. newly instantiated) and detached objects? |
☺ | What is HQL? |
☺ | Why do you need ORM tools like hibernate? |
☺ | What does ORM consists of? |
☺ | What are the general considerations or best practices for defining your Hibernate persistent classes? |
Top Java Programming Language Categories
☺ | Core Java Interview Questions. |
☺ | Hibernate Interview Questions. |
☺ | Advanced Java Interview Questions. |
☺ | IBM WebSphere Interview Questions. |
☺ | Spring Framework Interview Questions. |