Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is a global transaction?

Tags:

java

jta

JSR 907 JTA 1.2 defines the "global transaction" term:

The UserTransaction.begin method starts a global transaction and associates the transaction with the calling thread.

What does that mean? Is it the outermost transaction or what?

like image 298
St.Antario Avatar asked Nov 27 '14 08:11

St.Antario


People also ask

What is global transaction and local transaction?

Local transactions are specific to a single transactional resource like a JDBC connection, whereas global transactions can span multiple transactional resources like transaction in a distributed system.

What is global transaction banking?

Global Transaction Banking (GTB) integrates, within the Societe Generale Group, business activities such as cash management, correspondent banking, international trade finance, factoring and related currency services.

Where would you use a global transaction?

You use a global transaction when multiple resources manage the transactions. When you use a global transaction, the transaction manager adjusts the multiple resource transactions and concludes the transactions in such a way that the consistency is not lost.

What are global transaction services?

Our Global Transaction Services (GTS) business provides liquidity management, payments and receipts, trade and supply chain finance, foreign exchange, card solutions and data analytics to small businesses, middle market companies, multinational corporations, financial institutions and governments around the world.


1 Answers

Basically the difference between a local transaction and a global transaction is resource bound. A global transaction will span multiple resources. A local transaction is limited to one resource/datasource.

E.g.

In a global transaction you will write to the DB and send a message over a queue.

This is nicely explained here: http://integrationspot.blogspot.co.uk/2011/03/jta-transactions-local-and-global.html

Global Transactions (XA)

When a managed data source is configured for global transactions, it returns connections that can participate in global transactions. A global transaction (also called a distributed transaction) enlists more than one resource in the transaction.

Global Transactions provide the ability to work with multiple transactional resources (typically relational databases and message queues).

like image 161
Stijn Geukens Avatar answered Oct 10 '22 10:10

Stijn Geukens