docs: protected <R> R call(Function<EntityManager, R> function) {
          
          boolean transactionOwner = false;    
          try {
              transactionOwner = txm.begin();
              EntityManager em = emf.createEntityManager();
              R result = function.apply(em);
              txm.commit( transactionOwner );
              em.close();
              return result;
          } catch (Exception e) {
              txm.rollback(transactionOwner);
              throw new RuntimeException( "Exception when persisting error information", e);
          }       
      }