Multiple choice technology databases

what is the use of hibernate.cfg.xml in Hibernate?

  1. To create the connection pool and setup required environment

  2. To configure bean management setup environment

  3. To talk to the database directly with out this configuration file

  4. To create an object and map the data with corresponding object

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

The hibernate.cfg.xml configuration file's primary purpose is to set up the Hibernate environment - database connection parameters (driver class, URL, credentials), dialect, connection pool settings, and other runtime configurations. Option B refers to Spring bean management, Option C is incorrect (you need this file), and Option D describes mapping, not configuration.