I have an NHibernate Transaction that does some work and makes a call to a legacy method which uses DBTransactions to call several Stored Procedures. If any of these legacy method calls fail then the NHibernate Transaction should rollback.
The problem is that the Legacy methods are using data in the database that the NHibernate transaction is creating. This is causing the Legacy code's SQL Process to lock while waiting on the Nhibernate process. The Nhibernate process is waiting on the Legacy SQL process to finish thus causing a deadlock.
I have tried using ReadUncommitted for both transactions but that doesn't work.
I tried setting up a Distributed Transaction by using System.EnterpriseServices as recommended in the NHibernate in Action but that doesn't seem to work either.
I'm not really sure where to go from here.