title: OpenJPA merging/persisting is very slow
body: <p>I use OpenJPA 2.2.0 on WebSphere Application Server 8 with a MySQL 5.0 DB.</p>
  
  <p>I have a list of objects which I want to merge into the DB.</p>
  
  <p>it's like:</p>
  
  <pre><code>for (Object ob : list) {
              Long start = Calendar.getInstance().getTimeInMillis();
              em = factory.createEntityManager();
              em.getTransaction().begin();
  
              em.merge(ob);
  
              em.getTransaction().commit();
              em.close();
              Long end = Calendar.getInstance().getTimeInMillis();
              Long diff = end - start;
              LOGGER.info("Time: " + diff);
          }
  </code></pre>
  
  <p>When I run this loop I need about 300-600 Milliseconds to merge one object. When I delete the line "em.merge(ob);" then I need "0" Milliseconds to iterate over 1 List Object.</p>
  
  <p>So my question is: What can I do to improve the time to merge one object?</p>
  
  <p>Thanks!</p>