Hello, sometimes when the transaction should be roll-backed the following exception being thrown and prevents the system from continue as expected(ex: we have a method that do some work within a transaction, for some situation we return from the method before call transaction.Complete(), for example return false;).

Error Message:This SqlTransaction has completed; it is no longer usable.
Stack Trace:   at System.Data.SqlClient.SqlTransaction.ZombieCheck()
       at System.Data.SqlClient.SqlTransaction.Commit()
       at Xtensive.Sql.SqlConnection.Commit()
       at Xtensive.Orm.Providers.StorageDriver.CommitTransaction(Session session, SqlConnection connection)

asked Jun 04 '14 at 06:51

ahmad%20emad's gravatar image

ahmad emad
26292931

Hello ahmad.

What kind of work your method does? Please, specify the version of DataObjects.Net

(Jun 05 '14 at 01:03) Alexey Kulakov Alexey%20Kulakov's gravatar image

One Answer:

The Version of dataobjects is 4.6.4 . our system(web application) creates a Session and transaction on page load, then complete and dispose it at page unload(we use two database connection and switch between sessions during work, one domain created by session manager and another one created manually, its created as Session Manager does), during method call we open the session, do some insertion and update and if a business error encouraged we return 'false' from the method before reach the transaction.complete() statement. when the exception happened on our publish server i get a backup from the database and try on my own server, but it works fine. also it happened randomly on other situations.

answered Jun 05 '14 at 01:44

ahmad%20emad's gravatar image

ahmad emad
26292931

Hello ahmad.

You open the first session on page load and open the second session in your method. Do you disable the second session? Are you sure that first session and the second session are not same session?

(Jun 09 '14 at 02:08) Alexey Kulakov Alexey%20Kulakov's gravatar image
Your answer
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!
toggle preview

Subscription:

Once you sign in you will be able to subscribe for any updates here

Tags:

×2
×1
×1
×1
×1

Asked: Jun 04 '14 at 06:51

Seen: 3,970 times

Last updated: Jun 09 '14 at 02:08

powered by OSQA