Bean-managed transaction (BMT), also known as programatic transactions are implemented with the
help of javax.transaction.UserTransaction inteface, which have the commit(), the begin(), the rollback() methods, Why we need it? There are 3 possible reasons:
help of javax.transaction.UserTransaction inteface, which have the commit(), the begin(), the rollback() methods, Why we need it? There are 3 possible reasons:
- We want to use a transaction not in EJB beans (we can use it in POJO or CDI bean)
- We want a one transaction during several request.
- We want client-initiated Transactions: a client, such as an applet, can obtain a reference to the UserTransaction and TransactionManager objects using JNDI. A client can begin a transaction using either object reference