Atomikos TransactionsEssentials: JTA/XA transaction management outside of Java EE

| by Ryan Slobojan Follow 0 Followers on Nov 15, 2007. Estimated reading time: 1 minute |

Atomikos TransactionsEssentials, a Java-based transaction manager, just released version 3.2. InfoQ spoke with Atomikos CTO Guy Pardon to learn more about this release, and also about TransactionsEssentials and third-party transaction managers in general.

Pardon described the major features of TransactionsEssentials:

  • JTA/XA transaction management - Transaction management and connection pooling are provided
  • No application server required - TransactionsEssentials can be used inside of any Java EE application server, or independent of an application server
  • Open Source - TransactionsEssentials is open source under the Apache license, version 2
  • JDBC/JMS focus - Any XA resource is supported, and built-in resource pooling and message listening are provided for JDBC and JMS
  • Spring and Hibernate integration - Documentation is provided which describes how to integrate with both Spring and Hibernate

Pardon also mentioned that Atomikos ExtremeTransactions was based upon TransactionsEssentials, and builds upon it by adding support for non-XA, compensation-based transactions and providing graphical administrative control panels for use in servlet containers. Atomikos also offers subscription-based support services, and a subscription grants access to the extra features in ExtremeTransactions.

When asked why one would want an external transaction manager, Pardon replied:

Let me turn the question around: why would you want an appserver?

Basically, the appserver has one big major productivity problem (besides being an old dinosaur): you have to deploy a packaged archive. This means that whatever you test before deployment is not complete. This also means that during deployment the risk that something goes wrong is high. This is a huge productivity problem IMHO.

Pardon also went on to say that, in many cases, an application server may not be the best solution for an application - he gave SOA/ESB endpoints as an example, stating that asynchronous JMS message handling and processing via JDBC could be done in a much more lightweight and scalable manner.

When asked about future releases of TransactionsEssentials, Pardon described greater JDBC and JMS connection pooling, OSGi support and JMX transaction administration as major features planned for version 3.3. Pardon also stated that adding JMX for the JDBC data sources and JMS connectors was a goal for version 4.0.

Rate this Article

Adoption Stage

Hello stranger!

You need to Register an InfoQ account or or login to post comments. But there's so much more behind being registered.

Get the most out of the InfoQ experience.

Tell us what you think

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Configuring TransactionalEssentials with Spring/Hibernate by Matt Raible

Re: Configuring TransactionalEssentials with Spring/Hibernate by Guy Pardon

Great to use during testing also by Jorg Heymans

We use WeblogicJtaTransactionManager in our applications, but for out-of-container testing that involves JPA entities, XA datasource, JTA etc we rely on Atomikos. It requires no changes to the application other than injecting the Atomikos transaction manager and wrapped datasource. We had some problems during test execution (see [1]), but those were solved by putting <forkMode>pertest</forkMode> in the surefire configuration for maven2.


Atomikos rocks by Martin Vanek

Thanks to Atomikos we can run all functionality tests from main() with same result as in target appserver. So far (about 6 months) I didn't observed any differences and my development turnaround time has decreased greatly.

Full OSS Stack? by Daniel Gredler

Atomikos is pretty nice. Now all that's left is for the PostgreSQL and MySQL people to get on the ball and fully support XA resources. They both support "most" of XA, and when you read about the limitations they sound minor, but in my experience you somehow always end up running into them.

PostgreSQL Limitations

MySQL Limitations

g'night JOTM! by Dan Allen

I can say first hand that Atomikos is the way to go if you are looking for out-of-container XA-capable JTA transactions. I burned an entire weekend a while ago trying to get JOTM to do anything useful, but had absolutely no luck (but certainly less hair).

I then downloaded Atomikos and had it working in less than 30 minutes (I have no doubt others could do it faster). When I say working, I was able to get it to successfully rollback changes committed to one database after the commit to the second database failed, which is the fundamental value proposition of XA transactions.

Given that Atomikos is open source, what is not to like? I just hope I can save someone else the weekend. Kiss JOTM goodbye.

Re: g'night JOTM! by Dan Allen

I will say that the appserver bashing is not necessary. There are times when an appserver is appropriate, and there are times when it isn't. The statement that it is an old dinosaur is just as dated as the object of the comparison. Appservers, like JBoss 5 and Glassfish V2, are just as fast to start as "lightweight" containers.

I recommend Atomikos, but I won't discredit the tremendous capabilities of an appserver. You will know when it is the right time to use one over the other. Let your judgement guide you. Don't just boycott because someone told you to (e.g. the Monkeys, Bananas, and Water-spray Experiment).

Re: Configuring TransactionalEssentials with Spring/Hibernate by Guy Pardon

The above URL has been moved to:

3.3 released by now... by Guy Pardon


