Hibernate (Java) Question:
Download Job Interview Questions and Answers PDF
What role does the SessionFactory interface play in Hibernate?
Answer:
The application obtains Session instances from a SessionFactory. There is typically a single SessionFactory for the whole application—created during application initialization. The SessionFactory caches generate SQL statements and other mapping metadata that Hibernate uses at runtime. It also holds cached data that has been read in one unit of work and may be reused in a future unit of work
SessionFactory sessionFactory = configuration.buildSessionFactory();
SessionFactory sessionFactory = configuration.buildSessionFactory();
Download Hibernate Interview Questions And Answers
PDF
Previous Question | Next Question |
What role does the Session interface play in Hibernate? | What is the general flow of Hibernate communication with RDBMS? |