Java面试题:Java TransactionAPI (JTA) 主要包含几部分?

2015-05-05 06:30:02 阅读( 30 )

2858人 收藏本页


JTA主要包含三部分, UserTransaction, Transaction Manager, XAResource

UserTransaction: The javax.transaction.UserTransaction API allows the application to control the transaction boundaries programmatically. In simple words, this high level API allows to mark the beginning and the end of a global (distributed) transaction.
Transaction Manager: The javax.transaction.TransactionManager API is designed as interface for the application server. The application server is able to specify transaction boundaries in charge of the managed application with this high level API.
XAResource: The javax.transaction.xa.XAResource API is a Java implementation of the industry standard XA Interface based on the X/Open CAE specification. This is the low level API between transaction manager and the database. This interface will allow you to speak 2PC with directly the different databases involved in a distributed transaction.




亲~ 如果您有更好的答案 可在评论区发表您独到的见解。

您想查看更多的信息: 面试题