first thing i'm giving the answer, but this question should be asked in Object Relational Mappingthread.
lets consider the web.xml of web application, what actually it tells, it gives the instruction to web container where to look particular resource to particular request, same thing hibernate.cfg.xml file gives the instruction to hibernate framework.
lets take a xml file now and store some data in that xml file, now if you want to get the stored the data in the xml file in the java program what we do, we use some of the java API which parse the xml file and create the java Object for us, so that we can easily work around the xml file.
1. SessionFactory is java objects which represents the hibernate.cfg.xml
2.if we see inside the hibernate.cfg.xml we find the configuration for database setup same thing we use it in the JDBC. and some instruction to the hibernate framework
3. so we don't want to worry about writing the programmatic code for database connection which we do in JDBC, everything it is going to be created by hibernate and hand over to us an object that is SessionFactory, by using the SessionFactory we can directly start working on insertion, delete, and update function the database level using the
posted 4 years ago
What are you doing? You are supposed to be reading this tiny ad!
the new thread boost feature brings a LOT of attention to your favorite threads