@Test public void updateOnProcessTest() throws Exception { String DESC = "Table"; String NEW_DESC = "Red Table"; Product p = new Product(DESC, 10f); ut.begin(); EntityManager em = emf.createEntityManager(); em.persist(p); long id = p.getId(); em.close(); ut.commit(); p.setDescription(NEW_DESC); startJPAWIHProcess(JPAWorkItemHandler.UPDATE_ACTION, p); ut.begin(); em = emf.createEntityManager(); p = em.find(Product.class, id); assertEquals(p.getDescription(), NEW_DESC); ut.commit(); removeProduct(p); }
public void close() { emf.close(); }
JPAWorkItemHandler extends AbstractLogOrThrowWorkItemHandler implements Cacheable { public void close() { emf.close(); } }
JPAWorkItemHandler extends AbstractLogOrThrowWorkItemHandler implements Cacheable { public void close() { emf.close(); } JPAWorkItemHandler(String persistenceUnit);  JPAWorkItemHandler(String persistenceUnit,
                              ClassLoader classloader); }
JPAWorkItemHandler extends AbstractLogOrThrowWorkItemHandler implements Cacheable { public void close() { emf.close(); } JPAWorkItemHandler(String persistenceUnit);  JPAWorkItemHandler(String persistenceUnit,
                              ClassLoader classloader); void executeWorkItem(WorkItem wi,
                                WorkItemManager wim); void close(); void abortWorkItem(WorkItem wi,
                              WorkItemManager wim); }
JPAWorkItemHandler extends AbstractLogOrThrowWorkItemHandler implements Cacheable { public void close() { emf.close(); } JPAWorkItemHandler(String persistenceUnit);  JPAWorkItemHandler(String persistenceUnit,
                              ClassLoader classloader); void executeWorkItem(WorkItem wi,
                                WorkItemManager wim); void close(); void abortWorkItem(WorkItem wi,
                              WorkItemManager wim); static final String P_RESULT; static final String P_TYPE; static final String P_ID; static final String P_ENTITY; static final String P_ACTION; static final String P_QUERY; static final String P_QUERY_PARAMS; static final String P_QUERY_RESULTS; static final String CREATE_ACTION; static final String UPDATE_ACTION; static final String GET_ACTION; static final String DELETE_ACTION; static final String QUERY_ACTION; }