In this example all the statements following Transaction creation will
part of the that transaction. NHibernate won't create nested or
another new transaction when we open a session. Is my understanding
Correct.

Thank you so much.

On Nov 12, 7:31 am, Jason Meckley <[email protected]> wrote:
> I believe you need to start the transaction before you open the
> session. this is how I use TransactionScope, and have not had a
> problem with it.
>
> //begining of UOW boundary
> var tx = new TransactionScope();
> MappedSessionContext.Bind(oraclefactory, oraclefactory.OpenSession());
> MappedSessionContext.Bind(mssqlfactory, mssqlfactory.OpenSession());
>
> //end of UOW boundary
> if(no error occured)
> {
>    tx.Commit();}
>
> MappedSessionContext.Unbind(oraclefactory).Dispose();
> MappedSessionContext.Unbind(mssqlfactory).Dispose();
> tx.Dispose();
>
> On Nov 12, 9:41 am, kor <[email protected]> wrote:
>
>
>
> > i don't understand, are u creating the nhibernate transactions
> > externally of this code (for example at the boundary of the method
> > that calls it) or are you using implicit transaction?- Hide quoted text -
>
> - Show quoted text -

--~--~---------~--~----~------------~-------~--~----~
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