Looks like this was bug when the transaction abort happens at the same time 
another command is being run.  Fixed in a pull request.

https://github.com/nhibernate/nhibernate-core/pull/130 
https://nhibernate.jira.com/browse/NH-3227 

On Wednesday, 18 July 2012 17:43:46 UTC+1, Peter Beams wrote:
>
> I have an application that is running in multiple threads and using DTC 
> with our SQL Server (2008R2).  I'm getting this intermittent exception 
> being thrown, it happens anywhere from 5 minutes to 6 hours after starting 
> the application.  Looks to be when a DTC transaction is aborted it fails 
> when trying to close commands in the abstract batcher.  Any help 
> much appreciated.
>
> Framework Version: v4.0.30319
> Description: The process was terminated due to an unhandled exception.
> Exception Info: System.InvalidOperationException
> Stack:
>    at 
> System.Collections.Generic.Dictionary`2+KeyCollection+Enumerator[[System.__Canon,
>  
> mscorlib, Version=4.0.0.0, Culture=neutral, 
> PublicKeyToken=b77a5c561934e089],[System.__Canon, mscorlib, 
> Version=4.0.0.0, Culture=neutral, 
> PublicKeyToken=b77a5c561934e089]].MoveNext()
>    at NHibernate.AdoNet.AbstractBatcher.CloseCommands()
>    at NHibernate.AdoNet.AbstractBatcher.Dispose(Boolean)
>    at NHibernate.Impl.SessionImpl.Close()
>    at NHibernate.Impl.SessionImpl.Dispose(Boolean)
>    at 
> NHibernate.Transaction.AdoNetWithDistributedTransactionFactory+<>c__DisplayClass1.<EnlistInDistributedTransactionIfNeeded>b__0(System.Object,
>  
> System.Transactions.TransactionEventArgs)
>    at 
> System.Transactions.TransactionCompletedEventHandler.Invoke(System.Object, 
> System.Transactions.TransactionEventArgs)
>    at 
> System.Transactions.TransactionStatePromotedAborted.EnterState(System.Transactions.InternalTransaction)
>    at 
> System.Transactions.InternalTransaction.DistributedTransactionOutcome(System.Transactions.InternalTransaction,
>  
> System.Transactions.TransactionStatus)
>    at 
> System.Transactions.Oletx.RealOletxTransaction.FireOutcome(System.Transactions.TransactionStatus)
>    at 
> System.Transactions.Oletx.OutcomeEnlistment.InvokeOutcomeFunction(System.Transactions.TransactionStatus)
>    at 
> System.Transactions.Oletx.OletxTransactionManager.ShimNotificationCallback(System.Object,
>  
> Boolean)
>    at 
> System.Threading._ThreadPoolWaitOrTimerCallback.PerformWaitOrTimerCallback(System.Object,
>  
> Boolean)
>

-- 
You received this message because you are subscribed to the Google Groups 
"nhusers" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/nhusers/-/3jIr--P8IPUJ.
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