调用一下函数即可:
public static void jpaStepCommit()
{
if(JPA.isInsideTransaction())
{
try {
JPA.em().getTransaction().commit();
} catch (Exception ex) {
JPA.em().getTransaction().rollback();
throw convertRuntimeException(ex);
}
JPA.em().getTransaction().begin();
}
}