Reputation: 17011
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?
Upvotes: 10
Views: 8496
Reputation: 11
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.
Upvotes: -1
Reputation: 91
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.
Upvotes: 9
Reputation: 27234
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.
Upvotes: 4
Reputation: 508
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
Upvotes: 17
Reputation: 37007
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.
Upvotes: 2
Reputation: 41858
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
Upvotes: 0