没有合适的资源?快使用搜索试试~ 我知道了~
温馨提示
试读
37页
JTA 规定事务管理器应该由应用服务器来实现,如 jboss、weblogic、websphere,不过并非所有的应用服务器都实现了事务管理器,如 Tomcat。如果想在标准环境使用 JTA,可以使用支持 JTA 的第三方类库,如 Atomikos、Bitronix。 网上相关文章多为 Spring Boot 环境下对 Atomikos 的使用,对于新人来说不利于理解,因此还是需要参考官方文档。 官网更多内容参见:https://www.atomikos.com/Main/InstallingTransactionsEssentials 开源地址:https://github.com/atomikos/transactions-essentials
资源详情
资源评论
资源推荐
Atomikos
TransactionsEssentials™ Guide
Atomikos TransactionsEssentials Guide
Copyright © 2008-2019 Atomikos
iii
Table of Contents
1. Introduction .................................................................................................................................... 1
1.1. Who Should Read This Guide ................................................................................................. 1
1.2. Preface ................................................................................................................................ 1
1.3. System Requirements ............................................................................................................. 1
2. JTA Overview ................................................................................................................................ 2
2.1. Transactions ......................................................................................................................... 2
2.1.1. Nested Transactions .................................................................................................... 2
2.2. What is JTA? ....................................................................................................................... 3
2.3. Two-Phase Commit ............................................................................................................... 3
2.3.1. JTA Components ........................................................................................................ 4
3. Configuring Atomikos TransactionsEssentials ..................................................................................... 13
3.1. The Configuration File ......................................................................................................... 13
3.2. Default Values You Should Override ...................................................................................... 13
3.3. Ant-Style References in the Properties File .............................................................................. 13
3.4. Questions ........................................................................................................................... 14
3.4.1. Question 1 ............................................................................................................... 14
3.4.2. Question 2 ............................................................................................................... 14
3.4.3. Question 3 ............................................................................................................... 14
4. Programming Transactional Applications ........................................................................................... 15
4.1. Regular Applications: Atomikos JDBC/JMS and the UserTransaction ........................................... 15
4.1.1. Getting the UserTransaction ........................................................................................ 15
4.1.2. JDBC: Using an Atomikos DataSource ......................................................................... 16
4.1.3. JDBC: Using an Atomikos Non-XA DataSource ............................................................ 17
4.1.4. JMS: Using an Atomikos JMS ConnectionFactory .......................................................... 18
4.1.5. JMS: Message-Driven Functionality ............................................................................. 19
4.1.6. JMS: Managed Sender Sessions .................................................................................. 19
4.2. For XA-Level Integration: The JTA TransactionManager ........................................................... 19
4.2.1. Getting the TransactionManager .................................................................................. 19
4.2.2. Typical Code Pattern for JTA/XA ................................................................................ 20
4.3. Easier and Better: The Atomikos TransactionTemplate ............................................................... 21
4.4. For Sophisticated Needs: The Atomikos UserTransactionService ................................................. 21
4.4.1. Getting a UserTransactionService Instance .................................................................... 21
4.4.2. Overriding static properties ......................................................................................... 22
4.4.3. Explicit Resource Registration and Recovery ................................................................. 22
4.4.4. Explicit Startup and Shutdown .................................................................................... 23
4.4.5. Questions ................................................................................................................ 24
5. More Information ........................................................................................................................... 26
A. Answers ...................................................................................................................................... 27
A.1. Chapter 2: Answers ............................................................................................................ 27
A.1.1. Question 1 .............................................................................................................. 27
A.1.2. Question 2 .............................................................................................................. 27
A.1.3. Question 3 .............................................................................................................. 27
A.1.4. Question 4 .............................................................................................................. 27
A.1.5. Question 5 .............................................................................................................. 27
A.2. Chapter 3: Answers ............................................................................................................ 28
A.2.1. Question 1 .............................................................................................................. 28
A.2.2. Question 2 .............................................................................................................. 28
A.2.3. Question 3 .............................................................................................................. 28
A.3. Chapter 4: Answers ............................................................................................................ 28
A.3.1. Question 1 .............................................................................................................. 28
A.3.2. Question 2 .............................................................................................................. 29
Atomikos
TransactionsEssentials™ Guide
iv
B. Using Atomikos in 3rd Party Application Platforms ............................................................................ 30
C. Troubleshooting ............................................................................................................................ 31
D. References ................................................................................................................................... 32
v
List of Examples
2.1. A typical transaction use case ......................................................................................................... 2
4.1. Getting the UserTransaction .......................................................................................................... 16
4.2. Configuring an Atomikos DataSource ............................................................................................. 16
4.3. Using an Atomikos datasource ....................................................................................................... 17
4.4. Using an Atomikos Non-XA DataSource ......................................................................................... 17
4.5. Using an AtomikosConnectionFactoryBean ...................................................................................... 18
4.6. Typical pattern of JTA/XA usage ................................................................................................... 20
4.7. Constructing the UserTransactionService object ................................................................................ 22
4.8. Explicitly registering a (JDBC) resource for recovery. ....................................................................... 23
4.9. Explicit startup and shutdown ........................................................................................................ 24
剩余36页未读,继续阅读
大鹏cool
- 粉丝: 2w+
- 资源: 2
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
评论0