Hi all, I have the following situation: for every webservice request I start a new TransactionScope. Inside this transaction scope I create a session and a transaction. This all works well, unless the transaction is aborted. For instance, when there is a trigger in the database that fails, the transaction is automatically aborted. Once the transaction is aborted you do no longer have to rollback the transaction. In fact, when you try to rollback a transaction the following exception is returned: "The ROLLBACK TRANSACTION request has no corresponding BEGIN TRANSACTION." (SQL Server 2008)
Unfortunately, when the transaction is aborted, NHibernate will still try to rollback that transaction (resulting in the exception described above). It seems like NHibernate does not take the "aborted" status into account. Note that in my code I do not call the Rollback-method explicitly, this all happens in the background. Because the rollback fails, it also seems that the TransactionScope is not cleaned up correctly, resulting in the following exception for some of the subsequent requests: NHibernate.TransactionException: Begin failed with SQL exception ----> System.Data.SqlClient.SqlException: New request is not allowed to start because it should come with valid transaction descriptor. Is it possible to circumvent or solve this issue? Thanks in advance! -- 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.
