Multiple choice technology programming languages

Which of the following is NOT a role of the session interface?

  1. Holds a mandatory (first-level) cache of persistent objects, used when navigating the object graph or looking up objects by identifier

  2. Created during application initialization

  3. Wraps a JDBC connection

  4. Act as session Factory

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

The Hibernate Session interface wraps a JDBC connection and provides methods for CRUD operations. It also holds a first-level cache and is created by SessionFactory (not during application initialization - that's when SessionFactory is created). The Session itself does not act as a factory.