![]() ![]() ![]() For example, code that manages transactions using a JDBC connection cannot run within a global JTA transaction. Local Transactions: Local transactions may be easier to use, but have significant disadvantages: they cannot work across multiple transactional resources. Obviously all use of global transactions limits the reusability of application code, as JTA is normally only available in an application server environment. Furthermore, a JTA UserTransaction normally needs to be sourced from JNDI: meaning that we need to use both JNDI and JTA to use JTA. Global Transactions: Global transactions have a significant downside, in that code needs to use JTA, and JTA is a cumbersome API to use (partly due to its exception model). Local transactions are resource-specific: the most common example would be a transaction associated with a JDBC connection. Global transactions are managed by the application server, using the Java Transaction API (JTA). Traditionally, J2EE developers have had two choices for transaction management: global or local transactions. Integrates very well with Spring's various data access abstractions.Provides a simpler API for programmatic transaction management than a number of complex transaction APIs such as JTA.Supports declarative transaction management. ![]() Provides a consistent programming model across different transaction APIs such as JTA, JDBC, Hibernate, JPA, and JDO.The Spring Framework provides a consistent abstraction for transaction management that delivers the following benefits: One of the most compelling reasons to use the Spring Framework is the comprehensive transaction support. ![]()
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |