You are here: Blog » Tech tips » Exploring Apache Ignite
Look­ing to use Apache Ig­nite and its JTA/XA sup­port with Atomikos?

We nev­er heard of it be­fore, but were asked about Apache Ig­nite and its com­pat­i­bil­i­ty with Atomikos (and JTA/XA in gen­er­al). We start­ed look­ing at it and thought we would share our thoughts and find­ings in this post. I would like to stress that this is not a real "re­view" post since we don't know the project enough (yet). Rather, we are ex­plor­ing what can be found on the project's web­site. If you have any ad­di­tion­al com­ments or feed­back, feel free to share at the bot­tom of this post. We'd love to get the com­plete pic­ture and maybe you can help slightly smiling face

First Con­tact: GitHub

Our first con­tact with Ig­nite was an ex­am­ple project on GitHub. It sug­gests a con­fig­u­ra­tion of Ig­nite with Trans­ac­tion­sEssen­tials. We'll come back to that fur­ther on in this post.

Apache Ig­nite at Apache

Google sends us to this project home­page. The page looks good, quite frankly.

ACID Trans­ac­tions and JTA/XA

The home­page fea­tures ACID Trans­ac­tions - click­ing on this brings us to this doc­u­men­ta­tion page. At the bot­tom of that page we find a sec­tion on JTA/XA in­te­gra­tion. It sug­gests that the fol­low­ing use case is sup­port­ed:
IgniteCache<String, Integer> cache = cache();
UserTransactionManager utm = new UserTransactionManager();
utm.begin();
cache.put("key", "value");
utm.commit();

In oth­er words, this is sim­i­lar to our Hazel­cast in­te­gra­tion. So far, so good!

In­stead of call­ing be­gin() and com­mit() on the UserTrans­ac­tionMan­ag­er, you can also use Spring's @Trans­ac­tion­al an­no­ta­tion. That should also work (be­cause Spring re­al­ly del­e­gates to the UserTrans­ac­tionMan­ag­er).

More Trans­ac­tion Fea­tures

The project also has this fea­ture page - all about its trans­ac­tion sup­port.

Of all the things there, what catch­es my eye is the sec­tion on two-phase-com­mit. Go­ing to that page, it says some­where:

Ig­nite uti­lizes a Two-Phase-Com­mit (2PC) pro­to­col for its trans­ac­tions and op­ti­mizes to one-phase-com­mit when­ev­er pos­si­ble. When­ev­er data is up­dat­ed with­in a trans­ac­tion, Ig­nite will keep a trans­ac­tion­al state in a lo­cal trans­ac­tion map un­til com­mit() is called, at which point, if need­ed, the data is trans­ferred to par­tic­i­pat­ing re­mote nodes.

So it seems like what­ev­er you put in the cache is kept lo­cal­ly un­til the com­mit phase. That makes me won­der: what hap­pens if two con­cur­rent trans­ac­tion put a val­ue for the same key? Prob­a­bly one of them will fail dur­ing the pre­pare phase of the two-phase com­mit (we did not test it).

Try­ing the Ex­am­ple on GitHub

What hap­pens if we run the ex­am­ple on GitHub - men­tioned in the be­gin­ning of this post? We tried, and here is the re­sult:

[INFO] 3 errors 
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1:07.892s
[INFO] Finished at: Wed Jul 31 09:34:16 CEST 2019
[INFO] Final Memory: 25M/135M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.5.1:compile (default-compile) on project ignite-examples: Compilation failure: Compilation failure:
[ERROR] /Users/guy/Downloads/ignite-examples-master/src/main/java/com/wangguofeng1923/ignite/examples/Demo.java:[15,46] package com.wangguofeng1923.examples.bytebuddy does not exist
[ERROR] /Users/guy/Downloads/ignite-examples-master/src/main/java/com/wangguofeng1923/ignite/examples/Demo.java:[16,46] package com.wangguofeng1923.examples.bytebuddy does not exist
[ERROR] /Users/guy/Downloads/ignite-examples-master/src/main/java/com/wangguofeng1923/ignite/examples/Demo.java:[17,46] package com.wangguofeng1923.examples.bytebuddy does not exist
[ERROR] -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException

In oth­er words, it seems some code is miss­ing?

Con­clu­sion

Without a full re­view it is hard to come to a real con­clu­sion, but this ex­plo­ration of Ig­nite seems promis­ing: it claims to sup­port JTA/XA out-of-the-box. How­ev­er, fur­ther test­ing is need­ed to come to a de­fin­i­tive con­clu­sion - at least con­cern­ing full com­pat­i­bil­i­ty with Atomikos.
RSS

Com­ments

Add a com­ment

Cor­po­rate In­for­ma­tion

Atomikos Cor­po­rate Head­quar­ters
Hove­niersstraat, 39/1, 2800
Meche­len, Bel­gium

Con­tact Us

Copy­right 2026 Atomikos BVBA | Our Pri­va­cy Pol­i­cy
By us­ing this site you agree to our cook­ies. More info. That's Fine