xa

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

Delaying sending of mail until transaction commits

耗尽温柔 提交于 2019-12-20 03:23:28
问题 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. 回答1: 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. 回答2: You can use a

How to Enable XA Oracle 11g

て烟熏妆下的殇ゞ 提交于 2019-12-12 19:17:23
问题 We recently moved to Oracle 11g from MSSQL and am completely new to this. Can someone tell me how to enable XA transactions on Oracle? From what I gathered, I think I need to run initjvm.sql and initxa.sql but I am not entirely sure. Is there someway of doing this through the Enterprise manager? Also, what is the XA driver class called? Is that oracle.jdbc.xa.client.OracleXADatasource? 回答1: Read this official Oracle Article: https://community.oracle.com/thread/920935 And this: http://www

Creating XA Datasource in JBoss 7.1.1 for MySQL Cluster : Connection Read Only Error

我的梦境 提交于 2019-12-11 19:38:56
问题 We are configuring the XA datasource in the JBoss 7.1.1 application server for the backend clustered MySQL server (Master-Master configuration). Below are the datasource configuration: <xa-datasource jndi-name="java:/datasoucrenew" pool-name="datasoucrenew" enabled="true" use-ccm="false"> <xa-datasource-property name="URL"> jdbc:mysql://10.2.0.35:3306,10.2.0.36:3306/test_prod?autoReconnect=true </xa-datasource-property> <xa-datasource-property name="password"> password </xa-datasource

Automatically register XA Resource Spring Boot

匆匆过客 提交于 2019-12-11 13:34:57
问题 I'm trying to implement XA transactions in my Spring Boot app across Hazelcast and JPA persisting to PostgreSQL. Putting the Atomikos Spring Boot starter in my pom.xml got it to load the JtaTransactionManager to be used with the @Transactional annotations, but the Hazelcast XA Resource is not being enlisted with the transaction. How do I get Spring Boot to automatically enlist my XA Resources with the JTA UserTransaction as part of the AOP transaction interceptor that's using the

JTA Datasources without transactions

柔情痞子 提交于 2019-12-10 19:32:26
问题 (Assuming manual enlistment and delistment of resources.) I have a number of XA enabled resources/datasource for which I plan to perform transactional updates. Additionally, some of the XA-enabled datasources can be updated in isolation (without requiring any other resource). Assuming I have already committed a number of transactions with a datasource enlisted, can I then ignore the TransactionManager for unilateral updates to the datasource. Do I simply not start a global transaction and

Performance Overhead of XA Data Sources - Best Practices

妖精的绣舞 提交于 2019-12-10 15:47:18
问题 I am trying to understand the Impact of XA Datasources on Performance. In many applications, it happens that not all the transactions need to participate in Distributed Transactions (meaning only a few transactions require to be distributed/participating with other resources). Is the trade-off of the performance high enough to have two data sources configured (one each for XA and non-XA)? Again, the answer is, it depends on the scenario, but I am looking for "Best Practices". 回答1: It is worth

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

旧城冷巷雨未停 提交于 2019-12-08 07:02:32
问题 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. 回答1: Yes, you can achive this. You talk about

resume for XID raised 0: unknown

淺唱寂寞╮ 提交于 2019-12-08 04:57:45
问题 I am using Spring 3.0.5, Hibernate 3.6.7, Atomikos TransactionEssentials 3.7.0 and MySQL 5.5 I recently faced the problem, that connections in my connectionpool timedout after 8 hours and were reset by the server causing a message "resume for XID '???' raised 0: unknown Here is my datasource configuration: <bean id="myDataSource" class="com.atomikos.jdbc.AtomikosDataSourceBean" init-method="init" destroy-method="close" depends-on="myConfigurer"> <property name="uniqueResourceName" value=

Wildfly 10 failing to load MySQL XA driver on startup

时光怂恿深爱的人放手 提交于 2019-12-07 08:12:18
问题 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