0

I develop an application that use jta transaction (JAVA TRANSACTION API) and which is using multiple resources (databases). So i've set xa-datasources in my wildfly environnement.

The problem is that i need a clustered database (f.e :Mariadb + galera, mysql+ mysqlcluster).

Have you a database cluster environnement to recommend and that works with xa-transaction ?

Jimmy Pannier
  • 261
  • 1
  • 2
  • 16
  • could you please begin with rewriting the question to be more understandable. What's wrong with mysql xa support? – eis Oct 26 '15 at 16:28
  • because xa-transactions work only with INNODB storage engine, but mysqlcluster use NDBCluster engine. – Jimmy Pannier Oct 26 '15 at 16:38
  • It seems there is no existing solution for such environnement. I merge the datasources in one datasource. so no xa-transaction anymore. – Jimmy Pannier Oct 27 '15 at 11:03
  • you mean to say there is no db clustering that would support XA transactions? – eis Oct 27 '15 at 11:47
  • 1
    after googling, no i don't find any db clustering solution that support xa transaction and that use an free/community database (mysql or mariadb). – Jimmy Pannier Oct 27 '15 at 12:59

1 Answers1

0

(In my opinion...) Clustering (either Galera or NDB) and XA step on each other because...

Clustering is a form of XA in itself -- It has to coordinate an action among multiple machines, and it does so with some mini-XA code. This leaves no room for your XA to also get in there a do a similar thing at a higher level.

Why the heck do you want XA on top of Clustering?

Rick James
  • 135,179
  • 13
  • 127
  • 222
  • there are cases when XA is needed on top of clustering. Here there is one example that we faced in our project when we decided to go with Galera cluster. We use [Apache Lucene](http://lucene.apache.org/core/) for some document indexing. That needs XA in order to keep the Lucene and the database in synch. The Lucene indexes are stored on some files on disk. Any changes on such a document should either be commited both on the database and Lucene files or rolled back on both. That requires XA. – Ciprian Stoica Nov 21 '15 at 11:41
  • @CiprianStoica - if such rollbacks are rare, I would consider _not_ doing the rollback, but instead marking the document as 'deleted'. Then, you could probably orchestrate the indexing, etc, in an order than does not need XA. – Rick James Nov 26 '15 at 02:40