Wire Hibernate Transactions in Spring
Subject:   You need a JTA!?!
Date:   2005-05-20 03:41:17
From:   guypardon

Nice article, but AFAIK there is no built-in JTA transaction manager in either Spring nor Hibernate. They can 'simulate' transactions, but _only_in_one_database_!

As soon as you need more than one connector in the same transaction (be it JMS or JDBC connectors), you _have_ to use a real JTA implementation underneath, and in addition one that provides full crash/restart recovery (something hard - if not impossible - to find in open source). Otherwise, you only _think_ you are doing transactions:-) It will work sometimes, but not when it really matters (after a crash or restart).

Anyway, maybe I missed it, but I didn't see the part where JTA was configured in the article. If anybody wants to try, feel free to use the Atomikos Transactions product, available from (It's not open source, but still: developer licenses are free.)

Especially relevant for this article: Atomikos Transactions was recently enhanced with special additions for Spring: JMS message-driven beans. In combination with Spring, you can get rid of the J2EE container altogether... Transactions works in any J2SE application. Installation in Tomcat (or any other J2EE web container) is also very easy.

Best regards,

Guy Pardon