hibernate interview questions

Explain dynamic insert and dynamic update properties in Hibernate

Answer

Define persistence context and entity manager in JPA?

According to JPA specification, a persistence context is a set of managed entity instances. 

Entities are thus managed within a persistence context.

The EntityManager controls the lifecycle of the entities, and these entities can access data store resources.

Describe a Session object?

A Hibernate Session object represents a unit of work in hibernate. A session represents a transaction in a database.

Describe a SessionFactory? Is it thread safe?

A session factory is a global object that manages org.hibernate.Session objects.

It is instantiated once and is thread-safe.

What are the differences between get and load methods in hibernate?

What are the differences between get and load methods in hibernate? This is a common interview question also. 

I will share few points here and please feel free to add more points if you have.

 

Answer

Hibernate Essentials Questions for Self Assessment

This is a list of basic questions from Hibernate which you can use to check your understanding or even prepare for interviews. You may use the parent chapter, other chapters or hibernate or the forum to discuss more on these questions.

 

  1. What is a framework?

  2. What do you mean by CRUD?

  3. What is Hibernate? What are the advantages of using Hibernate?

  4. What is Java Persistence API (JPA)?

Search the Web

Custom Search

Searches whole web. Use the search in the right sidebar to search only within javajee.com!!!