remove begin and close EntityManager