title: hibernate session close
body: <p>I just followed a simple hibernate struts tutorial and succesfully made db calls through hibernate. However I don't see the code closing the hibernate connection anywhere. </p>
  
  <pre><code>sessionFactory.getCurrentSession();
  </code></pre>
  
  <p>is used to get the session per request. Should I close this session when the user logs out? or after each request of is this something taken care of by the framework?</p>
  
  <p>a second related question is, In what kind of use case would I use a hibernate session interceptor? </p>
  
  <p>and a third question(sorry it just popped in my mind) what the best option for caching with hibernate/struts2?</p>