What is difference between @Resource UserTransaction and EntityManager.getTransaction()
EJB are transactional components. The transaction can be managed either by the applicaiton server itself (CMT – container-managed transaction), or manually by yourself within the EJB (BMT – bean-managed transaction). EJB supports distributed transaction through the JTA specification. The distributed transaction is controlled using UserTransaction, which has methods begin, commit, rollback. With CMT, the application … Read more