About Transaction

About Transaction

Old forum URL: forums.lhotka.net/forums/t/6839.aspx


ayubu posted on Thursday, April 23, 2009

Am totally new to transactions so bear with me.
In a transaction if i call Commit then Server records a transaction , what if the exception is thrown before transaction ends hence before the commit call and i do not call Rollback will the server abort transaction.
What is the effect(Side) if i dont call commit

sergeyb replied on Thursday, April 23, 2009

As long as your transaction is wrapped inside using {} statement, there are not side effects.  Dispose will take care of clean up and will actually call Rollback for you.

 

Sergey Barskiy

Principal Consultant

office: 678.405.0687 | mobile: 404.388.1899

cid:_2_0648EA840648E85C001BBCB886257279
Microsoft Worldwide Partner of the Year | Custom Development Solutions, Technical Innovation

 

From: ayubu [mailto:cslanet@lhotka.net]
Sent: Thursday, April 23, 2009 7:32 AM
To: Sergey Barskiy
Subject: [CSLA .NET] About Transaction

 

Am totally new to transactions so bear with me.
In a transaction if i call Commit then Server records a transaction , what if the exception is thrown before transaction ends hence before the commit call and i do not call Rollback will the server abort transaction.
What is the effect(Side) if i dont call commit


tiago replied on Wednesday, July 28, 2010

sergeyb

(...) Dispose will take care of clean up and will actually call Rollback for you.

 

 

Hi Sergey,

I was looking just for this small piece of information. I'm using CSLA.NET 4 and ADO transactions. I remember reading something about full documentation of CSLA.NET code but at least 3.8.3 and 4.0.0 are missing documentation on Commit() method and documentation on Dispose() method just says "Dispose object, dereferencing or disposing the connection it is managing." but not a word about Rollback.

In a word: thanks Sergey (oops 2 words)

Copyright (c) Marimer LLC