Have you tried using a IBatisNet.Common.Transaction.TransactionScope
object:

 using (TransactionScope tx = new TransactionScope())
 {
  // Open connection to database 1      
  // Transaction will be automatically enlist into it
  // Execute update in database 1
  // Open connection to database 2
  // Transaction will be automatically enlist into it
  // Execute update in database 2
  // the following code will be executed only if no exception
  // occured in the above code; since we got here ok, 
  // let's vote for commit;
  tx.Completed(); 
 }

--- Anderson <[EMAIL PROTECTED]> wrote:

> Hello,
> 
>  
> 
>             I could see the example for distributed transactions use
> two
> DaoManagers.
> 
>  
> 
> daoManager = DaoManager.GetInstance("SqlMapDao");
> 
> daoManager2 = DaoManager.GetInstance("NHibernateDao");
> 
>  
> 
>       But, there are two contexts with two different mappers
> (NHibernate and
> SqlMapDao).
> 
>  
> 
> I could see I can't put two contexts for SqlMap on dao.config
> 
>  
> 
> How Can I control with two dao files ?
> 
>  
> 
> Look the code bellow:
> 
>  
> 
> DomDaoManagerBuilder DaoBuilder = new DomDaoManagerBuilder(); 
> 
> DaoBuilder.Configure("daoInformix.config");
> 
>  
> 
> It's will build the DaoManager, but in this file I can't have two
> contexts
> for SqlMap.
> 
>  
> 
> How could I do that?
> 
>  
> 
> Thanks,
> 
> Anderson
> 
> 

Reply via email to