79213715

Date: 2024-11-22 05:10:15
Score: 0.5
Natty:
Report link

Found the issue. Changed em.isJoinedToTransaction() to em.getTransaction().isActive() and now it is working fine.

if(em.getTransaction().isActive()){
            em.getTransaction().commit();
}
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Self-answer (0.5):
Posted by: Priyshrm