Can someone give me a good explanation on the motivation and application of JTA in modern Java applications? I don'开发者_运维知识库t want overly technical details. But just a paragraph on why do we need JTA, what does JTA accomplish, and maybe a piece of pseudo code showing how JTA is being used?
Normally, an application performs transactional operations over information resources like Database, JMS etc. As these transactions are totally isolated from each other, it can happen that the application is able to commit one transaction on one resource, but on the other one it fails. It would lead to information inconsistency among these resources, as one got committed and the other not.
XA is an open standard to such a problem. And, JTA is the name given to XA in the J2EE world.
Hope that helps.
Nitin
Greatest book about JTA. Java Transaction Design Strategies By Mark Richards
You can find here a lot of basics about JTA, transactions, XA, Spring, EJB support. Good explanation about all aspects of programming and designing transactional application. Recommend.
JTA defines the semantics (specification + API) of the orchestration that allows for 3rd party enterprise information systems and your application to exchange information with integrity.
JTA Specification. Introduction pretty much sums it up.
JTA allows you to write code or systems having multiple transactional resources: databases, message queues, your own custom resource, or resources accessed from multiple processes, perhaps on multiple hosts, as participants in a single transaction.
This has a fairly nice explanation of what JTA is: http://www.roseindia.net/interviewquestions/j2ee-interview-questions-2.shtml
To learn more you can look at the link at the top of this page, the pdf version of the tutorial. As you search for JTA you will find code for JTA. http://docs.sun.com/app/docs/doc/819-3669/bnciz?a=view
JTA allows us to write code which having multiple transaction with resources, databases and resources accessed from multiple processes as participants in a single transaction.
精彩评论