7374757677787980818283
} tx = pm.currentTransaction(); tx.begin(); pm.makePersistent(entity); tx.commit(); return entity.toClientObject(); } finally { if (tx != null && tx.isActive()) { tx.rollback(); } pm.close();