2014-05-14 22:14 GMT+02:00 <[email protected]>:

> Hello NH team!
>
> I started my journey in the world of System.Transactions and in the inner
> workings of NH. After careful review of all issues, I identified 3 areas
> that need changes and / or improvements: connection management, thread
> safety of the session and Flush() timing.
>
> I decided to start working on connection management first, and what I'm
> going to implement is a close of the connection when closing (or disposing
> of) the session, even when an ambient tx is active. As stated in MSDN, this
> should not be an issue (see
> http://msdn.microsoft.com/en-us/library/system.data.sqlclient.sqlconnection.close.aspx).
> This is the heart of the discussion in NH-2928, but deferring connection
> close causes other issues as well (concurrency caused by async close).
>


I agree this looks like a good idea.



>
> I started writing a new transaction factory, but unfortunately, it seems
> difficult to support the current, buggy
> AdoNetWithDistributedTransactionFactory together with a new one that would
> fix the issues. That's why I had to drop the current tx factory. Hope this
> is not a too big issue. Any comments on this?
>



I think it would be very good if the existing
AdoNetWithDistributedTransactionFactory could remain with unchanged
functionality it possible. Even if we can come up with a better solution
that in theory should be fully backwards compatible, it would be comforting
to know that one can switch back to AdoNetWithDistributedTransactionFactory
if the new one causes problems in some scenario.


One more thing:

NH can be used in various ways, e.g. session inside ambient transaction or
the other way around, short- or long-lived session, etc. Perhaps we don't
need to support all these scenarios together with System.Transactions?


/Oskar

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"nhibernate-development" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to