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

Regarding Session-Factory object

 
Raj chiru
Ranch Hand
Posts: 142
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm new to hibernate,could you please clarify My doubts.My question is The SessionFactory is thread-safe and can be shared.
so How SessionFactory is shared?Is muti-thread or single-thread object.
 
Vivek Singh
Ranch Hand
Posts: 92
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
raj chiru wrote:I'm new to hibernate,could you please clarify My doubts.My question is The SessionFactory is thread-safe and can be shared.
so How SessionFactory is shared?Is muti-thread or single-thread object.


Yes it can be shared..
hibernate Shards
 
Raj chiru
Ranch Hand
Posts: 142
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi vivek,

Thanks For Your Reply,
But, still I'm not getting clearly.Could you explain some another way,please?
 
Vivek Singh
Ranch Hand
Posts: 92
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What you actually want to achieve??

Even i am learning hibernate
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
As the Hibernate JavaDocs say, all implementors of the SessionFactory interface should be threadsafe. It is a heavy weight object and is intended to be created once then shared.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic