atomikos

Atomikos vs. Bitronix vs. JBossTS - MVCC and Nested Transactions

a 夏天 提交于 2020-01-14 04:45:14
问题 I want to implement one of the former Transaction Manager. However, since I am still in the concept phase I would like to try all of these Transaction Manager. My criterias for the final choice are the ease of use, use of Tomcat , the adaptility and most of all the support of nested transactions AND MVCC. I was not able to find any Information about the possible support of the latter criteria for Bitronix and Atomikos. I know that JBossTS supports MVCC and NT - but I'm not sure if JBoss would

Atomikos 事务超时时间设置

折月煮酒 提交于 2020-01-10 01:14:41
Atomikos 是一个分布式事务管理框架 项目中有定时任务耗时比较长同时需要事务管理。运行过程中总是报事务超时回滚。以下设置可以增加超时时间 spring: jta: atomikos: properties: default-jta-timeout: 60000 max-timeout: 3000000 default-jta-timeout 超过 max-timeout后会使用 max-timeout 作为最大超时时间。所以设置的时候要把 max-timeout也调大一些不然还会超时。 但是配置之后所有事物的超时时间都会很长。有点得不偿失。所以想针对单个方法设置下超时时间。 TransactionManagerImp中有个threadlocal变量 timeoutInSecondsForNewTransactions存储了当前线程的超时时间可以通过setTransactionTimeout 方法重新设置该变量值。 TransactionManager transactionManager = TransactionManagerImp.getTransactionManager(); transactionManager.setTransactionTimeout(60*60*1000); 但是这个必须在事务开启前才会起作用。由于一般是采用的注解事务

spring boot atomikos multiple datasource connection pool exhausted plain jdbc

此生再无相见时 提交于 2020-01-03 01:23:48
问题 I have a Spring Boot application that uses Atomikos for JTA Managed Transactions. It uses multiple DataSources to connect multiple Databases. The first request returns the expected Result but the second request failes with a 'Pool exhausted' Exception. I tried it with plain JDBC and JdbcTemplate with no result. It is the same. Here is my code with Spring Boot Version 1.5.8.RELEASE @SpringBootApplication @EnableAutoConfiguration(exclude = { DataSourceAutoConfiguration.class,

XA Transactions between 2 JMS Brokers (ActiveMQ)

随声附和 提交于 2019-12-25 05:10:04
问题 I am trying to move jms messages between 2 different, remote, activeMQ brokers and after a lot of reading I am using Atomikos, as I am writing a standalone application, and I am also using spring to get the whole thing working. I have the following bean javaconfig setup @Bean(name="atomikosSrcConnectionFactory") public AtomikosConnectionFactoryBean consumerXAConnectionFactory() { AtomikosConnectionFactoryBean consumerBean = new AtomikosConnectionFactoryBean(); consumerBean

MySQL and Infinispan - JTA implementation

ぃ、小莉子 提交于 2019-12-24 15:33:00
问题 We have an web application under Tomcat, integrated with Hibernate 4X, Spring 4X and HibernateTransactionManager as our transaction manager (currently one MySQL resource). As part of our configuration distribution, we should integrate with Infinispan as our cache manager to store configuration with other format than in the MySQL . Meaning, not as Hibernate second level cache integration! I managed to integrate Infinispan with Spring but now I'm facing a big problem due to the fact the MySql

ActiveMQ JMS XA Atomikos - Transaction not started error

廉价感情. 提交于 2019-12-24 02:12:40
问题 The situation is we want to use XA transactions to coordinate activity between ActiveMQ and Hibernate (Sql Server 2008). We are using: Spring 3.0.5 Hibernate 3.6.2 ActiveMQ 5.5.0 Atomikos 3.7 We are seeing the following errors getting generated in the log file related to the transaction has not been started. These are always related to JMS. Transaction '[ID]' has not been started. These are getting generated into the logs all the time. The issue is more complicated in that we have 3 web

Atomikos: data not getting saved when using PostgreSQL

寵の児 提交于 2019-12-23 12:04:14
问题 I have encountered a strange issue while using Atomikos. I have a small test application (Spring + Hibernate). It uses two different data sources which I need to test JTA functionality on a non Java EE container (Tomcat in my case). When I use MySQL as a database everything gets saved without a problem. But when I switch to PostgreSQL data are not getting saved to the database. What is interesting that IF I'm not using @Transactional and manually begin and commit transactions - everything

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

Two-phase commit (2PC) configuration with Atomikos

两盒软妹~` 提交于 2019-12-22 10:28:35
问题 I am creating a sample application to test two-phase commit (2PC). I have taken the code bits used here from the Internet. I am using Spring, Hibernate and Atomikos with MySQL as the backend. I am using two databases and deliberately making the call to the second database fail to check whether the first database call gets rolled back. Sadly it doesn't seem to work. Can some one point me to some links with some sample code? Following is my configuration: The Hibernate session factories: <bean

when to use global transaction Or use spring aop for transaction

最后都变了- 提交于 2019-12-21 05:40:09
问题 Q1. i do understand when we need to deal with multiple databases, we need to use global transaction. but from this post http://fogbugz.atomikos.com/default.asp . the person suggested just use spring aop to advise on the different transactionmanager ( more > datasource/sessionfactory). can anyone explain in what kind of situation we can just use this approach And In what kind of situation do we need XA (global transaction) with atomikos or jotm or ejb..etc 回答1: If you are referring to this