A quick follow-up: we (Atomikos) have just released version 3.3 hinted at in the above news post - with mostly the JDBC innovations (new pools and data sources, improved performance) and log4j support. The JMX and JMS features have been planned for the next major release: 3.4...


Re: g'night JOTM! by Mordechai Tamam

Maybe you can help me...
As you did, I downloaded Atomikos, but, I am getting a NullPointerException when I am trying to persist an entity (I'm using JPA over Hibernate)whose id is annotated with @GeneratedValue, The entity looks like this:
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;

@Table(name = "USERS")
public class User {

public int id;

@Column(name = "NAME")
public String name;

public User() {

The Spring application context XML:

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns=""
<context:annotation-config />

<bean id="userTransactionService" class="com.atomikos.icatch.config.UserTransactionServiceImp" init-method="init" destroy-method="shutdownForce">
<prop key="com.atomikos.icatch.service">com.atomikos.icatch.standalone.UserTransactionServiceFactory</prop>

<bean id="AtomikosTransactionManager" class="com.atomikos.icatch.jta.UserTransactionManager" init-method="init" destroy-method="close" depends-on="userTransactionService">
<!-- When close is called, should we force transactions to terminate or not? -->
<property name="forceShutdown" value="false" />
<!-- IMPORTANT: disable startup because the userTransactionService above does this -->
<property name="startupTransactionService" value="false"/>

<bean id="AtomikosUserTransaction" class="com.atomikos.icatch.jta.UserTransactionImp" depends-on="userTransactionService">
<property name="transactionTimeout" value="300" />

Configure the Spring framework to use JTA transactions from Atomikos
<bean id="jtaTransactionManager" class="org.springframework.transaction.jta.JtaTransactionManager" depends-on="userTransactionService">
<property name="transactionManager" ref="AtomikosTransactionManager" />
<property name="userTransaction" ref="AtomikosUserTransaction" />

<bean id="mydatasource" class="com.atomikos.jdbc.AtomikosDataSourceBean" init-method="init" destroy-method="close">
<property name="uniqueResourceName" value="XADBMS" />
<property name="xaDataSourceClassName" value="com.mysql.jdbc.jdbc2.optional.MysqlXADataSource" />
<property name="xaProperties">
<prop key="user">root</prop>
<prop key="password">1234</prop>
<prop key="URL">jdbc:mysql://localhost:3306/test_transactions2</prop>
<property name="minPoolSize" value="1" />
<property name="maxPoolSize" value="50" />

<bean id="sessionFactory" class="org.springframework.orm.hibernate3.LocalSessionFactoryBean" >
<property name="configLocation" value="classpath:hibernate.cfg.xml" />
<qualifier value="sessionFactory"/>
<property name="configurationClass" value="org.hibernate.cfg.AnnotationConfiguration" />
<property name="dataSource" ref="mydatasource" />
<property name="hibernateProperties">
<prop key="hibernate.show_sql" >true</prop>
<prop key="hibernate.formate_sql">true</prop>

<prop key="hibernate.connection.isolation">4</prop>
<prop key="hibernate.max_fetch_depth">3</prop>
<prop key="hibernate.dialect">org.hibernate.dialect.MySQL5InnoDBDialect</prop>

<prop key="hibernate.transaction.manager_lookup_class">com.atomikos.icatch.jta.hibernate3.TransactionManagerLookup</prop>
<prop key="hibernate.transaction.factory_class">com.atomikos.icatch.jta.hibernate3.AtomikosJTATransactionFactory</prop>

<prop key="hibernate.connection.release_mode">after_transaction</prop>
<prop key="hibernate.current_session_context_class">jta</prop>
<prop key="hibernate.connection.autocommit">true</prop>
<prop key="hibernate.c3p0.preferredTestQuery">SELECT 1</prop>
<prop key="hibernate.bytecode.provider">javassist</prop>

<bean id="hibernateTemplate" class="org.springframework.orm.hibernate3.HibernateTemplate">
<property name="sessionFactory" ref="sessionFactory" />

<tx:annotation-driven transaction-manager="jtaTransactionManager" />

<bean id="appContextHolder" class="com.inneractive.testAtomikos.ApplicationContext" />
<context:component-scan base-package="com.inneractive.testAtomikos"/>

The DAO class:

public class UsersDAO {

private HibernateTemplate template;

public <T> T findById(Class<T> clazz,Integer id){
return (T) template.get(clazz, id);

@Transactional(propagation=Propagation.REQUIRED, readOnly=false)
public void save(User user){

Any ideas??


Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

10 Discuss

Login to InfoQ to interact with what matters most to you.

Recover your password...


Follow your favorite topics and editors

Quick overview of most important highlights in the industry and on the site.


More signal, less noise

Build your own feed by choosing topics you want to read about and editors you want to hear from.


Stay up-to-date

Set up your notifications and don't miss out on content that matters to you