title: What is the difference between a session and a transaction in JPA 2.0?
body: <p>I just begin my JPA 2.0 studies, and I have this piece of code:</p>
  
  <pre><code>em = SessionFactory.startSession();
  tx = em.getTransaction();
  </code></pre>
  
  <p>My problem is: I'm not sure if I completly understand the difference between the use of a session and the use of a transaction. In a few lines, can anyone please tell me the biggest differences between them ? Thanks !</p>