Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Java Transaction API (JTA) Overview Help

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?

like image 573
Saobi Avatar asked Oct 30 '09 03:10

Saobi


3 Answers

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

like image 91
Nitin Verma Avatar answered Nov 10 '22 13:11

Nitin Verma


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.

like image 38
Edward Mamedov Avatar answered Nov 10 '22 14:11

Edward Mamedov


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.

like image 21
alphazero Avatar answered Nov 10 '22 14:11

alphazero