Loading, please wait...

Hibernate MCQ Quiz (Multiple Choice Questions And Answers)

Search here for MCQs

Are you preparing for the next job interviews? If yes, trust me this post will help you also we'll suggest you check out a big collection for Programming Full Forms that may help you in your interview:

List of Programming Full Forms 

21. Which ways are used by the Log4j and Logback frameworks in hibernate framework to support logging?

  • By log4j.xml file
  • By log4j.properties
  • Both A & B
  • None of the above

22. Which statement is correct?

  • Only the Session that you obtained with sf.getCurrentSession() is flushed and closed automatically
  • Only the Session that you obtained with sf.openSession() is flushed and closed automatically
  • Only the Session that you obtained with sf.getNewSession() is flushed and closed automatically
  • None of the above

23. What does hibernate.hbm2ddl.auto create this means?

  • create tables automatically
  • create session object automatically
  • create Session Factory object automatically
  • None of the above

24. Which of the following is FALSE about Session in hibernate?

  • Session is a lightweight non-threadsafe object
  • can share the session between threads
  • Session represents a single unit-of-work with the database
  • Session is the primary interface for the persistence service

25. Which of the following is true about query level cache in hibernate?

  • Query level cache is an optional feature
  • Query level cache requires two additional physical cache regions that hold the cached query results and the timestamps when a table was last updated
  • Query level cache is only useful for queries that are run frequently with the same parameters
  • All of the above