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.


For the time being this only works with file-based recovery. In particular, the LogCloud is not yet supported for this backend.

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 2019 Atomikos BVBA
This website is using cookies. More info. That's Fine