Questions tagged [xa]

XA allows to execute global transactions that access more than one resource. XA uses a two-phase commit protocol to ensure that all resources either commit or rollback.

XA (eXtended Architecture) allows to execute global transactions that access more than one resource.

The goal of XA is to allow multiple resources to be accessed within the same transaction, thereby preserving the ACID properties across applications. XA uses a two-phase commit protocol to ensure that all resources either commit or rollback.

327 questions
36
votes
6 answers

What is a "distributed transaction"?

The Wikipedia article for Distributed transaction isn't very helpful. Can you give a high-level description with more details of what a distributed transaction is? Also, can you give me an example of why an application or database should perform a…
Zombie
  • 361
  • 1
  • 3
  • 4
36
votes
6 answers

What is the 'best' way to do distributed transactions across multiple databases using Spring and Hibernate

I have an application - more like a utility - that sits in a corner and updates two different databases periodically. It is a little standalone app that has been built with a Spring Application Context. The context has two Hibernate Session…
Vihung
  • 12,947
  • 16
  • 64
  • 90
23
votes
4 answers

Data consistency in XA transactions

Suppose we have a database (e.g. Oracle) and a JMS provider (e.g. HornetQ) participating in an XA transaction. A message is sent to a JMS queue and some data are persisted in the database in the same distributed transaction. After the transaction is…
Dragan Bozanovic
  • 23,102
  • 5
  • 43
  • 110
21
votes
2 answers

What's the difference between nonXADatasource with jta="true" and XADataSource?

I was confused by the fact that we can allow to use JTA transactions with a non-XA-datasource. Link to the documentation. So what is the difference between XA/non-XA datasources? Why should we use XA-datasources at all?
user3663882
  • 6,957
  • 10
  • 51
  • 92
11
votes
1 answer

MessageConsumer/MessageProducer vs QueueSender/QueueReceiver

Is the MessageConsumer/MessageProducer the XA equivalent of QueueSender/QueueReceiver? As far as I can understand the MessageConsumer/MessageProducer are better used in a XA context. In my app I want to switch from QueueConnectionFactory,…
Sergiu
  • 2,502
  • 6
  • 35
  • 57
10
votes
3 answers

Never ending periodic recovery of heuristic participants

For days our log has been full of this message 2018-06-15 12:19:23 WARN [com.arjuna.ats.arjuna] (Periodic Recovery) Transaction 0:ffff0a983f1e:1f3aa2ff:5a09aa02:d1c08c has 1 heuristic participant(s)! 2018-06-15 12:19:23 WARN [com.arjuna.ats.jta]…
Philippe Marschall
  • 4,452
  • 1
  • 34
  • 52
10
votes
1 answer

Is it possible to have two MSSQL persistence units in a transaction without XA?

We have an application that has a number of entity classes for which there must be two tables. The tables are identical, with the only difference being the name. The common solutions offered here on SO are to use inheritance (a mapped superclass and…
G_H
  • 11,739
  • 3
  • 38
  • 82
10
votes
2 answers

Spring Batch Reader's cursor closed early in JTA transaction managed step

The working configuration for the step in question is the following: Step, Spring Batch Job Repository, and business repositories (using various datasources) all use a JTA transaction manager. Step "myStep" uses a Jdbc Paging Item Reader. WebLogic,…
DBK
  • 421
  • 3
  • 12
10
votes
1 answer

Real difference between one-phase and two-phase (XA) commit

Could someone clarify the difference between one-phase and two-phase commit. As far as I understand one-phase commit represents commit in the course of application server (Service method -> EntityManager) and XA commit is the same transaction up to…
sidlejinks
  • 709
  • 1
  • 9
  • 25
9
votes
0 answers

ORA-02051: another session or branch in same transaction failed or finalized

I have a problem with my XA Transaction. If you look at the picture, the XA Transaction flow order is numbered. The call number 3 is the half-workaround I have found so far to half-solve the problem. I mean, if I don't make the SELECT 1 query to…
Andrés Oviedo
  • 1,388
  • 1
  • 13
  • 28
8
votes
2 answers

AMQP, SQL Server and XA

we are developing an application with following characteristics: standalone spring 3.1.0.RELEASE application JPA with Hibernate 3.6.7.Final AMQP (RabbitMQ as Server, Spring AMQP as Client) SQL Server 2008 with jTDS driver We need to synchronize…
Ivan Bosnic
  • 1,916
  • 5
  • 21
  • 31
8
votes
2 answers

Atomikos transaction logs com.atomikos.icatch.enable_logging=false

I would like to understand if the Distributed Transaction Capabilities will work for my application if I set the com.atomikos.icatch.enable_logging=false Do I understand correctly that the Transaction Recovery is relevant in the cases where there…
Alexander Petrov
  • 9,204
  • 31
  • 70
8
votes
3 answers

XA/JTA transaction: JMS message arrives before DB changes are visible

Context is: producer (JTA transaction PT) is both sending message to JMS queue and making DB update; consumer (JTA transaction CT) listens on same queue and reads DB when message is received; application server - WebLogic, DB - Oracle. I've…
Ralkie
  • 3,736
  • 3
  • 25
  • 25
7
votes
1 answer

Why does Quartz Scheduler(JobSToreCMT) require the use of two datasources?

I found this annswer: 1. Long answer to Quartz requiring to data sources, however, if you want an even deeper answer, I believe I’ll need to dig into the source code or do more research: a. JobStoreCMT relies upon transactions being managed by…
Peter
  • 71
  • 1
  • 2
7
votes
3 answers

Does Kafka supports XA transactions?

Can JDBC transactions and kafka transactions work together as XA transaction? Does kafka transaction API supports XA transaction?
Vishal Pawar
  • 217
  • 4
  • 14
1
2 3
21 22