Currently TableStructure fails on mssql 2005 with "System.InvalidOperationException: SqlConnection does not support parallel transactions.".
Environment
None
Attachments
3
Activity
Show:
Oskar Berggren May 30, 2012 at 6:31 PM
Closing issues fixed in 3.3.1.CR1.
Oskar Berggren December 6, 2011 at 1:06 PM
Fixes and changes made to SequenceStyleGenerator et.al. in Hibernate have now been ported in recent commits, plus additional fixes. This problem should be fixed now.
Chris Chilvers November 2, 2009 at 3:25 AM
Ah sorry, not quite correct.
TableStructure.BuildCallback creates the TableAccessCallback, TableAccessCallback.NextValue then calls out out to TransactionHelper.DoWorkInNewTransaction, which subsequently creates a new connection, transaction scope and transaction and then calls TransactionHelper.DoWork (IIsolatedWork.DoWork).
This in turn calls TableStructure.DoWorkInCurrentTransaction with the isolated connection that already has a transaction created.
Chris Chilvers November 2, 2009 at 3:05 AM
It does have a separate transaction, which is created by the ITransactionFactory.ExecuteWorkInIsolation. The new (isolated) transaction is then passed in as the transaction parameter to TableStructure.TableAccessCallback. DoWorkInCurrentTransaction.
The problem is, that method is then creating its own transactions on a connection with an existing transaction, it also tries to create two of them, neither of which it disposes or commits.
It also doesn't create the parameters for the IDbCommand that updates the next high value and thus crashes with ArgumentOutOfRangeException after the transaction issue is resolved.
Currently TableStructure fails on mssql 2005 with "System.InvalidOperationException: SqlConnection does not support parallel transactions.".