What are Bean-Managed Transactions?

Bean Managed Transactions are -
-Not supported in entity beans
-Either Session or Message Driven Beans can have Bean Managed Transactions.
-These transactions could be of two types:
a.JDBC Transactions:
- is controlled by the transaction manager of the DBMS.
invoke the commit and rollback methods of the java.sql.Connection interface.
-The beginning of a transaction is implicit.
- A transaction begins with the first SQL statement that follows the most recent commit, rollback, or connect statement. (This rule is generally true, but may vary with DBMS vendor.)

b. JTA(Java Transaction API) Transactions:
-is controlled by the Java EE transaction manager which does not support nested transactions,means a new transaction cannot start unless previous one is finished.
-use when transaction can span updates to multiple databases from different vendors.
-invoke the begin, commit, and rollback methods of the javax.transaction.UserTransaction interface.



Interview Questions On Java,Java EE Copyright © 2018. Reads: best tracker