distributed-transactions

Distributed Transaction Coordinator - The underlying provider failed on Open

故事扮演 提交于 2019-12-24 13:35:10
问题 I have application A and application B, both on the same server. Application A is calling WCF service, located in application B using netmsmqbinding and a private queue. B's service method, which is called, is using entity framework to make a call to the database. However, this exception is thrown in B: System.Data.Entity.Core.EntityException: The underlying provider failed on Open. ---> System.Transactions.TransactionManagerCommunicationException: Communication with the underlying

TransactionScope and SQL Server Compact

北慕城南 提交于 2019-12-24 10:06:25
问题 SQL Server Compact doesn't support distributed transactions. So if there are more than one connection inside TransactionScope - the exception is thrown. Is there any way to setup ADO.NET provider to use one connection for the same connection string? I understand I can use usual transactions through connection.BeginTransaction but TransactionScope is preferable for me. UPDATE . Sorry, I didn't mention I work with Entity Framework, so I have no control on SQL Command. I may just pass connection

How to manage transactions over multiple databases

僤鯓⒐⒋嵵緔 提交于 2019-12-24 05:45:09
问题 I have a web application which receives requests to save orders in a database. I want to write to 2 different databases - one Cassandra instance and one PostgreSQL instance. I am using plain Java and JDBC (with apache DBUtis) with a lightweight web application library at the front. What I am unsure about is how to implement transactionality across the two databases, i.e. if a write to one of the databases fails, then rollback the other write and put an error message in the error log. Are

Does ObjectContext.Connection.BeginTransaction() use MSDTC?

十年热恋 提交于 2019-12-24 00:19:07
问题 I want confirm if the Transaction that Entity Framework's ObjectContext.Connection.BeginTransaction() method returns uses the support of MSDTC (Microsoft Distributed Transaction Coordinator) or not? Is there any way to use transactions without support of MSDTC? 回答1: It will automatically promote to a transaction coordinated by MSDTC under certain conditions. Each time you call ObjectContext.SaveChanges() a new transaction is created if there isn't already one in scope (if there is already an

Connection using enlist=false does not close after being manually enlisted in distributed transaction

耗尽温柔 提交于 2019-12-23 15:11:58
问题 I have a distributed transaction context using ServiceDomain . Inside it, I open an SQL connection with connection string specifying Enlist=false , so that it is not automatically enlisted in the transaction. Then, if I manually enlist the connection in the distributed transaction using EnlistDistributedTransaction , the connection does not get closed, which can end in an InvalidOperationException with: Timeout expired. The timeout period elapsed prior to obtaining a connection from the pool.

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

十年热恋 提交于 2019-12-23 08:47:29
问题 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 has been a crash, and we want to completely restart the same transaction. Does the recovery work within the same distributed transaction? My application is tolerant to failures in terms that a failure can always just be restarted from the start with

Can I use NHibernate's AdoNetTransactionFactory with distributed transactions?

瘦欲@ 提交于 2019-12-23 08:06:08
问题 I am dealing with a strange issue related to NHibernate and distributed transactions in a WCF service. See Deadlocks causing 'Server failed to resume the transaction' with NHibernate and distributed transactions for more details. One thing that seems to solve my problem is using NHibernate's AdoNetTransactionFactory, instead of AdoNetWithDistributedTransactionsFactory. I believe that the AdoNetWithDistributedTransactionsFactory is involved with making NHibernate's second-level caching

Postgresql: PREPARE TRANSACTION

时间秒杀一切 提交于 2019-12-22 19:14:41
问题 I've two DB servers db1 and db2. db1 has a table called tbl_album db2 has a table called tbl_user_album CREATE TABLE tbl_album ( id PRIMARY KEY, name varchar(128) ... ); CREATE TABLE tbl_user_album ( id PRIMARY KEY, album_id bigint ... ); Now if a user wants to create an album what my php code needs to do is: Create a record in db1 and save its id(primary key) Create a record in db2 using it saved in first statement Is it possible to keep these two statements in a transaction? I'm ok with a

Postgresql: PREPARE TRANSACTION

情到浓时终转凉″ 提交于 2019-12-22 19:14:12
问题 I've two DB servers db1 and db2. db1 has a table called tbl_album db2 has a table called tbl_user_album CREATE TABLE tbl_album ( id PRIMARY KEY, name varchar(128) ... ); CREATE TABLE tbl_user_album ( id PRIMARY KEY, album_id bigint ... ); Now if a user wants to create an album what my php code needs to do is: Create a record in db1 and save its id(primary key) Create a record in db2 using it saved in first statement Is it possible to keep these two statements in a transaction? I'm ok with a

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

 ̄綄美尐妖づ 提交于 2019-12-21 12:45:30
问题 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 observed, that sometimes CT is not (yet?) able to see DB changes of PT , event if corresponding JMS message is already received ( PT is committed?). It seems that JTA can't guarantee consistency of such kind (this was also confirmed in Jurgen Holler's