Multiple choice technology architecture

A simple java application uses Hibernate core to access db. Which of the following statements are true?

  1. Hibernate gets initialized when the application starts.

  2. Hibernate gets initialized when one calls first db access Query object.

  3. Hibernate gets initialized when a SessionFactory is created.

  4. Hibernate gets initialized when first session gets created.

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

Hibernate initializes when the SessionFactory is created, typically via Configuration.buildSessionFactory(). This is when Hibernate reads configuration files, builds mappings, and creates the connection pool. Creating individual Sessions happens after initialization, not during it.