Multiple choice technology architecture

Location to keep “hibernate.cfg.xml” so that it gets picked up during startup?

  1. Lib Directory of Java Home.

  2. Lib Directory of Application/Web Server.

  3. Source Directory of the Hibernate Project.

  4. None of the above.

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

The hibernate.cfg.xml configuration file must be on the application classpath to be automatically detected by Hibernate at startup. Placing it in the source directory ensures it gets copied to the classpath root during compilation. Lib directories are for JAR dependencies, not configuration files.