As you know, it’s is not too difficult to configure transaction management using Spring framework. The only thing, worth to mention, is implementation details, how Spring handles this process.


For some reason, most developers think that Spring can handle everything; but, actually, this is just an integration layer. When an application activates transaction layer; Spring scans JNDI for a transaction manager, using list of predefined names. These names cover most JEE servers (e.g. weblogic).

Transaction manager discovery class is org.springframework.transaction.jta.JtaTransactionManager and the list of names is

public static final String[] FALLBACK_TRANSACTION_MANAGER_NAMES =
            new String[] {
// Check fallback JNDI locations.
        for (String jndiName : FALLBACK_TRANSACTION_MANAGER_NAMES) {
            try {
                TransactionManager tm = getJndiTemplate().lookup(jndiName, TransactionManager.class);
                if (logger.isDebugEnabled()) {
                    logger.debug("JTA TransactionManager found at fallback JNDI location [" + jndiName + "]");
                return tm;
            catch (NamingException ex) {
                if (logger.isDebugEnabled()) {
                    logger.debug("No JTA TransactionManager found at fallback JNDI location [" + jndiName + "]", ex);


Tomcat is not a full JEE server and has no transaction manager.