Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Hibernate basic

 
vendikonda sravan
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I am new to Hibernate and i want Exactly happing in the fallowing code please explain step by step,

// This step will read hibernate.cfg.xml and prepare hibernate for use

SessionFactory sessionFactory = new

Configuration().configure().buildSessionFactory();
session =sessionFactory.openSession();

I do know what is a config file .
just wan a know why these specific steps for reading config file.

Thanks
Sravan V
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A configuration file is used to configure your SessionFactory (the SessionFactory is the object through which Hibernate abstracts data access). See this helpful resource.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic