fixed: 判断entityManager的状态