Please refer to posting http://forum.springframework.org/showpost.php?p=74520&postcount=13
I'm utilizing Spring's transaction interceptor to manage my transactions and JtaTransactionManager as I have distributed transactions that need to occur. But the real problem is with suspend/resume and the DataSourceUtils class. It appears that there is some recursion happening.
My data source is getting wrapped in a TransactionAwareDataSourceProxy in the iBatis SqlClientMapFactoryBean.
When a request is made in the SqlMapClientTemplate execute method, a request is made for a connection. This is accomplished with a call to DataSourceUtils.getConnection(getDataSource()). The call to getDataSource() returns the TransactionAwareDataSourceProxy and passes it into the getConnection method. A call is then made to doGetConnection(dataSource). The line of code is as follows:
ConnectionHolder conHolder = (ConnectionHolder) TransactionSynchronizationManager.getResource(dataSource);
This call returns null as it is the first request. The line of code executed is a logging statement: