p hasini wrote:We specify the Database connection in hibernate.cfg.xml file. Is this file loaded when we start the server?
Hibernate does that when initializing.
Does the application connect to the database only once during startup , or each time we perform the CRUD operations.
Normal practice is to use the connection pool provided by the application server.
I mean is there a opening and closing of a database connection each time we perform an operation on the database.
In case of connection pooling connection object (handle) returns to the pool when you close it in your code. You can configure Hibernate to use the connection pooling.