• 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 ...
 
Happiness is not a goal ... it's a by-product of a life well lived - Eleanor Roosevelt. Tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!