Distributed Transaction questions and transaction questions

Source: Internet
Author: User
Tags jboss

[Switch] distributed transaction questions and transaction questions

For beginners like us, we may use @ Transactional that spring brings to us. We may know JTA, may use jotm and atomikos, and may encounter some terms such as XA, the database driver that supports XA and many other issues will become increasingly confusing. Naturally, a question is raised, what is the overall picture of a huge transaction system?

2. Questions to be addressed

The following describes a series of problems to be solved.

2.1 For the Transaction Model
  • What are the three transaction models? What are their respective features? What are their respective defects?
2.2 spring's support for the transaction model
  • Spring's own interface design:

    • PlatformTransactionManager Transaction Manager
    • TransactionDefinition transaction Definition
    • TransactionStatus Transaction Status

    And so on.

  • How does the implementation of the above interfaces support non-distributed and distributed transactions?

2.3 specification for distributed transactions
  • What is the X/Open DTP model? What are several important concepts?

  • What is the XA specification?

  • What is 2 PC?

2.4 for JTA
  • What is JTA? What is JTS?

  • What is the relationship between JTA and the above specifications?

  • What are JTA interfaces? What are their respective functions?

  • The JTA interface has a javax. transaction. TransactionManager. How can we understand it and the aforementioned PlatformTransactionManager? That is, what are their respective responsibilities?

2.5 JTA implementation
  • Do distributed transactions need to be supported by databases and drivers? Or can the general database and driver be used to implement distributed transactions?

  • Interfaces such as XADataSource, DataSource, XAConnection, and Connection

  • Some application servers do not implement JTA, such as tomcat, and some application servers implement JTA, such as JBoss. How is this implemented?

  • How does jotm and atomikos implement JTA? Do you need database and driver support for XA?

  • 2 PC is often a concept for beginners. How is it embodied in code? How do I simulate 2 pcs?

3. Study Process

Starting from a non-distributed transaction, take the opportunity to understand Spring's support principles for transactions, then transition to distributed transactions, understand the concept of distributed transactions, and analyze the Distributed Transaction frameworks jotm, atomikos, understand their principles for implementing distributed transactions.

3.1 Non-distributed transactions
  • 1. disadvantages of jdbc Transaction Development
  • 2. Programming transaction principles implemented by spring
  • 3. spring uses the declarative transaction interface design and implementation principles implemented by AOP to pave the way for integration with jotm and atomikos.
  • 4. After deeply understanding the above example, let's look at the three transaction models, their respective characteristics and defects.
3.2 concepts of distributed transactions
  • 1 X/Open DTP model, XA specification, 2 PC
  • 2. JTA and JTS concepts
  • 3. Understanding of JTA Interface Definition
3.3 JTA implementation
  • 1 jotm example and the principle of implementing distributed transactions through source code analysis (how to embody the 2 PC process)
  • 2 atomikos examples of non-XADataSource and XADataSource support and the principle of implementing distributed transactions through source code analysis (how to embody the 2 PC process)
  • 3. How JBoss supports distributed transactions

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.