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

SessionFactory ...

 
Vassili Vladimir
Ranch Hand
Posts: 1585
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Could anybody tell me what exactly the SessionFactory is ?

Is it the ready connection to the DataBase but not instantiated yet ? And is the Session, the ready to use SessionFactory ???

Thanks ...
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Are you asking about Hibernate's SessionFactory class? You don't mention the ORM, so I'll assume this is about Hibernate. A SessionFactory is a factory object that supplies Sessions. Simple as that. Normally an application will have one instance of a SessionFactory, created with a configuration that is all the mapping files you have defined. A Session is a distinct object; it is not a "ready to use" SessionFactory. Have a read o fthe configuration section of the Hibernate documentation.
 
Vassili Vladimir
Ranch Hand
Posts: 1585
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the help, and yeah i meant Hibernate's SessionFactory, sorry for not mentioning it

Thanks again for the help ...
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic