Type of Transaction Management:-
In J2EE, Transaction Management can be divided in two types.
1 Global Transaction
2 Local Transaction
Global Transaction:
1 Use to work with multiple transaction resources like RDBMS or Message Queue
(Pros)
2 Managed by Application Server (WebSphere, Weblogic) using JTA (Cons)
3 JNDI is required to use JTA
4 Code can not be reused as JTA is available at server level(Cons)
5 Example of Global Transaction : EJB CMT
Local Transaction:
1 Use to work with specific resource(transaction associated with JDBC)
2 Can not work across multiple transaction resource opposite to Global
transaction (cons)
3 Most of web application uses only single resources hence it is best option to
use in normal application.