title: Difference between UserTransaction and EntityTransaction
body: <p>Title says it all: What is the difference between a <a href="https://javaee.github.io/javaee-spec/javadocs/javax/transaction/UserTransaction.html" rel="nofollow noreferrer"><code>UserTransaction</code></a> and an <a href="https://javaee.github.io/javaee-spec/javadocs/javax/persistence/EntityTransaction.html" rel="nofollow noreferrer"><code>EntityTransaction</code></a>?</p>
  
  <p>My rudimentary understanding is that <code>UserTransaction</code> is used when JTA is required (e.g. to do queries on mulitple things), and that <code>EntityTransaction</code> is used when JPA only is required (e.g. when the query is atomic).</p>
  
  <p>Is that the only difference between the two or is there more to it than that?</p>