• 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.
 
What are you doing? You are supposed to be reading this tiny ad!
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!