Hi all, I've converted a project from SQL Server identity primary key columns to HiLo. So far all seems to work ok.
However there is one part of my application that performs a large number of inserts across a wide range of data. This data is logically isolated so I've split the code into threads and run the inserts against each logical group in different threads. I have one session per thread and clean the session up on termination of the thread. Usually this works fine and performance is good. However intermittently I'll get a "error performing isolated work" exception thrown in: at NHibernate.Transaction.AdoNetTransactionFactory.ExecuteWorkInIsolation(ISessionImplementor session, IIsolatedWork work, Boolean transacted) at NHibernate.Transaction.AdoNetWithDistrubtedTransactionFactory.ExecuteWorkInIsolation(ISessionImplementor session, IIsolatedWork work, Boolean transacted) at NHibernate.Engine.Transaction.Isolater.DoIsolatedWork(IIsolatedWork work, ISessionImplementor session) at NHibernate.Engine.TransactionHelper.DoWorkInNewTransaction(ISessionImplementor session) at NHibernate.Id.TableGenerator.Generate(ISessionImplementor session, Object obj) at NHibernate.Id.TableHiLoGenerator.Generate(ISessionImplementor session, Object obj) ... .. <snip> I've noticed the HiLo generator method is part of the path that's calling it. This also has an inner SQL Exception of "This SqlTransaction has completed; it is no longer usable." There isn't a lot on the internet about this NHibernate/Hibernate exeption but the SQL Exception seems to refer to the way the reader is closed. As this is intermittent, I'm a bit in the dark about this. Can anyone give me any pointers as to what may be happening? Is SQL is killing the transaction and that causes the HiLo error? Any help appreciated -- 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.
