889890891892893894895896897898899
if (ut != null && ut.isInContext()) { em = _emf.createEntityManager(_persistenceUnit.getProperties()); _threadEntityManager.set(em); ut.enlistCloseResource(new EntityManagerCloseResource(em)); return em; } return null;