c# - Multiple NHibernate Transactions in TransactionScope -


i have legacy dll uses multiple nhibernate transactions in 1 method. task make method act 1 transaction, think transactionscope should me. however, when made this:

using (transactionscope tx = new transactionscope()) {     #region.. code inside dll      using (isession session1 = ...)     using (itransaction tx1 = session.begintransaction())     {         // ...do work session         tx1.commit();     }      using (isession session2 = ...)     using (itransaction tx2 = session.begintransaction())     {         // ...do work session         tx2.commit();     }      #endregion      tx.complete(); } 

...method not rolledback if tx2 falls!

i appreciate suggestion or hint..

thank in advance


Comments

Popular posts from this blog

Delphi XE2 Indy10 udp client-server interchange using SendBuffer-ReceiveBuffer -

Qt ActiveX WMI QAxBase::dynamicCallHelper: ItemIndex(int): No such property in -

python - cx_oracle unable to find Oracle Client -