Win a copy of The Business Blockchain this week in the Cloud forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

New to Hibernate

 
lavanya Ananth
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am new to Hibernate and this is my first week trying to understand how it works.I would be thankful if this forum can give me good pointers and explanations to my queries.

My first block----- what is the concept behind a threadlocal variable which we use to get a session object in Hibernate?
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A ThreadLocal is not a Hibernate concept, it is part of the core Java API. Basically a ThreadLocal variable is one which is local to the thread which accesses it. So if two thread access a variable, they each have their own independent copy of it i.e. changes to one doesn't affect the other.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic