title: Is there a difference between getTransaction().begin()/.commit() and joinTransaction() with JPA2/EclipseLink?
body: <p>I'm using JPA2 with annotations and EclipseLink and I'm wondering if there is a difference between</p>
  
  <pre><code>EntityManager em = ...
  // Some action
  em.joinTransaction();
  em.close();
  </code></pre>
  
  <p>and</p>
  
  <pre><code>EntityManager em = PU.entityManager();
  em.getTransaction().begin();
  // Some action
  em.getTransaction().commit();
  em.close();
  </code></pre>
  
  <p>and which one should I generally prefer?</p>