xa

Is it possible to set up parallel transactions in JTA (Atomikos)

空扰寡人 提交于 2019-12-06 15:44:25
I have two transactional resources, database and message queue. So I use Atomikos as the XA transaction manager. Inside a transaction (tx1), is it possible to open another separated transaction (tx2) in parallel? In tx2, it will commit some data into db, even the tx1 might be failed and roll backed eventually. And tx2 must be done inside tx1, as if error occurred in tx2 should roll back the tx1 also. Anyone knows how I can achieve this? Thank you. Yes, you can achive this. You talk about so named "nested" transaction First of all for Atomikis you must specify property com.atomikos.icatch

JBoss spamming XA Recovery warnings

陌路散爱 提交于 2019-12-06 04:53:21
问题 I'm running a JPA/Spring application that connects to multiple XA enabled datasources on Microsoft SQL Server. Everything works just fine, with global transactions correctly starting and rolling back as needed... But, every now and then JBoss goes wild and starts spamming the following warning every few seconds: 10:25:22,524 WARN [com.arjuna.ats.jta] (Periodic Recovery) ARJUNA016027: Local XARecoveryModule.xaRecovery got XA exception XAException.XAER_RMERR: javax.transaction.xa.XAException:

Wildfly 10 failing to load MySQL XA driver on startup

血红的双手。 提交于 2019-12-05 10:27:59
I have a web application I am deploying in wildfly-10.0.0. It requires a mysql xa driver. I have the following error: 2015-10-13 12:25:37,979 ERROR [org.jboss.as.controller.management-operation] (ServerService Thread Pool -- 33) WFLYCTL0013: Operation ("add") failed - address: ([ ("subsystem" => "datasources"), ("jdbc-driver" => "com.mysql") ]) - failure description: "WFLYJCA0041: Failed to load module for driver [com.mysql]" The modules directory is as follows: Directory of C:\Users\rball\Documents\Dev\WildFly\wildfly-10.0.0.CR1\modules\sy stem\layers\base\com\mysql\main 10/13/2015 11:32 AM

Distributed Transaction between multiple Apps in Spring

送分小仙女□ 提交于 2019-12-04 13:55:16
问题 I currently have a set of ERP style web applications build on top spring 3. The application is deployed into tomcat 7. The system developed some time ago without a cleanly defined architecture. Each Application has 3 parts (as sub projects). API: Defining Models and Interfaces, IMPL: The Service Layer, and the WEB. Current layout of system is as below. Financial API+IMPL is included to Inventory module for achieving transaction management. We previously tried to separate inventory and

Are XA/JTA transactions still used?

邮差的信 提交于 2019-12-04 13:36:24
问题 I have an application that interacts multiple databases and some custom services. For some operations, I need transaction-like behavior where a set of changes either commit across all databases/services or all roll back if an error occurs. The XA standard from the X/Open group and the Java JTA seem to solve exactly this problem using a two-phase commit process. Some databases (mySQL, Postgres, Oracle) support these interfaces, but I get the feeling that they are not often used or declining in

JBoss spamming XA Recovery warnings

一笑奈何 提交于 2019-12-04 09:04:15
I'm running a JPA/Spring application that connects to multiple XA enabled datasources on Microsoft SQL Server. Everything works just fine, with global transactions correctly starting and rolling back as needed... But, every now and then JBoss goes wild and starts spamming the following warning every few seconds: 10:25:22,524 WARN [com.arjuna.ats.jta] (Periodic Recovery) ARJUNA016027: Local XARecoveryModule.xaRecovery got XA exception XAException.XAER_RMERR: javax.transaction.xa.XAException: The function RECOVER: failed. The status is: -3. Error: "*** SQLJDBC_XA DTC_ERROR Context: xa_recover,

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

亡梦爱人 提交于 2019-12-04 06:54:50
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 presentation "Transaction Choices for Performance" ). What is the best way to avoid such problem (except

Distributed Transaction between multiple Apps in Spring

蓝咒 提交于 2019-12-03 08:53:17
I currently have a set of ERP style web applications build on top spring 3. The application is deployed into tomcat 7. The system developed some time ago without a cleanly defined architecture. Each Application has 3 parts (as sub projects). API: Defining Models and Interfaces, IMPL: The Service Layer, and the WEB. Current layout of system is as below. Financial API+IMPL is included to Inventory module for achieving transaction management. We previously tried to separate inventory and financial into different Web apps by using REST calls but faced issue with transaction management. What we are

Delaying sending of mail until transaction commits

半腔热情 提交于 2019-12-02 01:58:00
Does anyone have a good tutorial or some advice on how to implement one's own XAResource? I need Spring's MailSender to be transactional, so that the mail will only be sent once the transaction commits, and it seems there isn't any existing transactional wrapper. If you just need to wait for the commit, as you say in a comment, you can investigate using TransactionSynchronizationManager.registerSynchronization() to trigger email sending on commit. Dan P You can use a TransactionSynchronizationManager.registerSynchronization (like gpeche mentioned) with a TransactionSynchronizationAdapter which

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