title: Does committing transaction close session?
body: <p>I am new to hibernate.</p>
  
  <p>Does <code>session.getTransaction().commit()</code>, close the session? Because in the api documentation it is not mentioned that it closes the session. </p>
  
  <p>In my code I have</p>
  
  <pre><code>session.getTransaction().commit();
  session.close();
  </code></pre>
  
  <p>But I get following exception</p>
  
  <blockquote>
    <p>org.hibernate.SessionException: Session was already closed</p>
  </blockquote>
  
  <p>If I remove <code>session.close()</code>, then I do not get this exception.</p>