Questions tagged [2phase-commit]

algorithm that coordinates all the processes that participate in a distributed transaction on whether to commit or rollback the transaction

70 questions
1
vote
0 answers

2 phase commit using Spring jdbctemplate on different database

I have following requirement and need to know how can I implement the 2 phase commit using Spring JDBCtemplate. The Application (JAR) will run standalone as schedule JOB.(No Web Container) I need to connect 2 database. (Database 1 and Database…
Mithil Shukla
  • 113
  • 3
  • 8
1
vote
1 answer

Two Phase Commit and merging execution and prepare phase

As far as I understand before two phase commit is even run a round trip communication to send the transactions to each site is needed. Each site excecutes their part of the transaction and when the coordinator gets a response from all sites then it…
user782220
  • 10,677
  • 21
  • 72
  • 135
1
vote
1 answer

XA Two Phase Commit and execution in Prepare Phase?

I am trying to understand two-phase-commit and it is not clear to me when each local site executes its portion of the distributed transaction. Does that happen before the prepare messages are sent. That is does it happen before the two-phase-commit…
user782220
  • 10,677
  • 21
  • 72
  • 135
1
vote
1 answer

Last Resource Optimization

I'm writing a Resource Adaptor which does not support two phase commit. I know there is an optimization technique called: "Last Resource Optimization". On JBoss your XAResource class should implement LastResource in order to have the…
Shimi Bandiel
  • 5,773
  • 3
  • 40
  • 49
0
votes
0 answers

XAException : 2-Phase commit Rollback failing due to XA Exception

Ok a seemingly simple implementaton of 2-Phase commit is running into issues. My setup is 2 databases on a DB2 server,an application hosted on Websphere 6.1. Transaction Management handled by Atomikos. Database connection through jndi. I begin the…
Andy
  • 1,080
  • 5
  • 20
  • 35
0
votes
2 answers

Spring JMS 2-phase-commit in java SE

I am not running under Java EE. I want to have an XA transaction using Spring to share a transaction between DB and JMS. Does spring provide such a functionality or must I use an external transaction manager such as Atomikos? I use currently the…
YaOg
  • 1,748
  • 5
  • 24
  • 43
0
votes
0 answers

Does 1 phase commit make sense in distributed systems?

I'm trying to understand what is the difference between 1 and 2-phase commit and why 1phase commited does not make sense distributed systems. From my understanding here they are: In 1 phase commit the coordinator commits the transaction on all…
St.Antario
  • 26,175
  • 41
  • 130
  • 318
0
votes
0 answers

2pc - XA/Distributed Transaction Coordinator Implementation

I have watch several of article about XA/Distributed Transaction Coordinator, many of them just mentioned that a DBMS must explicitly support XA in order to run. They also talk about how a Distributed Transaction Coordinator works. However, after…
0
votes
1 answer

Updating multiple databases in "distributed transaction"

I have 2 databases. One is a SQL Server and other is MongoDB. Both these DBs are hosted on AWS. I need to make a .NET background service that runs periodically (maybe once a month) and update a huge amount of data in both SQL Server as well as…
0
votes
1 answer

How to handle error and revert transaction state if one of the API call fails out of sequence of APIs to be called in transaction

I have following type of 3rd party APIs to be called in sequence in c# code. try { transaction: { call API 1; call API 2 call API 3 } } Catch { transaction rollback: rollback API 4; rollback API…
0
votes
1 answer

How to integrate operations of jpa repository methods i.e. save into xa resource transactions?

I want to make operations performed by crud repository of jpa as part of xa transactions i.e. they should be committed when xa resource is committed. Following is the code in which save method uses xa resource and saveTeam method uses crud…
0
votes
1 answer

Distributed transaction with 2 phase commit - atomicity issue due to commit phase not being synchronous

I have a WCF service which includes an operation marked with OperationBehavior(TransactionScopeRequired=true) and TransactionFlow(TransactionFlowOption.Allowed). The client of this service is also part of the transaction (it has a database as well.…
Metheny
  • 1,112
  • 1
  • 11
  • 23
0
votes
0 answers

.NET transactions, Mongo DB, 2 phase commit vs. single phase commit

We are integrating Mongo DB as the database in our .NET based system. Since data consistency is required in our system, we need to support transactions. Mongo DB v4.0 supports transactions, but in order to integrate it with the .NET…
Metheny
  • 1,112
  • 1
  • 11
  • 23
0
votes
0 answers

ORA-24756: transaction does not exist

Am doing a distributed update and I get this ORA-24756 error: DISTRIB TRAN bea1.67AA54355C4A74ECDEE0 is local tran 6.42.332492 (hex=06.2a.512cc) insert pending prepared tran, scn=8151148567799 (hex=769.d6509cf7) Wed Jan 30 16:45:02 EAT 2015 Errors…
0
votes
0 answers

2PC or event publisher (Spring Batch) or Oracle Database Link

I have a situation wherein as part of a online transaction, I have to save some data into other database, a slight latency (few seconds) in updating the other database is fine. Now since both databases are Oracle, I have below 3 options, I need some…
bjethwan
  • 97
  • 1
  • 3