Hi,

I have a question aboute TransactionScope.
If i understood correctly the ISession instance can only have one
Transaction, so how NH handle the following code when RequiresNew is
passed to the sub scope 't' and transaction 'a' is rolledback in sub
scope 'u'?

using (TransactionScope s = new TransactionScope ())
{

    // transaction 'a' is active here

    using (TransactionScope t = new TransactionScope
(TransactionScopeOption.RequiresNew))
    {
        // transaction 'b' is active here

        t.Complete ();
    }

    // transaction 'a' is active here

    using (TransactionScope u = new TransactionScope ())
    {
        // transaction 'a' is active here
    } // 'a' rolls back here,

      //the transaction from 's' is put into Current.
     // transaction 'a' is current, but aborted here
    s.Complete ();
}  // 'a' is already aborted, so is just removed at this point


Thanks in Advance!
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"nhusers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/nhusers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to