title: JPA - Changes are not persisted for JTA transaction type
body: <p>I am using JTA and my persistence.xml is as follows</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8" ?&gt;
  &lt;persistence xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
               xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd" version="1.0"
               xmlns="http://java.sun.com/xml/ns/persistence"&gt;
    &lt;persistence-unit name="test" transaction-type="JTA"&gt;
      &lt;provider&gt;org.eclipse.persistence.jpa.PersistenceProvider&lt;/provider&gt;
      &lt;jta-data-source&gt;jdbc/testDS&lt;/jta-data-source&gt;
      &lt;class&gt;test.entity.Employees&lt;/class&gt;
      &lt;exclude-unlisted-classes&gt;true&lt;/exclude-unlisted-classes&gt;
      &lt;properties&gt;
        &lt;property name="eclipselink.target-server" value="OC4J"/&gt;
        &lt;property name="javax.persistence.target-database" value="Oracle"/&gt;
        &lt;property name="javax.persistence.logging.parameters" value="TRUE"/&gt;
      &lt;/properties&gt;
    &lt;/persistence-unit&gt;
  &lt;/persistence&gt;
  </code></pre>
  
  <p>As I am using JTA, I do not have EntityTransaction.</p>
  
  <p>Java code snippet</p>
  
  <pre><code>    Employees emp = new Employees();
      emp.setEmpNumber(empPOJO.getEmpNumber());
      final EntityManager em = getEntityManager();
      try {           
              em.merge(vehicleInspection);            
      } finally {
          if (em != null &amp;&amp; em.isOpen()) {
              em.close();
          }
      }
  }
  </code></pre>
  
  <p>However I am not able to persist changes in database.Is it because of not having a commit?</p>