• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Hibernate

 
Baazi Reddy
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What is Session Factory?
 
hemantha kumar k
Greenhorn
Posts: 27
Hibernate Java jQuery
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
welcome to JAVARANCH Baazi Reddy

first thing i'm giving the answer, but this question should be asked in Object Relational Mapping thread.

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
 
Baazi Reddy
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks
 
Don't get me started about those stupid light bulbs.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic