distributed-transactions

Issue with configuring Atomikos on a Spring Boot / Spring Batch application

*爱你&永不变心* 提交于 2019-12-01 20:58:21
I am trying to get Atomikos to work with my Spring Boot/Spring Batch application. Here is are the relevant portions of my code: Datasource config: @Configuration public class DatasourceConfiguration extends AbstractCloudConfig { @Bean @Qualifier("batch_database") public DataSource batchDatasource() { return connectionFactory().dataSource("batch_database"); } @Bean public PlatformTransactionManager transactionManager(){ return new JtaTransactionManager(); } @Bean public TaskConfigurer configurer(){ return new DefaultTaskConfigurer(batchDatasource()); } } Atomikos auto-config dependency: compile

NHibernate 3.0: TransactionScope and Auto-Flushing

╄→гoц情女王★ 提交于 2019-11-30 15:34:24
问题 In NHibernate 3.0, FlushMode.Auto does not work when running under an ambient transaction only (that is, without starting an NHibernate transaction). Should it? using (TransactionScope scope = new TransactionScope()) { ISession session = sessionFactory.OpenSession(); MappedEntity entity = new MappedEntity() { Name = "Entity", Value = 20 }; session.Save(entity); entity.Value = 30; session.SaveOrUpdate(entity); // This returns one entity, when it should return none var list = session.

How ACID is the two-phase commit protocol?

血红的双手。 提交于 2019-11-30 08:38:44
I came across a situation where I started doubting whether the two-phase commit protocol really guarantees the ACID properties, especially the 'A' part of it. Let's look at a theoretical distributed transaction involving 2 resources. (More practical description of the problem I had to deal with you can find in my blog ). The scenario is a normal execution of a distributed transaction (no failures or recovery). An application starts a transaction, updates both resources and issues a commit() call. After commit is completed the application checks both resources and sees all the changes from the

What is a “distributed transaction”?

别来无恙 提交于 2019-11-30 03:00:30
The Wikipedia article for Distributed transaction isn't very helpful. Can you give a high-level description of what a distributed transaction is? Also, can you give an example of why an application or database should perform a transaction that updates data on two or more networked computers? I understood the classic bank example; I care more about distributed transactions in Web-scale databases like Dynamo, Bigtable, HBase, or Cassandra. Usually, transactions occur on one database server: BEGIN TRANSACTION SELECT something FROM myTable UPDATE something IN myTable COMMIT A distributed

How ACID is the two-phase commit protocol?

生来就可爱ヽ(ⅴ<●) 提交于 2019-11-29 12:01:09
问题 I came across a situation where I started doubting whether the two-phase commit protocol really guarantees the ACID properties, especially the 'A' part of it. Let's look at a theoretical distributed transaction involving 2 resources. (More practical description of the problem I had to deal with you can find in my blog). The scenario is a normal execution of a distributed transaction (no failures or recovery). An application starts a transaction, updates both resources and issues a commit()

Distributed Transaction on Linked Server between sql server and mysql

…衆ロ難τιáo~ 提交于 2019-11-29 10:35:23
I have a table say Table1 on SQL Server 2014 and MySQL both. Table1 ID INT,Code VARCHAR(100) I created a linked server MyLinkedServer in SQL Server using "Microsoft OLEDB Provider for ODBC". **Linked Server ** EXEC master.dbo.sp_addlinkedserver @server = N'MyLinkedServer', @srvproduct=N'MyLinkedServer', @provider=N'MSDASQL', @datasrc=N'MyLinkedServer' EXEC master.dbo.sp_addlinkedsrvlogin @rmtsrvname=N'MyLinkedServer',@useself=N'False',@locallogin=NULL,@rmtuser=N'username',@rmtpassword='########' Linked Server Settings EXEC master.dbo.sp_serveroption @server=N'MyLinkedServer', @optname=N'data

Distributed transactions between MySQL and MSSQL

回眸只為那壹抹淺笑 提交于 2019-11-29 04:46:45
I've tried for nearly a week now to get distributed transactions working. I've some procedures on MSSQL which try to select data from MySQL. My need is to do this in one(!) transaction. At the time I've set up ODBC connection on MSSQL with Single-Tier MySQL driver from OpenLink, which states me, that XA transactions work successfully (there is a test button integrated after configuring ODBC connection). Then I've set up a linked server in MSSQL via MSDASQL to this ODBC connection, but when doing begin distributed transaction select * from optin..lu_source_proc select * from openquery(optinxa,

What is a “distributed transaction”?

妖精的绣舞 提交于 2019-11-28 22:23:14
问题 The Wikipedia article for Distributed transaction isn't very helpful. Can you give a high-level description of what a distributed transaction is? Also, can you give an example of why an application or database should perform a transaction that updates data on two or more networked computers? I understood the classic bank example; I care more about distributed transactions in Web-scale databases like Dynamo, Bigtable, HBase, or Cassandra. 回答1: Usually, transactions occur on one database server

How to design global distributed transaction(none database)? Can JTA use for none db transaction?

怎甘沉沦 提交于 2019-11-28 18:23:47
I think this is a fairly common question: how to put my business logic in a global transaction in distributed systems environment? Cite an example, I have a TaskA containing couples of sub tasks: TaskA {subtask1, subtask2, subtask3 ... } each of these subtasks may execute on local machine or a remote one, I hope TaskA executes in an atomic manner(success or fail) by means of transaction. Every subtask has a rollback function, once TaskA thinks the operation fails(because one of subtask fails), it calls each rollback function of subtasks. Otherwise TaskA commits the whole transaction. To do

Kafka - How to commit offset after every message using High-Level consumer?

女生的网名这么多〃 提交于 2019-11-28 17:16:27
I'm using Kafka's high-level consumer. Because I'm using Kafka as a 'queue of transactions' for my application, I need to make absolutely sure I don't miss or re-read any messages. I have 2 questions regarding this: How do I commit the offset to zookeeper? I will turn off auto-commit and commit offset after every message successfully consumed. I can't seem to find actual code examples of how to do this using high-level consumer. Can anyone help me with this? On the other hand, I've heard committing to zookeeper might be slow, so another way may be to locally keep track of the offsets? Is this