Multiple choice technology web technology

How to get SessoionFactory from configuration object (config) ?

  1. config.createSessionFactory()

  2. config.getSessionFactory()

  3. config.buildSessionFactory()

  4. config. SessionFactory.newInstance()

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

In Hibernate, the Configuration object is used to build a SessionFactory using the buildSessionFactory() method. This reads all configuration files and mappings, then creates the heavyweight SessionFactory instance that manages connections to the database.