Hazelcast (https://hazelcast.com) is a popular in-memory grid / distributed cache. It supports XA and as of ExtremeTransactions 5.0 (or higher) you can do easy JTA/XA by letting our Hazelcast adapter do the heavy lifting for you.

Configuring Hazelcast to work with Atomikos

import com.atomikos.hazelcast.AtomikosHazelcastInstanceFactory;
import com.atomikos.icatch.jta.UserTransactionManager;
HazelcastInstance hazelcastInstance = ... //your regular Hazelcast configuration setup
HazelcastInstance atomikosHazelcastInstance = AtomikosHazelcastInstanceFactory.createAtomikosInstance("my hazelcast instance name", hazelcastInstance);

You can then use transactional objects with XA:

UserTransactionManager utm = new UserTransactionManager();
TransactionContext ctx = atomikosHazelcastInstance.newTransactionContext(); //this will not start a new context but rather enlist in the JTA/XA transaction
final TransactionalMap<Object, Object> map = ctx.getMap("map");
map.put("key", "value");

Using Spring's @Transactional annotation

Instead of calling begin() and commit() on the UserTransactionManager, you can also use Spring's @Transactional annotation. That also works.


  • Hazelcast's recovery is not (yet) quorum-enabled. This means that for safe recovery, we recommend that your JTA/XA updates are done on a quorum with the size of your hazelcast cluster. That way, recovery will work on one single node (i.e., recovery operations themselves don't need to gather a quorum).

For Customers Only - Want to Try?

Free Trial

Contact Us

Atomikos Corporate Headquarters
Hoveniersstraat, 39/1, 2800
Mechelen, Belgium

E info@atomikos.com
E sales@atomikos.com
T +3215613055

Subscribe to our newsletter

Never miss an update

Copyright 2020 Atomikos BVBA | Our Privacy Policy
By using this site you agree to our cookies. More info. That's Fine