title: Does Spring.NET [Transaction] attribute support multiple transaction managers?
body: <p>I've been using Spring.NET declarative Transaction management for some time in a code base that uses IBatis in conjunction with the TxScopeTransactionManager. I just added Spring.NET NHibernate support to the project (using OSIV pattern) without issue.  NHibernate will be used for new features only, ADO.NET/IBatis legacy data access code still needs to work as is. So I now have two distinct transaction managers in my context: </p>
  
  <ol>
  <li>Spring.Data.Core.TxScopeTransactionManager (existing Tran Mgr)</li>
  <li>Spring.Data.NHibernate.HibernateTransactionManager (added for Nhibernate) </li>
  </ol>
  
  <p>However, it looks like Spring.NET only allows a single TransactionManager to be bound to the Transaction attribute because legacy service methods decorated with this attribute are now using HibernateTransactionManager instead of TxScopeTransactionManager to commit or rollback transactions. This is problematic since HibernateTransactionManager is not aware of any non-nHibernate (read ADO.NET) connections.</p>
  
  <p>Is there a way to have [Transaction] use different Transaction Managers, perhaps in concert with the ObjectNameAutoProxyCreator to either include/exclude service classes based on namespace?</p>
  
  <p>If not, is there a way to have a single transactionManager handle both NHibernate and IBatis transactions?  </p>
  
  <p>I tested this using HibernateTransactionManager to manage both Data Access strategies, but my IBatis transactions aren't getting rolled back.  This is particularly odd, because I can see in SQL Profiler that both a <strong>Begin Tran</strong> and <strong>Rollback Tran</strong> are being sent by HibernateTransactionManager, but the data still gets committed. </p>
  
  <p>If I use TxScopeTransactionManager, then my IBatis transactions rollback successfully but NHibernate writes to the DB are never flushed. </p>